Home
last modified time | relevance | path

Searched defs:generate (Results 1 – 25 of 44) sorted by last modified time

12

/plugin/siteexport/
H A Dscript.js32 _.generate = function() { class in _
/plugin/xlsx2dw/packages/jszip/
H A Djszip.js1643 generate: function() { method in AnonymousFunctione744f5d00100.AnonymousFunctione744f5d02000.out
/plugin/dw2pdf/vendor/mpdf/mpdf/src/Pdf/Protection/
H A DUniqidGenerator.php21 public function generate() function in Mpdf\\Pdf\\Protection\\UniqidGenerator
/plugin/randomtables/table-roller/src/Generator/
H A DBaseGenerator.php56 public function generate(): string function in TableRoller\\Generator\\BaseGenerator
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Doubleclicksearch/Resource/
H A DReports.php40 public function generate(ReportRequest $postBody, $optParams = []) function in Google\\Service\\Doubleclicksearch\\Resource\\Reports
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Directory/Resource/
H A DVerificationCodes.php39 public function generate($userKey, $optParams = []) function in Google\\Service\\Directory\\Resource\\VerificationCodes
/plugin/authgooglesheets/vendor/google/apiclient-services/src/MyBusinessVerifications/Resource/
H A DVerificationTokens.php44 public function generate(GenerateVerificationTokenRequest $postBody, $optParams = []) function in Google\\Service\\MyBusinessVerifications\\Resource\\VerificationTokens
/plugin/authgooglesheets/vendor/google/apiclient-services/src/AdMob/Resource/
H A DAccountsMediationReport.php44 public function generate($parent, GenerateMediationReportRequest $postBody, $optParams = []) function in Google\\Service\\AdMob\\Resource\\AccountsMediationReport
H A DAccountsNetworkReport.php44 public function generate($parent, GenerateNetworkReportRequest $postBody, $optParams = []) function in Google\\Service\\AdMob\\Resource\\AccountsNetworkReport
/plugin/authgooglesheets/vendor/google/apiclient-services/src/AdSenseHost/Resource/
H A DAccountsReports.php57 public function generate($accountId, $startDate, $endDate, $optParams = []) function in Google\\Service\\AdSenseHost\\Resource\\AccountsReports
H A DReports.php56 public function generate($startDate, $endDate, $optParams = []) function in Google\\Service\\AdSenseHost\\Resource\\Reports
/plugin/authgooglesheets/vendor/google/apiclient-services/src/Adsense/Resource/
H A DAccountsReports.php83 public function generate($account, $optParams = []) function in Google\\Service\\Adsense\\Resource\\AccountsReports
H A DAccountsReportsSaved.php71 public function generate($name, $optParams = []) function in Google\\Service\\Adsense\\Resource\\AccountsReportsSaved
/plugin/commonmark/vendor/league/commonmark/src/Extension/TableOfContents/
H A DTableOfContentsGeneratorInterface.php19 public function generate(Document $document): ?TableOfContents; global() function
H A DTableOfContentsGenerator.php56 public function generate(Document $document): ?TableOfContents global() function in League\\CommonMark\\Extension\\TableOfContents\\TableOfContentsGenerator
/plugin/diagramsnet/lib/math/extensions/a11y/
H A Dmathjax-sre.js557 sre.ContrastPicker.prototype.generate=function(){return sre.ColorPicker.RGB2hex_(sre.ColorPicker.rg… method in sre.ContrastPicker
693 sre.AlphabetGenerator.generate=function(a,b){var c=sre.Engine.getInstance().locale;sre.Engine.getIn… function
/plugin/abc2/abc-libraries/abc2svg/
H A Dabc2svg-1.js8144 function generate(in_mc){var s,v,p_voice;if(parse.tp){syntax(1,"No end of tuplet") function
/plugin/abc2/abc-libraries/abcjs/
H A Dabcjs_plugin-midi_6.0.0-beta.25-min.js3 !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 function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t){var n={clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},cloneArray:function(e){for(var t=[],r=0;r<e.length;r++)t.push(n.clone(e[r]));return t},cloneHashOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.clone(e[r]));return t},cloneHashOfArrayOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.cloneArray(e[r]));return t},gsub:function(e,t,n){return e.split(t).join(n)},strip:function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(e,t){return 0===e.indexOf(t)},endsWith:function(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n},each:function(e,t,n){for(var r=0,i=e.length;r<i;r++)t.apply(n,[e[r],r])},last:function(e){return 0===e.length?null:e[e.length-1]},compact:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},detect:function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}};try{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))}catch(e){}e.exports=n},function(e,t){var n={FONTEM:360,FONTSIZE:30};n.STEP=93*n.FONTSIZE/720,n.SPACE=10,n.TOPNOTE=15,n.STAVEHEIGHT=100,n.INDENT=50,e.exports=n},function(e,t){var n=function(e,t,n,r,i){switch(i=i||{},this.x=0,this.c=e,this.dx=t,this.w=n,this.pitch=r,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.top=r,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?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.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}};n.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=this.dim.font.size/4;1===this.c.length&&(e/=2);var t="chord"===this.type?this.realWidth/2:0,n=this.x-t-e;return{left:n,right:n+this.realWidth+e}},n.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},n.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},n.prototype.getLane=function(){return void 0===this.lane?0:this.lane},n.prototype.setX=function(e){this.x=e+this.dx},e.exports=n},function(e,t){e.exports=function(e){return parseFloat(e.toFixed(2))}},function(e,t,n){var r=n(3);e.exports=function(e,t){var n,i=t.y;if(t.lane){var a=.25*t.dim.font.size;i+=(t.dim.font.size+a)*t.lane}t.dim?(n=t.dim).attr.class=t.klass:n=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(n.attr["text-anchor"]=t.anchor),n.attr.x=t.x,n.attr.y=i,t.centerVertically||(n.attr.y+=n.font.size),"debugfont"===t.type&&(console.log("Debug msg: "+t.text),n.attr.stroke="#ff0000");var s=t.text.replace(/\n\n/g,"\n \n");s=s.replace(/^\n/," \n"),n.font.box&&(e.paper.openGroup({klass:n.attr.class,fill:"#000000"}),"end"===n.attr["text-anchor"]?n.attr.x-=n.font.padding:"start"===n.attr["text-anchor"]&&(n.attr.x+=n.font.padding),n.attr.y+=n.font.padding,delete n.attr.class),t.noClass&&delete n.attr.class,n.attr.x=r(n.attr.x),n.attr.y=r(n.attr.y);var o=e.paper.text(s,n.attr);if(n.font.box){var c=o.getBBox(),l=0;"middle"===n.attr["text-anchor"]?l=c.width/2+n.font.padding:"end"===n.attr["text-anchor"]&&(l=c.width+2*n.font.padding);var h=0;t.centerVertically&&(h=c.height-n.font.padding),e.paper.rect({x:Math.round(t.x-l),y:Math.round(i-h),width:Math.round(c.width+2*n.font.padding),height:Math.round(c.height+2*n.font.padding)}),o=e.paper.closeGroup()}return o}},function(e,t,n){var r=n(1),i={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"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},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.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},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.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},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.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",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.32,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84},"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},"noteheads.slash.quarter":{d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},"noteheads.harmonic.quarter":{d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165}},a=function(e){for(var t=[],n=0,r=e.length;n<r;n++){t[n]=[];for(var i=0,a=e[n].length;i<a;i++)t[n][i]=e[n][i]}return t},s={printSymbol:function(e,t,n,r,s,o,c){if(!i[n])return null;var l=a(i[n].d);l[0][1]+=e,l[0][2]+=t;for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return r.path({path:h,stroke:o,fill:c,class:s})},getPathForSymbol:function(e,t,n,r,s){if(r=r||1,s=s||1,!i[n])return null;var o=a(i[n].d);return 1===r&&1===s||function(e,t,n){for(var r=0,i=e.length;r<i;r++){var a,s,o=e[r];for(a=1,s=o.length;a<s;a++)o[a]*=a%2?t:n}}(o,r,s),o[0][1]+=e,o[0][2]+=t,o},getSymbolWidth:function(e){return i[e]?i[e].w:0},symbolHeightInPitches:function(e){return(i[e]?i[e].h:0)/r.STEP},getSymbolAlign:function(e){return"scripts"===e.substring(0,7)&&"scripts.roll"!==e?"center":"left"},getYCorr:function(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(e,t){i[e]=t}};e.exports=s},function(e,t,n){var r=n(8),i=function(e,t,n,r,i,a){a||(a={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=a.durationClassOveride?a.durationClassOveride:this.duration,this.minspacing=n||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=r,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};i.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},i.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},i.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},i.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),isNaN(this.fixed.t)||isNaN(this.fixed.b),e.dx+e.w>this.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;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.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;t<this.children.length;t++)this.children[t].setX(e)},i.prototype.center=function(e,t){var n=(t.x-e.x)/2+e.x;this.x=n-this.w/2;for(var r=0;r<this.children.length;r++)this.children[r].setX(this.x)},i.prototype.setHint=function(){this.hint=!0},i.prototype.isIE=!1,i.prototype.highlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)},i.prototype.unhighlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)},e.exports=i},function(e,t){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})(e)}e.exports=function(){for(var e,t,r,i,a,s=0,o=arguments[s++],c=[];o;){if(t=/^[^\x25]+/.exec(o))c.push(t[0]);else if(t=/^\x25{2}/.exec(o))c.push("%");else{if(!(t=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[t[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(t[7])&&"number"!=typeof e)throw"Expecting number but found "+n(e);switch(t[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=t[6]?e.toExponential(t[6]):e.toExponential();break;case"f":e=t[6]?parseFloat(e).toFixed(t[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&t[6]?e.substring(0,t[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(t[7])&&t[2]&&e>0?"+"+e:e,i=t[3]?"0"==t[3]?"0":t[3].charAt(1):" ",a=t[5]-String(e).length,r=t[5]?str_repeat(i,a):"",c.push(t[4]?e+r:r+e)}o=o.substring(t[0].length)}return c.join("")}},function(e,t){e.exports=function(e,t,n,r){if(e)for(var i=0;i<e.length;i++){var a=e[i],s=a.getAttribute("highlight");s||(s="fill"),a.setAttribute(s,r);var o=a.getAttribute("class");o||(o=""),o=(o=o.replace(n,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o.charAt(o.length-1)&&(o+=" "),o+=t),a.setAttribute("class",o)}}},function(e,t){e.exports=function(e,t,n){return e.paper.path(t)}},function(e,t,n){var r=n(0),i={};!function(){"use strict";var e,t,n,a,s;i.initialize=function(r,i,o,c,l){e=r,t=i,a=c,s=l,(n=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},n.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},n.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},n.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.annotationfont=n.annotationfont,a.formatting.gchordfont=n.gchordfont,a.formatting.historyfont=n.historyfont,a.formatting.infofont=n.infofont,a.formatting.measurefont=n.measurefont,a.formatting.partsfont=n.partsfont,a.formatting.repeatfont=n.repeatfont,a.formatting.textfont=n.textfont,a.formatting.tripletfont=n.tripletfont,a.formatting.vocalfont=n.vocalfont,a.formatting.wordsfont=n.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,n,r,i,a){function s(){var s=parseInt(e[0].token);return e.shift(),n?0===e.length?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[a]?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",r,i),{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",r,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 *.",r,i)}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.",r,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",r,i):c=g.token:t("Expected font size in font definition.",r,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"finished":t('Extra characters found after "box" in font definition.',r,i)}}void 0===c?n?c=n.size:(t("Must specify the size of the font since there is no default value.",r,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(n?l=n.face:(t("Must specify the name of the font since there is no default value.",r,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=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n[e]=c(t,n[e],r,0,e),n.is_in_header&&(a.formatting[e]=n[e]),null)},h=function(e,t){var n="";r.each(t,(function(e){n+=e.token}));var i=parseFloat(n);if(isNaN(i)||0===i)return'Directive "'+e+'" requires a number as a parameter.';a.formatting.scale=i},u=function(e,t,r,i,a){if(1!==r.length||"number"!==r[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=r[0].intt;return void 0!==i&&s<i?'Directive "'+t+'" requires a number greater than or equal to '+i+" as a parameter.":void 0!==a&&s>a?'Directive "'+t+'" requires a number less than or equal to '+a+" as a parameter.":(n[e]=s,null)},d=function(e,t,r){if(1===r.length&&("true"===r[0].token||"false"===r[0].token))return n[e]="true"===r[0].token,null;var i=u(e,t,r,0,1);return null!==i?i:(n[e]=1===n[e],null)},f=function(e,t,r,i){if(1!==r.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var a=r[0].token,s=!1,o=0;!s&&o<i.length;o++)i[o]===a&&(s=!0);return s?(n[e]=a,null):'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter."},p=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],m=["gchord","ptstress","beatstring"],g=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc"],v=["program"],b=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],y=["beat"],w=["drone"],x=["portamento"],k=["expand","grace","trim"],A=["drum","chordname"];i.parseFontChangeLine=function(e){var t=e.split("$");if(t.length>1&&n.setfont){for(var r=[{text:t[0]}],i=1;i<t.length;i++)"0"===t[i].charAt(0)?r.push({text:t[i].substring(1)}):"1"===t[i].charAt(0)&&n.setfont[1]?r.push({font:n.setfont[1],text:t[i].substring(1)}):"2"===t[i].charAt(0)&&n.setfont[2]?r.push({font:n.setfont[2],text:t[i].substring(1)}):"3"===t[i].charAt(0)&&n.setfont[3]?r.push({font:n.setfont[3],text:t[i].substring(1)}):"4"===t[i].charAt(0)&&n.setfont[4]?r.push({font:n.setfont[4],text:t[i].substring(1)}):r[r.length-1].text+="$"+t[i];if(r.length>1)return r}return e};var T=["auto","above","below","hidden"];i.addDirective=function(o){var S=e.tokenize(o,0,o.length);if(0===S.length||"alpha"!==S[0].type)return null;var M=o.substring(o.indexOf(S[0].token)+S[0].token.length);M=e.stripComment(M);var N=S.shift().token.toLowerCase(),C="";switch(N){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"landscape":n.landscape=!0;break;case"papersize":n.papersize=M;break;case"graceslurs":if(1!==S.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===S[0].token||"false"===S[0].token)a.formatting.graceSlurs=!1;else{if("1"!==S[0].token&&"true"!==S[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+S[0].token+")";a.formatting.graceSlurs=!0}break;case"stretchlast":a.formatting.stretchlast=!0;break;case"titlecaps":n.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return f("vocalPosition",N,S,T);case"dynamic":return f("dynamicPosition",N,S,T);case"gchord":return f("chordPosition",N,S,T);case"ornament":return f("ornamentPosition",N,S,T);case"volume":return f("volumePosition",N,S,T);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":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,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?'Directive "'+t+'" requires a measurement as a parameter.':(a.formatting[t]=r.value,null)}(N,S);case"voicescale":if(1!==S.length||"number"!==S[0].type)return"voicescale requires one float as a parameter";var E=S.shift();return n.currentVoice&&(n.currentVoice.scale=E.floatt,s.changeVoiceScale(n.currentVoice.scale)),null;case"vskip":var I=Math.round(function(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:r.value}(N,S));return I.error?I.error:(s.addSpacing(I),null);case"scale":h(N,S);break;case"sep":if(0===S.length)s.addSeparator(14,14,85);else{var _=e.getMeasurement(S);if(0===_.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var B=_.value;if(0===(_=e.getMeasurement(S)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var P=_.value;if(0===(_=e.getMeasurement(S)).used||0!==S.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var D=_.value;s.addSeparator(B,P,D)}break;case"barsperstaff":if(null!==(C=u("barsperstaff",N,S)))return C;break;case"staffnonote":if(1!==S.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===S[0].token)n.staffnonote=!0;else{if("1"!==S[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+S[0].token+")";n.staffnonote=!1}break;case"printtempo":if(null!==(C=d("printTempo",N,S)))return C;break;case"partsbox":if(null!==(C=d("partsBox",N,S)))return C;n.partsfont.box=n.partsBox;break;case"freegchord":if(null!==(C=d("freegchord",N,S)))return C;break;case"measurenb":case"barnumbers":if(null!==(C=u("barNumbers",N,S)))return C;break;case"setbarnb":if(1!==S.length||"number"!==S[0].type)return"Directive setbarnb requires a number as a parameter.";n.currBarNumber=s.setBarNumberImmediate(S[0].intt);break;case"begintext":n.inTextBlock=!0;break;case"continueall":n.continueall=!0;break;case"beginps":n.inPsBlock=!0,t("Postscript ignored",o,0);break;case"deco":M.length>0&&n.ignoredDecorations.push(M.substring(0,M.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var L=e.translateString(M);s.addText(i.parseFontChangeLine(L));break;case"center":var O=e.translateString(M);s.addCentered(i.parseFontChangeLine(O));break;case"font":break;case"setfont":var H=e.tokenize(M,0,M.length);if(H.length>=4&&"-"===H[0].token&&"number"===H[1].type){var V=parseInt(H[1].token);V>=1&&V<=4&&(n.setfont||(n.setfont=[]),H.shift(),H.shift(),n.setfont[V]=c(H,n.setfont[V],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(N,S,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(a.formatting[e]=c(t,a.formatting[e],n,0,e),null)}(N,S,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",S,o);case"staves":case"score":n.score_is_present=!0;for(var F,z=function(e,t,i,a,s){(t||0===n.staves.length)&&n.staves.push({index:n.staves.length,numVoices:0});var o=r.last(n.staves);void 0!==i&&void 0===o.bracket&&(o.bracket=i),void 0!==a&&void 0===o.brace&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===n.voices[e]&&(n.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},j=!1,q=!1,Y=!1,W=!1,R=!1,G=!1,U=!1,X=function(){if(U=!0,F){var e="start";F.staffNum>0&&("start"!==n.staves[F.staffNum-1].connectBarLines&&"continue"!==n.staves[F.staffNum-1].connectBarLines||(e="continue")),n.staves[F.staffNum].connectBarLines=e}};S.length;){var K=S.shift();switch(K.token){case"(":j?t("Can't nest parenthesis in %%score",o,K.start):(j=!0,W=!0);break;case")":!j||W?t("Unexpected close parenthesis in %%score",o,K.start):j=!1;break;case"[":q?t("Can't nest brackets in %%score",o,K.start):(q=!0,R=!0);break;case"]":!q||R?t("Unexpected close bracket in %%score",o,K.start):(q=!1,n.staves[F.staffNum].bracket="end");break;case"{":Y?t("Can't nest braces in %%score",o,K.start):(Y=!0,G=!0);break;case"}":!Y||G?t("Unexpected close brace in %%score",o,K.start):(Y=!1,n.staves[F.staffNum].brace="end");break;case"|":X();break;default:for(var Z="";("alpha"===K.type||"number"===K.type)&&(Z+=K.token,K.continueId);)K=S.shift();z(Z,!j||W,R?"start":q?"continue":void 0,G?"start":Y?"continue":void 0,U),W=!1,R=!1,G=!1,U=!1,F=n.voices[Z],"staves"===N&&X()}}break;case"newpage":var Q=e.getInt(M);s.addNewPage(0===Q.digits?-1:Q.value);break;case"abc":var J=M.split(" ");switch(J[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var $=J.shift();s.addMetaText(N+$,J.join(" "));break;default:return"Unknown directive: "+N+J[0]}break;case"header":case"footer":var ee=e.getMeat(M,0,M.length);'"'===(ee=M.substring(ee.start,ee.end)).charAt(0)&&'"'===ee.charAt(ee.length-1)&&(ee=ee.substring(1,ee.length-1));var te=ee.split("\t"),ne={};ne=1===te.length?{left:"",center:te[0],right:""}:2===te.length?{left:te[0],center:te[1],right:""}:{left:te[0],center:te[1],right:te[2]},te.length>3&&t("Too many tabs in "+N+": "+te.length+" found.",M,0),s.addMetaTextObj(N,ne);break;case"midi":var re=e.tokenize(M,0,M.length,!0);re.length>0&&"="===re[0].token&&re.shift(),0===re.length?t("Expected midi command",M,0):function(e,n,r){var i=e.shift().token,a=[];if(p.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,r,0);else if(m.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):a.push(e[0].token);else if(g.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,r,0):a.push(e[0].intt);else if(v.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,r,0):(a.push(e[0].intt),2===e.length&&a.push(e[1].intt));else if(b.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt));else if(x.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,r,0):(a.push(e[0].token),a.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token]=e[1].intt,a=n.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,a=n.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,r,0);else if(k.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[2].intt));else if(y.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,r,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,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt));else if(w.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,r,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,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt),a.push(e[4].intt));else if(v.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,r,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,r,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,r,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,r,0)):(a.push(e[0].intt),4===e.length&&a.push(e[3].intt));else if(A.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else{var o=e.shift();for(a.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,r,0),a.push(o.intt)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:a}):(void 0===n.formatting.midi&&(n.formatting.midi={}),n.formatting.midi[i]=a)}(re,a,M);break;case"map":case"percmap":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[N]=M;break;default:return"Unknown directive: "+N}return null},i.globalFormatting=function(r){for(var i in r)if(r.hasOwnProperty(i)){var s,o=""+r[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":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=d("partsBox",i,c))&&t(s),n.partsfont.box=n.partsBox;break;case"freegchord":null!==(s=d("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),a.formatting.fontboxpadding=c[0].floatt;break;case"stretchlast":a.formatting.stretchlast="true"===o||!0===o;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},function(e,t,n){var r=n(0),i=n(10),a=n(16),s={};!function(){var e,t,n,o;s.initialize=function(r,i,a,s,c){e=r,t=i,n=a,s,o=c},s.standardKey=function(e,t,r,i){var s={acc:"sharp",note:"f"},o={acc:"sharp",note:"c"},c={acc:"sharp",note:"g"},l={acc:"sharp",note:"d"},h={acc:"sharp",note:"A"},u={acc:"sharp",note:"e"},d={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},p={acc:"flat",note:"e"},m={acc:"flat",note:"A"},g={acc:"flat",note:"d"},v={acc:"flat",note:"G"},b={acc:"flat",note:"c"},y={acc:"flat",note:"F"},w={"C#":[s,o,c,l,h,u,d],"A#m":[s,o,c,l,h,u,d],"G#Mix":[s,o,c,l,h,u,d],"D#Dor":[s,o,c,l,h,u,d],"E#Phr":[s,o,c,l,h,u,d],"F#Lyd":[s,o,c,l,h,u,d],"B#Loc":[s,o,c,l,h,u,d],"F#":[s,o,c,l,h,u],"D#m":[s,o,c,l,h,u],"C#Mix":[s,o,c,l,h,u],"G#Dor":[s,o,c,l,h,u],"A#Phr":[s,o,c,l,h,u],BLyd:[s,o,c,l,h,u],"E#Loc":[s,o,c,l,h,u],B:[s,o,c,l,h],"G#m":[s,o,c,l,h],"F#Mix":[s,o,c,l,h],"C#Dor":[s,o,c,l,h],"D#Phr":[s,o,c,l,h],ELyd:[s,o,c,l,h],"A#Loc":[s,o,c,l,h],E:[s,o,c,l],"C#m":[s,o,c,l],BMix:[s,o,c,l],"F#Dor":[s,o,c,l],"G#Phr":[s,o,c,l],ALyd:[s,o,c,l],"D#Loc":[s,o,c,l],A:[s,o,c],"F#m":[s,o,c],EMix:[s,o,c],BDor:[s,o,c],"C#Phr":[s,o,c],DLyd:[s,o,c],"G#Loc":[s,o,c],D:[s,o],Bm:[s,o],AMix:[s,o],EDor:[s,o],"F#Phr":[s,o],GLyd:[s,o],"C#Loc":[s,o],G:[s],Em:[s],DMix:[s],ADor:[s],BPhr:[s],CLyd:[s],"F#Loc":[s],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[f],Dm:[f],CMix:[f],GDor:[f],APhr:[f],BbLyd:[f],ELoc:[f],Bb:[f,p],Gm:[f,p],FMix:[f,p],CDor:[f,p],DPhr:[f,p],EbLyd:[f,p],ALoc:[f,p],Eb:[f,p,m],Cm:[f,p,m],BbMix:[f,p,m],FDor:[f,p,m],GPhr:[f,p,m],AbLyd:[f,p,m],DLoc:[f,p,m],Ab:[f,p,m,g],Fm:[f,p,m,g],EbMix:[f,p,m,g],BbDor:[f,p,m,g],CPhr:[f,p,m,g],DbLyd:[f,p,m,g],GLoc:[f,p,m,g],Db:[f,p,m,g,v],Bbm:[f,p,m,g,v],AbMix:[f,p,m,g,v],EbDor:[f,p,m,g,v],FPhr:[f,p,m,g,v],GbLyd:[f,p,m,g,v],CLoc:[f,p,m,g,v],Gb:[f,p,m,g,v,b],Ebm:[f,p,m,g,v,b],DbMix:[f,p,m,g,v,b],AbDor:[f,p,m,g,v,b],BbPhr:[f,p,m,g,v,b],CbLyd:[f,p,m,g,v,b],FLoc:[f,p,m,g,v,b],Cb:[f,p,m,g,v,b,y],Abm:[f,p,m,g,v,b,y],GbMix:[f,p,m,g,v,b,y],DbDor:[f,p,m,g,v,b,y],EbPhr:[f,p,m,g,v,b,y],FbLyd:[f,p,m,g,v,b,y],BbLoc:[f,p,m,g,v,b,y],"A#":[f,p],"B#":[],"D#":[f,p,m],"E#":[f],"G#":[f,p,m,g],Gbm:[s,o,c,l,h,u,d],none:[]};return a.keySignature(n,w,e,t,r,i)};var c={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}},l=function(e,t){var n=c[e];return(n?n.mid:0)+t};s.fixClef=function(e){var t=c[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},s.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return r.each(e.accidentals,(function(e){t.accidentals.push(r.clone(e))})),t};var h={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};s.addPosToKey=function(e,t){var n=e.verticalPos;r.each(t.accidentals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),n<-10?(r.each(t.accidentals,(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&&r.each(t.impliedNaturals,(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)}))):n<-4?(r.each(t.accidentals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):n>=7&&(r.each(t.accidentals,(function(e){e.verticalPos+=7})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos+=7})))},s.fixKey=function(e,t){var n=r.clone(t);return s.addPosToKey(e,n),n};var u=function(e){var t=0,n=e.charAt(t++);"^"!==n&&"_"!==n||(n=e.charAt(t++));var r=h[n];for(void 0===r&&(r=6);t<e.length;t++)if(","===e.charAt(t))r-=7;else{if("'"!==e.charAt(t))break;r+=7}return{mid:r-6,str:e.substring(t)}};s.parseKey=function(r){0===r.length&&(r="none");var a=e.tokenize(r,0,r.length),o={};switch(a[0].token){case"HP":i.addDirective("bagpipes"),n.key={root:"HP",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"Hp":i.addDirective("bagpipes"),n.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"none":n.key={root:"none",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;default:var c=e.getKeyPitch(a[0].token);if(c.len>0){o.foundKey=!0;var h="",u="";a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift();var d=c.token;if(a.length>0){var f=e.getSharpFlat(a[0].token);if(f.len>0&&(a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift(),d+=f.token,h=f.token),a.length>0){var p=e.getMode(a[0].token);p.len>0&&(a.shift(),d+=p.token,u=p.token)}if(void 0===s.standardKey(d,c.token,h,0))return t("Unsupported key signature: "+d,r,0),o}var m=s.deepCopyKey(n.key),g=n.globalTranspose?-n.globalTranspose:0;if(n.key=s.deepCopyKey(s.standardKey(d,c.token,h,g)),n.key.mode=u,m){for(var v,b=0;b<n.key.accidentals.length;b++)for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&n.key.accidentals[b].note.toLowerCase()===m.accidentals[v].note.toLowerCase()&&(m.accidentals[v].note=null);for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&(n.key.impliedNaturals||(n.key.impliedNaturals=[]),n.key.impliedNaturals.push({acc:"natural",note:m.accidentals[v].note}))}}}if(0===a.length)return o;if("exp"===a[0].token&&a.shift(),0===a.length)return o;if("oct"===a[0].token&&a.shift(),0===a.length)return o;var y,w=e.getKeyAccidentals2(a);if(w.warn&&t(w.warn,r,0),w.accs){o.foundKey||(o.foundKey=!0,n.key={root:"none",acc:"",mode:"",accidentals:[]}),function(e){for(var t=0;t<e.length;t++)"b"===e[t].note?e[t].note="B":"a"===e[t].note?e[t].note="A":"F"===e[t].note?e[t].note="f":"E"===e[t].note?e[t].note="e":"D"===e[t].note?e[t].note="d":"C"===e[t].note?e[t].note="c":"G"===e[t].note&&"sharp"===e[t].acc?e[t].note="g":"g"===e[t].note&&"flat"===e[t].acc&&(e[t].note="G")}(w.accs);for(var x=0;x<w.accs.length;x++){for(var k=!1,A=0;A<n.key.accidentals.length&&!k;A++)n.key.accidentals[A].note===w.accs[x].note&&(k=!0,n.key.accidentals[A].acc!==w.accs[x].acc&&(n.key.accidentals[A].acc=w.accs[x].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x])));if(!k&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x]),n.key.accidentals.push(w.accs[x]),n.key.impliedNaturals))for(var T=0;T<n.key.impliedNaturals.length;T++)n.key.impliedNaturals[T].note===w.accs[x].note&&n.key.impliedNaturals.splice(T,1)}}for(;a.length>0;)switch(a[0].token){case"m":case"middle":if(a.shift(),0===a.length)return t("Expected = after middle",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after middle",r,y.start);break}if(0===a.length)return t("Expected parameter after middle=",r,0),o;var S=e.getPitchFromTokens(a);S.warn&&t(S.warn,r,0),S.position&&(n.clef.verticalPos=S.position-6);break;case"transpose":if(a.shift(),0===a.length)return t("Expected = after transpose",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after transpose",r,y.start);break}if(0===a.length)return t("Expected parameter after transpose=",r,0),o;if("number"!==a[0].type){t("Expected number after transpose",r,a[0].start);break}n.clef.transpose=a[0].intt,a.shift();break;case"stafflines":if(a.shift(),0===a.length)return t("Expected = after stafflines",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after stafflines",r,y.start);break}if(0===a.length)return t("Expected parameter after stafflines=",r,0),o;if("number"!==a[0].type){t("Expected number after stafflines",r,a[0].start);break}n.clef.stafflines=a[0].intt,a.shift();break;case"staffscale":if(a.shift(),0===a.length)return t("Expected = after staffscale",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after staffscale",r,y.start);break}if(0===a.length)return t("Expected parameter after staffscale=",r,0),o;if("number"!==a[0].type){t("Expected number after staffscale",r,a[0].start);break}n.clef.staffscale=a[0].floatt,a.shift();break;case"style":if(a.shift(),0===a.length)return t("Expected = after style",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after style",r,y.start);break}if(0===a.length)return t("Expected parameter after style=",r,0),o;switch(a[0].token){case"normal":case"harmonic":case"rhythm":case"x":n.style=a[0].token,a.shift();break;default:t("error parsing style element: "+a[0].token,r,a[0].start)}break;case"clef":if(a.shift(),0===a.length)return t("Expected = after clef",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after clef",r,y.start);break}if(0===a.length)return t("Expected parameter after clef=",r,0),o;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=a.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":M.token="alto";break;case"F":M.token="bass";break;case"G":M.token="treble";break;case"c":M.token="alto";break;case"f":M.token="bass";break;case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,r,M.start)}a.length>0&&"number"===a[0].type&&(M.token+=a[0].token,a.shift()),a.length>1&&("-"===a[0].token||"+"===a[0].token||"^"===a[0].token||"_"===a[0].token)&&"8"===a[1].token&&(M.token+=a[0].token+a[1].token,a.shift(),a.shift()),n.clef={type:M.token,verticalPos:l(M.token,0)},n.currentVoice&&void 0!==n.currentVoice.transpose&&(n.clef.transpose=n.currentVoice.transpose),o.foundClef=!0;break;default:t("Unknown parameter: "+a[0].token,r,a[0].start),a.shift()}return o};s.parseVoice=function(r,i,a){var s=e.getMeat(r,i,a),c=s.start,h=s.end,d=e.getToken(r,c,h);if(0!==d.length){var f=!1;void 0===n.voices[d]&&(n.voices[d]={},f=!0,n.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",r,c)),c+=d.length,c+=e.eatWhiteSpace(r,c);for(var p={startStaff:f},m=function(n){var i=e.getVoiceToken(r,c,h);void 0!==i.warn?t("Expected value for "+n+" in voice: "+i.warn,r,c):void 0!==i.err?t("Expected value for "+n+" in voice: "+i.err,r,c):0===i.token.length&&'"'!==r.charAt(c)?t("Expected value for "+n+" in voice",r,c):p[n]=i.token,c+=i.len},g=function(i,a,s){var o=e.getVoiceToken(r,c,h);void 0!==o.warn?t("Expected value for "+a+" in voice: "+o.warn,r,c):void 0!==o.err?t("Expected value for "+a+" in voice: "+o.err,r,c):0===o.token.length&&'"'!==r.charAt(c)?t("Expected value for "+a+" in voice",r,c):("number"===s&&(o.token=parseFloat(o.token)),n.voices[i][a]=o.token),c+=o.len},v=function(n,i){var a=e.getVoiceToken(r,c,h);if(void 0!==a.warn)t("Expected value for "+n+" in voice: "+a.warn,r,c);else if(void 0!==a.err)t("Expected value for "+n+" in voice: "+a.err,r,c);else{if(0!==a.token.length||'"'===r.charAt(c))return"number"===i&&(a.token=parseFloat(a.token)),a.token;t("Expected value for "+n+" in voice",r,c)}c+=a.len},b=function(i,a){var s=e.getVoiceToken(r,c,h);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+a+" in voice: "+s.warn,r,c);else if(0===s.token.length&&'"'!==r.charAt(c))t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?n.voices[i][a]=o:t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c)}c+=s.len};c<h;){var y=e.getVoiceToken(r,c,h);if(c+=y.len,y.warn)t("Error parsing voice: "+y.warn,r,c);else{var w=null;switch(y.token){case"clef":case"cl":m("clef");var x=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(x+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,x));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":p.clef=y.token.replace(/[',]/g,""),p.verticalPos=l(p.clef,0),n.voices[d].clef=y.token;break;case"staves":case"stave":case"stv":m("staves");break;case"brace":case"brc":m("brace");break;case"bracket":case"brk":m("bracket");break;case"name":case"nm":m("name");break;case"subname":case"sname":case"snm":m("subname");break;case"merge":p.startStaff=!1;break;case"stem":case"stems":void 0!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for stems in voice: "+w.warn,r,c):void 0!==w.err?t("Expected value for stems in voice: "+w.err,r,c):"up"===w.token||"down"===w.token?n.voices[d].stem=w.token:t("Expected up or down for voice stem",r,c),c+=w.len;break;case"up":case"down":n.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":n.voices[d].suppressChords=!0,"0"===(w=e.getVoiceToken(r,c,h)).token&&(c+=w.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale","number");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose","number");break;case"stafflines":g(d,"stafflines","number");break;case"staffscale":g(d,"staffscale","number");break;case"octave":g(d,"octave","number");break;case"volume":g(d,"volume","number");break;case"cue":var k=v("cue","string");n.voices[d].scale="on"===k?.6:1;break;case"style":void 0!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for style in voice: "+w.warn,r,c):void 0!==w.err?t("Expected value for style in voice: "+w.err,r,c):"normal"===w.token||"harmonic"===w.token||"rhythm"===w.token||"x"===w.token?n.voices[d].style=w.token:t("Expected one of [normal, harmonic, rhythm, x] for voice style",r,c),c+=w.len}}c+=e.eatWhiteSpace(r,c)}if((p.startStaff||0===n.staves.length)&&(n.staves.push({index:n.staves.length,meter:n.origMeter}),n.score_is_present||(n.staves[n.staves.length-1].numVoices=0)),void 0===n.voices[d].staffNum){n.voices[d].staffNum=n.staves.length-1;var A=0;for(var T in n.voices)n.voices.hasOwnProperty(T)&&n.voices[T].staffNum===n.voices[d].staffNum&&A++;n.voices[d].index=A-1}var S=n.staves[n.voices[d].staffNum];n.score_is_present||S.numVoices++,p.clef&&(S.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(S.spacing_below_offset=p.spacing),p.verticalPos&&(S.verticalPos=p.verticalPos),p.name&&(S.name?S.name.push(p.name):S.name=[p.name]),p.subname&&(S.subname?S.subname.push(p.subname):S.subname=[p.subname]),function(e){n.currentVoice=n.voices[e],o.setCurrentVoice(n.currentVoice.staffNum,n.currentVoice.index)}(d)}else t("Expected a voice id",r,c)}}(),e.exports=s},function(e,t){e.exports=function(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}},function(e,t,n){var r,i=n(3);!function(){"use strict";function e(){this.ingroup=!1}e.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0},e.prototype.isInGroup=function(){return this.ingroup},e.prototype.addPath=function(e){if(0!==(e=e||[]).length){e[0][0]="m",e[0][1]=i(e[0][1]-this.lastM[0]),e[0][2]=i(e[0][2]-this.lastM[1]),this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,n=e.length;t<n;t++)"m"===e[t][0]&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}},e.prototype.endGroup=function(e){if(this.ingroup=!1,0===this.path.length)return null;for(var t="",n=0;n<this.path.length;n++)t+=this.path[n].join(" ");var r=this.paper.path({path:t,stroke:"none",fill:"#000000",class:this.controller.classes.generate(e)});return this.path=[],r},r=new e}(),e.exports=r},function(e,t,n){function r(e){return(r="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})(e)}var i=n(15),a=n(36),s={};!function(){"use strict";s.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=s.TuneBook=function(e){var t=a(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].id===""+e)return this.tunes[t];return null},e.prototype.getTuneByTitle=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].title===e)return this.tunes[t];return null},s.parseOnly=function(e,t){for(var n=s.numberOfTunes(e),r=[],i=0;i<n;i++)r.push(1);return s.renderEngine((function(){}),r,e,t)},s.renderEngine=function(t,n,a,s){var o=[];if(void 0!==n&&void 0!==a){var c;(!(c=n)||c.propertyIsEnumerable("length")||"object"!==r(c)||"number"!=typeof c.length)&&(n=[n]),void 0===s&&(s={});for(var l=s.startingTune?parseInt(s.startingTune,10):0,h=new e(a),u=new i,d=0;d<n.length;d++){var f=n[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<h.tunes.length){u.parse(h.tunes[l].abc,s,h.tunes[l].startPos-h.header.length);var p=u.getTune(),m=u.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,h.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},s.extractMeasures=function(t){for(var n=[],r=new e(t),i=0;i<r.tunes.length;i++){for(var a=r.tunes[i],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",h=null,u=null,d=null,f=[],p=!1,m=s.parseOnly(a.abc)[0],g=m.getPickupLength()>0,v=0;v<m.lines.length;v++){var b=m.lines[v];if(b.staff)for(var y=0;y<1;y++)for(var w=b.staff[y],x=0;x<1;x++)for(var k=w.voices[x],A=0;A<k.length;A++){var T=k[A];if(null===d&&T.startChar>=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:a.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)}}n.push({header:l,measures:f,hasPickup:g})}return n}}(),e.exports=s},function(e,t,n){var r=n(0),i=n(10),a=n(31),s=n(11),o=n(32),c=n(16),l=n(17),h=n(18),u=n(35);e.exports=function(){"use strict";var e=new h,t=new u(e),n=new o;function d(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function f(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){var t={formatting:e.formatting,lines:e.lines,media:e.media,metaText:e.metaText,version:e.version,addElementToEvents:e.addElementToEvents,addUsefulCallbackInfo:e.addUsefulCallbackInfo,getBarLength:e.getBarLength,getBeatLength:e.getBeatLength,getBeatsPerMeasure:e.getBeatsPerMeasure,getBpm:e.getBpm,getMeter:e.getMeter,getMeterFraction:e.getMeterFraction,getPickupLength:e.getPickupLength,getKeySignature:e.getKeySignature,getElementFromChar:e.getElementFromChar,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio};return e.visualTranspose&&(t.visualTranspose=e.visualTranspose),t};var p={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.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.is_in_history=!1,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.inTextBlock=!1,this.inPsBlock=!1,this.ignoredDecorations=[],this.textBlock="",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,n){"note"===n?("auto"!==this.vocalPosition&&d(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&f(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&f(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&f(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&f(e,"tripletfont",this.tripletfont)):"bar"===n&&("auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&f(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&f(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++){this.endingHoldOver.inTie.push([]);for(var t=0;t<this.inTie[e].length;t++)this.endingHoldOver.inTie[e].push(this.inTie[e][t])}for(var n in this.inTieChord)this.inTieChord.hasOwnProperty(n)&&(this.endingHoldOver.inTieChord[n]=this.inTieChord[n])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var e=0;e<this.endingHoldOver.inTie.length;e++){this.inTie.push([]);for(var t=0;t<this.endingHoldOver.inTie[e].length;t++)this.inTie[e].push(this.endingHoldOver.inTie[e][t])}for(var n in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(n)&&(this.inTieChord[n]=this.endingHoldOver.inTieChord[n])}}},m=function(e){var t=r.gsub(e,""," ");return t=r.gsub(t,"&","&amp;"),t=r.gsub(t,"<","&lt;"),r.gsub(t,">","&gt;")},g=function(e,n,r){n||(n=" ");var i=n.charAt(r);" "===i&&(i="SPACE");var a,s=m(n.substring(0,r))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+i+"</span>"+m(n.substring(r+1));!function(e){p.warnings||(p.warnings=[]),p.warnings.push(e)}("Music Line:"+t.getNumLines()+":"+(r+1)+": "+e+": "+s),a={message:e,line:n,startChar:p.iChar+r,column:r},p.warningObjects||(p.warningObjects=[]),p.warningObjects.push(a)},v=new a(n,g,p,e,t);this.getWarnings=function(){return p.warnings},this.getWarningObjects=function(){return p.warningObjects};var b=function(e,t){if('"'===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||g("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1].charAt(0)){r[1]=r[1].substring(1);var i=n.getFloat(r[1]);0===i.digits&&g("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(i.digits),","!==r[1][0]&&g("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var a=n.getFloat(r[1]);0===a.digits&&g("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(a.digits);var s=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(s),r[2]=null,r[3]={x:i.value,y:a.value}}else!0!==p.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]=c.chordName(p,r[1]);return r}return[0,""]},y=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x"],w=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],x=["crescendo(","crescendo)","diminuendo(","diminuendo)"],k=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],A=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],T=function(e,t){var i=p.macros[e.charAt(t)];if(void 0!==i)return"!"!==i.charAt(0)&&"+"!==i.charAt(0)||(i=i.substring(1)),"!"!==i.charAt(i.length-1)&&"+"!==i.charAt(i.length-1)||(i=i.substring(0,i.length-1)),r.detect(y,(function(e){return i===e}))?[1,i]:r.detect(w,(function(e){return i===e}))?("hidden"===p.volumePosition&&(i=""),[1,i]):r.detect(x,(function(e){return"hidden"===p.dynamicPosition&&(i=""),i===e}))?[1,i]:(r.detect(p.ignoredDecorations,(function(e){return i===e}))||g("Unknown macro: "+i,e,t),[1,""]);switch(e.charAt(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 a=n.getBrackettedSubstring(e,t,5);return a[1].length>1&&("^"===a[1].charAt(0)||"_"===a[1].charAt(0))&&(a[1]=a[1].substring(1)),r.detect(y,(function(e){return a[1]===e}))?a:r.detect(w,(function(e){return a[1]===e}))?("hidden"===p.volumePosition&&(a[1]=""),a):r.detect(x,(function(e){return a[1]===e}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):r.detect(k,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?a:r.detect(A,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):"!"!==e.charAt(t)||1!==a[0]&&"!"===e.charAt(t+a[0]-1)?(g("Unknown decoration: "+a[1],e,t),a[1]="",a):[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]},S=function(e,t){for(var r=t;n.isWhiteSpace(e.charAt(t));)t++;return[t-r]},M=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return g(r.warn,e,t),[r.len,""];for(var i=0;i<e.length&&" "===e.charAt(t+r.len+i);i++);var a=r.len;if("["===e.charAt(t+r.len+i)&&(r.len+=i+1),'"'===e.charAt(t+r.len)&&"["===e.charAt(t+r.len-1)){var s=n.getBrackettedSubstring(e,t+r.len,5);return[r.len+s[0],r.token,s[1]]}var o=n.getTokenOf(e.substring(t+r.len),"1234567890-,");return 0===o.len||"-"===o.token[0]?[a,r.token]:[r.len+o.len,r.token,o.token]},N={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2},C=function(e,t){var r={},i=t;for("."===e[t]&&"("===e[t+1]&&(r.dottedSlur=!0,t++);"("===e.charAt(t)||n.isWhiteSpace(e.charAt(t));)"("===e.charAt(t)&&(t+1<e.length&&e.charAt(t+1)>="2"&&e.charAt(t+1)<="9"?(void 0!==r.triplet?g("Can't nest triplets",e,t):(r.triplet=e.charAt(t+1)-"0",r.tripletQ=N[r.triplet],r.num_notes=r.triplet,t+2<e.length&&":"===e.charAt(t+2)&&(t+3<e.length&&":"===e.charAt(t+3)?t+4<e.length&&e.charAt(t+4)>="1"&&e.charAt(t+4)<="9"?(r.num_notes=e.charAt(t+4)-"0",t+=3):g("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e.charAt(t+3)>="1"&&e.charAt(t+3)<="9"?(r.tripletQ=e.charAt(t+3)-"0",t+4<e.length&&":"===e.charAt(t+4)?t+5<e.length&&e.charAt(t+5)>="1"&&e.charAt(t+5)<="9"&&(r.num_notes=e.charAt(t+5)-"0",t+=4):t+=2):g("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},E=function(e,t){switch(e.charAt(t)){case">":return t<e.length-1&&">"===e.charAt(t+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-1&&"<"===e.charAt(t+1)?[2,.25,1.75]:[1,.5,1.5]}return null},I=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},_={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},B={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},P=function(r,i,a,s){var o,l=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===r[i]&&"-"===r[i+1]&&(o=!0,i++);for(var h="startSlur",u=!1;;){switch(r.charAt(i)){case"(":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;void 0===a.startSlur?a.startSlur=1:a.startSlur++;break;case")":if(!l(h))return null;void 0===a.endSlur?a.endSlur=1:a.endSlur++;break;case"^":if("startSlur"===h)a.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)a.accidental="flat",h="flat2";else{if("flat2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="natural",h="pitch";break;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":if("startSlur"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return l(h)?(a.endChar=i,a):null;if(a.pitch=_[r.charAt(i)],c.note(p,a),h="octave",s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,p.clef&&"perc"===p.clef.type||p.currentVoice&&"perc"===p.currentVoice.clef){var d=r.charAt(i);if(a.accidental){d={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[a.accidental]+d}e.formatting&&e.formatting.midi&&e.formatting.midi.drummap&&(a.midipitch=e.formatting.midi.drummap[d])}else p.clef&&p.clef.type.indexOf("-")>=0?a.soundPitch=a.pitch-7:p.clef&&p.clef.type.indexOf("+")>=0&&(a.soundPitch=a.pitch+7);break;case",":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch-=7,void 0!==a.soundPitch&&(a.soundPitch-=7);break;case"'":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch+=7,void 0!==a.soundPitch&&(a.soundPitch+=7);break;case"x":case"y":case"z":case"Z":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.rest={type:B[r.charAt(i)]},delete a.accidental,delete a.startSlur,delete a.startTie,delete a.endSlur,delete a.endTie,delete a.end_beam,delete a.grace_notes,"multimeasure"===a.rest.type?(a.duration=e.getBarLength(),a.rest.text=1,h="Zduration"):(s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,h="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"===h||"duration"===h){var f=n.getFraction(r,i);for(a.duration=a.duration*f.value,a.endChar=f.index;f.index<r.length&&(n.isWhiteSpace(r.charAt(f.index))||"-"===r.charAt(f.index));)"-"===r.charAt(f.index)?a.startTie={}:a=I(a),f.index++;i=f.index-1,h="broken_rhythm"}else if("sharp2"===h)a.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var m=n.getNumber(r,i);return a.duration=m.num*e.getBarLength(),a.rest.text=m.num,a.endChar=m.index,a}return null}a.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)t.addTieToLastNote(o),a.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(a.endChar=i,a):null;if(a.startTie={},u||!s)return n.isWhiteSpace(r.charAt(i+1))&&I(a),a.endChar=i+1,a;h="broken_rhythm"}break;case" ":case"\t":if(!l(h))return null;a.end_beam=!0,o=!1;do{"."===r.charAt(i)&&"-"===r.charAt(i+1)&&(o=!0,i++),"-"===r.charAt(i)&&(a.startTie={},o&&(a.startTie.style="dotted")),i++}while(i<r.length&&(n.isWhiteSpace(r.charAt(i))||"-"===r.charAt(i))||"."===r.charAt(i)&&"-"===r.charAt(i+1));if(a.endChar=i,u||!s||"<"!==r.charAt(i)&&">"!==r.charAt(i))return a;i--,h="broken_rhythm";break;case">":case"<":if(!l(h))return null;if(!s)return a.endChar=i,a;var g=E(r,i);i+=g[0]-1,p.next_note_duration=g[2],a.duration=g[1]*a.duration,h="end_slur";break;default:return l(h)?(a.endChar=i,a):null}if(++i===r.length)return l(h)?(a.endChar=i,a):null}return null};function D(){var e={startChar:-1,endChar:-1};p.partForNextLine.title&&(e.part=p.partForNextLine),e.clef=p.currentVoice&&void 0!==p.staves[p.currentVoice.staffNum].clef?r.clone(p.staves[p.currentVoice.staffNum].clef):r.clone(p.clef);var n=p.currentVoice?p.currentVoice.scoreTranspose:0;if(e.key=s.standardKey(p.key.root+p.key.acc+p.key.mode,p.key.root,p.key.acc,n),e.key.mode=p.key.mode,p.key.impliedNaturals&&(e.key.impliedNaturals=p.key.impliedNaturals),p.key.explicitAccidentals)for(var i=0;i<p.key.explicitAccidentals.length;i++){for(var a=!1,o=0;o<e.key.accidentals.length;o++)e.key.accidentals[o].note===p.key.explicitAccidentals[i].note&&(e.key.accidentals[o].acc=p.key.explicitAccidentals[i].acc,a=!0);a||e.key.accidentals.push(p.key.explicitAccidentals[i])}if(p.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,s.addPosToKey(e.clef,e.key),null!==p.meter?(p.currentVoice?(r.each(p.staves,(function(e){e.meter=p.meter})),e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null):e.meter=p.meter,p.meter=null):p.currentVoice&&p.staves[p.currentVoice.staffNum].meter&&(e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null),p.currentVoice&&p.currentVoice.name&&(e.name=p.currentVoice.name),p.vocalfont&&(e.vocalfont=p.vocalfont),p.tripletfont&&(e.tripletfont=p.tripletfont),p.gchordfont&&(e.gchordfont=p.gchordfont),p.style&&(e.style=p.style),p.currentVoice){var c=p.staves[p.currentVoice.staffNum];c.brace&&(e.brace=c.brace),c.bracket&&(e.bracket=c.bracket),c.connectBarLines&&(e.connectBarLines=c.connectBarLines),c.name&&(e.name=c.name[p.currentVoice.index]),c.subname&&(e.subname=c.subname[p.currentVoice.index]),p.currentVoice.stem&&(e.stem=p.currentVoice.stem),p.currentVoice.stafflines&&(e.stafflines=p.currentVoice.stafflines),p.currentVoice.staffscale&&(e.staffscale=p.currentVoice.staffscale),p.currentVoice.scale&&(e.scale=p.currentVoice.scale),p.currentVoice.style&&(e.style=p.currentVoice.style),p.currentVoice.transpose&&(e.clef.transpose=p.currentVoice.transpose)}var l=void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index;0===p.barNumbers&&l&&1!==p.currBarNumber&&(e.barNumber=p.currBarNumber),t.startNewLine(e),p.key.impliedNaturals&&delete p.key.impliedNaturals,p.partForNextLine={},4===p.tempoForNextLine.length&&t.appendElement(p.tempoForNextLine[0],p.tempoForNextLine[1],p.tempoForNextLine[2],p.tempoForNextLine[3]),p.tempoForNextLine=[]}var L=function(e,t){if("{"===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||g("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var i=[],a=0,s=!1;a<r[1].length;){var o=!1;"/"===r[1].charAt(a)&&(o=!0,a++);var c=P(r[1],a,{},!1);null!==c?(c.duration=c.duration/(8*p.default_length),o&&(c.acciaccatura=!0),i.push(c),s&&(c.endTie=!0,s=!1),c.startTie&&(s=!0),a=c.endChar,delete c.endChar):(" "===r[1].charAt(a)?i.length>0&&(i[i.length-1].end_beam=!0):g("Unknown character '"+r[1].charAt(a)+"' while parsing grace note",e,t),a++)}if(i.length)return[r[0],i]}return[0]};function O(e,t){if("&"===e.charAt(t)){for(var n=t;e.charAt(t)&&":"!==e.charAt(t)&&"|"!==e.charAt(t);)t++;return[t-n,e.substring(n+1,t)]}return[0]}function H(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 V=function(e,t,n){if(void 0===e.inTie[t])return!1;var r=e.currentVoice?e.currentVoice.index:0;return!(!e.inTie[t][r]||void 0===n.pitches&&"spacer"===n.rest.type)},F=function(e,t,n){var r=e.currentVoice?e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][r]=n},z=function i(a){var s=v.parseHeader(a);s.regular&&function(i){v.resolveTempo(),p.is_in_header=!1;for(var a=0,s=p.iChar;n.isWhiteSpace(i.charAt(a))&&a<i.length;)a++;if(a!==i.length&&"%"!==i.charAt(a)){var o=p.start_new_line;void 0===p.continueall?p.start_new_line=!0:p.start_new_line=!1;var c=0,l=v.letter_to_body_header(i,a);l[0]>0&&(a+=l[0],"V"===l[1]&&(o=!0));for(var h={},u=0;a<i.length;){var d=a;if("%"===i.charAt(a))break;var f=v.letter_to_inline_header(i,a);if(f[0]>0)a+=f[0],"V"===f[1]&&(o=!0);else{var m;for(o&&(D(),o=!1);;)if((m=n.eatWhiteSpace(i,a))>0&&(a+=m),a>0&&""===i.charAt(a-1)&&(m=v.letter_to_body_header(i,a))[0]>0&&("V"===m[1]&&D(),a=m[0],p.start_new_line=!1),(m=S(i,a))[0]>0&&(a+=m[0]),(m=b(i,a))[0]>0){h.chord||(h.chord=[]);var y=n.translateString(m[1]);y=y.replace(/;/g,"\n");for(var w=!1,x=0;x<h.chord.length;x++)h.chord[x].position===m[2]&&(w=!0,h.chord[x].name+="\n"+y);!1===w&&(null===m[2]&&m[3]?h.chord.push({name:y,rel_position:m[3]}):h.chord.push({name:y,position:m[2]})),a+=m[0];var k=n.skipWhiteSpace(i.substring(a));k>0&&(h.force_end_beam_last=!0),a+=k}else if((m=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(i.charAt(a))?T(i,a):[0])[0]>0)null===m[1]?a+1<i.length&&D():m[1].length>0&&(0===m[1].indexOf("style=")?h.style=m[1].substr(6):(void 0===h.decoration&&(h.decoration=[]),"beambr1"===m[1]?h.beambr=1:"beambr2"===m[1]?h.beambr=2:h.decoration.push(m[1]))),a+=m[0];else{if(!((m=L(i,a))[0]>0))break;h.gracenotes=m[1],a+=m[0]}if((m=M(i,a))[0]>0){u=0,void 0!==h.gracenotes&&(h.rest={type:"spacer"},h.duration=.125,p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+a,s+a+m[0],h),p.measureNotEmpty=!0,h={});var A={type:m[1]};if(0===A.type.length)g("Unknown bar type",i,a);else{if(p.inEnding&&"bar_thin"!==A.type&&(A.endEnding=!0,p.inEnding=!1),m[2]&&(A.startEnding=m[2],p.inEnding&&(A.endEnding=!0),p.inEnding=!0,"bar_right_repeat"===m[1]?p.restoreStartEndingHoldOvers():p.duplicateStartEndingHoldOvers()),void 0!==h.decoration&&(A.decoration=h.decoration),void 0!==h.chord&&(A.chord=h.chord),A.startEnding&&void 0===p.barFirstEndingNum?p.barFirstEndingNum=p.currBarNumber:A.startEnding&&A.endEnding&&p.barFirstEndingNum?p.currBarNumber=p.barFirstEndingNum:A.endEnding&&(p.barFirstEndingNum=void 0),"bar_invisible"!==A.type&&p.measureNotEmpty)(void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index)&&(p.currBarNumber++,p.barNumbers&&p.currBarNumber%p.barNumbers==0&&(A.barNumber=p.currBarNumber));p.addFormattingOptions(h,e.formatting,"bar"),t.appendElement("bar",s+a,s+a+m[0],A),p.measureNotEmpty=!1,h={}}a+=m[0]}else if("&"===i[a])(m=O(i,a))[0]>0&&(t.appendElement("overlay",s,s+1,{}),a+=1,u++);else{if((m=C(i,a)).consumed>0&&(void 0!==m.startSlur&&(h.startSlur=m.startSlur),m.dottedSlur&&(h.dottedSlur=!0),void 0!==m.triplet&&(c>0?g("Can't nest triplets",i,a):(h.startTriplet=m.triplet,h.tripletMultiplier=m.tripletQ/m.triplet,c=void 0===m.num_notes?m.triplet:m.num_notes)),a+=m.consumed),"["===i.charAt(a)){var N=a;a++;for(var _=null,B=!1,z=!1;!z;){var j=T(i,a);j[0]>0&&(a+=j[0]);var q=P(i,a,{},!1);if(null!==q&&void 0!==q.pitch)j[0]>0&&0!==j[1].indexOf("style=")&&(void 0===h.decoration&&(h.decoration=[]),h.decoration.push(j[1])),q.end_beam&&(h.end_beam=!0,delete q.end_beam),void 0===h.pitches?(h.duration=q.duration,h.pitches=[q]):h.pitches.push(q),delete q.duration,j[0]>0&&0===j[1].indexOf("style=")&&(h.pitches[h.pitches.length-1].style=j[1].substr(6)),p.inTieChord[h.pitches.length]&&(q.endTie=!0,p.inTieChord[h.pitches.length]=void 0),q.startTie&&(p.inTieChord[h.pitches.length]=!0),a=q.endChar,delete q.endChar;else if(" "===i.charAt(a))g("Spaces are not allowed in chords",i,a),a++;else{if(a<i.length&&"]"===i.charAt(a)){a++,0!==p.next_note_duration&&(h.duration=h.duration*p.next_note_duration,p.next_note_duration=0),V(p,u,h)&&(r.each(h.pitches,(function(e){e.endTie=!0})),F(p,u,!1)),c>0&&(!h.rest||"spacer"!==h.rest.type)&&0===--c&&(h.endTriplet=!0);for(var Y=!1;a<i.length&&!Y;){switch(i.charAt(a)){case" ":case"\t":I(h);break;case")":void 0===h.endSlur?h.endSlur=1:h.endSlur++;break;case"-":r.each(h.pitches,(function(e){e.startTie={}})),F(p,u,!0);break;case">":case"<":var W=E(i,a);a+=W[0]-1,p.next_note_duration=W[2],_?_*=W[1]:_=W[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var R=n.getFraction(i,a);_=R.value,a=R.index," "===i.charAt(a)&&(B=!0),"-"===i.charAt(a)||")"===i.charAt(a)||" "===i.charAt(a)||"<"===i.charAt(a)||">"===i.charAt(a)?a--:Y=!0;break;default:Y=!0}Y||a++}}else g("Expected ']' to end the chords",i,a);void 0!==h.pitches&&(null!==_&&(h.duration=h.duration*_,B&&I(h)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+N,s+a,h),p.measureNotEmpty=!0,h={}),z=!0}}}else{var G={},U=P(i,a,G,!0);void 0!==G.endTie&&F(p,u,!0),null!==U&&(void 0!==U.pitch?(h.pitches=[{}],void 0!==U.accidental&&(h.pitches[0].accidental=U.accidental),h.pitches[0].pitch=U.pitch,(U.soundPitch||0===U.soundPitch)&&(h.pitches[0].soundPitch=U.soundPitch),(U.midipitch||0===U.midipitch)&&(h.pitches[0].midipitch=U.midipitch),void 0!==U.endSlur&&(h.pitches[0].endSlur=U.endSlur),void 0!==U.endTie&&(h.pitches[0].endTie=U.endTie),void 0!==U.startSlur&&(h.pitches[0].startSlur=U.startSlur),void 0!==h.startSlur&&(h.pitches[0].startSlur=h.startSlur),void 0!==h.dottedSlur&&(h.pitches[0].dottedSlur=!0),void 0!==U.startTie&&(h.pitches[0].startTie=U.startTie),void 0!==h.startTie&&(h.pitches[0].startTie=h.startTie)):(h.rest=U.rest,void 0!==U.endSlur&&(h.endSlur=U.endSlur),void 0!==U.endTie&&(h.rest.endTie=U.endTie),void 0!==U.startSlur&&(h.startSlur=U.startSlur),void 0!==U.startTie&&(h.rest.startTie=U.startTie),void 0!==h.startTie&&(h.rest.startTie=h.startTie)),void 0!==U.chord&&(h.chord=U.chord),void 0!==U.duration&&(h.duration=U.duration),void 0!==U.decoration&&(h.decoration=U.decoration),void 0!==U.graceNotes&&(h.graceNotes=U.graceNotes),delete h.startSlur,delete h.dottedSlur,V(p,u,h)&&(void 0!==h.pitches?h.pitches[0].endTie=!0:"spacer"!==h.rest.type&&(h.rest.endTie=!0),F(p,u,!1)),(U.startTie||h.startTie)&&F(p,u,!0),a=U.endChar,c>0&&(!U.rest||"spacer"!==U.rest.type)&&0===--c&&(h.endTriplet=!0),U.end_beam&&I(h),h.rest&&"rest"===h.rest.type&&1===h.duration&&H(p)<=1&&(h.rest.type="whole",h.duration=H(p)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+d,s+a,h),p.measureNotEmpty=!0,h={})}a===d&&(" "!==i.charAt(a)&&"`"!==i.charAt(a)&&g("Unknown character ignored",i,a),a++)}}}}}(s.str),s.newline&&D(),s.words&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.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}r.each(e,(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 g("Can't add words before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.symbols&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.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}r.each(e,(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 g("Can't add symbols before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.recurse&&i(s.str)};function j(e,t){e.push({el_type:"hint"});for(var n=0;n<t.length;n++){var i=t[n],a=r.clone(i);if(e.push(a),"bar"===i.el_type)return}}function q(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(i)for(var a=0;a<i.voices.length;a++){var s=i.voices[a],o=r.voices[a];o&&j(o,s)}}}this.parse=function(a,s,o){if(s||(s={}),o||(o=0),t.reset(),s.print&&(e.media="print"),p.reset(),p.iChar=o,s.visualTranspose?(p.globalTranspose=parseInt(s.visualTranspose),0===p.globalTranspose?p.globalTranspose=void 0:t.setVisualTranspose(s.visualTranspose)):p.globalTranspose=void 0,s.lineBreaks){p.lineBreaks={};for(var c=0;c<s.lineBreaks.length;c++)p.lineBreaks[""+(s.lineBreaks[c]+1)]=!0}v.reset(n,g,p,e),a=r.gsub(a,"\r\n","\n"),a=r.gsub(a,"\r","\n");var h=(a+="\n").split("\n\\");if(h.length>1){for(var u=1;u<h.length;u++)for(;h[u].length>0&&"\n"!==h[u][0];)h[u]=h[u].substr(1),h[u-1]+=" ";a=h.join(" ")}var d=(a=a.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+" "+(n?" ".substring(0,n.length):"")}))).split("\n");0===r.last(d).length&&d.pop();try{s.format&&i.globalFormatting(s.format),r.each(d,(function(e){if(s.header_only&&!1===p.is_in_header)throw"normal_abort";if(s.stop_on_warning&&p.warnings)throw"normal_abort";if(p.is_in_history)":"===e.charAt(1)?(p.is_in_history=!1,z(e)):t.addMetaText("history",n.translateString(n.stripComment(e)));else if(p.inTextBlock)r.startsWith(e,"%%endtext")?(t.addText(p.textBlock),p.inTextBlock=!1):r.startsWith(e,"%%")?p.textBlock+=e.substring(2)+"\n":p.textBlock+=e+"\n";else if(p.inPsBlock)r.startsWith(e,"%%endps")?p.inPsBlock=!1:p.textBlock+=" "+e;else{var i=p.is_in_header;z(e),i&&!p.is_in_header&&(t.setRunningFont("annotationfont",p.annotationfont),t.setRunningFont("gchordfont",p.gchordfont),t.setRunningFont("tripletfont",p.tripletfont),t.setRunningFont("vocalfont",p.vocalfont))}p.iChar+=e.length+1}));var f=792,m=612;switch(p.papersize){case"legal":f=1008,m=612;break;case"A4":f=842.4,m=597.6}if(p.landscape){var b=f;f=m,m=b}p.openSlurs=t.cleanUp(m,f,p.barsperstaff,p.staffnonote,p.openSlurs)}catch(e){if("normal_abort"!==e)throw e}s.hint_measures&&function(){for(var t=0;t<e.lines.length;t++){var n=e.lines[t].staff;if(n){for(var r=t+1;r<e.lines.length&&void 0===e.lines[r].staff;)r++;if(r<e.lines.length)q(n,e.lines[r].staff)}}}(),l.wrapLines(e,p.lineBreaks)}}},function(e,t){var n={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},i=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];n.keySignature=function(e,t,n,s,o,c){if("perc"===e.clef.type)return{accidentals:t[n],root:s,acc:o};c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=t[n];if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:s,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:s,acc:o};var h=n[0];"b"===n[1]||"#"===n[1]?(h+=n[1],n=n.substr(2)):n=n.substr(1);for(var u=r[h]+e.localTranspose;u<0;)u+=12;u>11&&(u%=12);var d="m"===n[0]?a[u]:i[u],f=d+n,p=t[f];p.length>0&&"flat"===p[0].acc&&(e.localTransposePreferFlats=!0);var m=f.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?m<0?m+=7:0===m&&("#"!==h[1]&&"b"!==f[1]||(m+=7)):e.localTranspose<0&&(m>0?m-=7:0===m&&("b"!==h[1]&&"#"!==f[1]||(m-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=m+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=m+7*Math.ceil(e.localTranspose/12),{accidentals:p,root:d[0],acc:d.length>1?d[1]:""}};var s=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],o=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],l=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];n.chordName=function(e,t){if(e.localTranspose&&e.localTranspose%12!=0){for(var n=e.localTranspose;n<0;)n+=12;n>11&&(n%=12);for(var r=(t=(t=(t=(t=(t=(t=(t=(t=e.freegchord?(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/Cb/g,"`~11`")).replace(/Db/g,"`~1`")).replace(/Eb/g,"`~3`")).replace(/Fb/g,"`~4`")).replace(/Gb/g,"`~6`")).replace(/Ab/g,"`~8`")).replace(/Bb/g,"`~10`")).replace(/C#/g,"`~1`")).replace(/D#/g,"`~3`")).replace(/E#/g,"`~5`")).replace(/F#/g,"`~6`")).replace(/G#/g,"`~8`")).replace(/A#/g,"`~10`")).replace(/B#/g,"`~0`"):(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/C♭/g,"`~11`")).replace(/D♭/g,"`~1`")).replace(/E♭/g,"`~3`")).replace(/F♭/g,"`~4`")).replace(/G♭/g,"`~6`")).replace(/A♭/g,"`~8`")).replace(/B♭/g,"`~10`")).replace(/C♯/g,"`~1`")).replace(/D♯/g,"`~3`")).replace(/E♯/g,"`~5`")).replace(/F♯/g,"`~6`")).replace(/G♯/g,"`~8`")).replace(/A♯/g,"`~10`")).replace(/B♯/g,"`~0`")).replace(/C/g,"`~0`")).replace(/D/g,"`~2`")).replace(/E/g,"`~4`")).replace(/F/g,"`~5`")).replace(/G/g,"`~7`")).replace(/A/g,"`~9`")).replace(/B/g,"`~11`")).split("`"),i=0;i<r.length;i++)if("~"===r[i][0]){var a=parseInt(r[i].substr(1),10);(a+=n)>11&&(a-=12),e.freegchord?r[i]=e.localTransposePreferFlats?l[a]:c[a]:r[i]=e.localTransposePreferFlats?o[a]:s[a]}t=r.join("")}return t};var h=["c","d","e","f","g","a","b"];var u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"};n.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var n=t.pitch;if(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.accidental){var r=function(e,t,n,r,i){for(var a=h[(e+49)%7],s=0,o=0;o<r.length;o++)r[o].note.toLowerCase()===a&&(s=u[r[o].acc]);for(var c=u[n]-s,l=h[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===l&&(d=u[i.accidentals[f].acc]);var p=c+d;return p<-2&&(t--,p+="c"===l||"f"===l?1:2),p>2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(n,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=r[0],t.accidental=d[r[1]]}}},e.exports=n},function(e,t){function n(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function r(e,t,r,i,a,s,o,c,l,h,u){for(var d=h;d<e.length;d++){var f=e[d];r+=f,i+=f;var p=Math.abs(r-t[c]);if(Math.abs(p-s)<t[0]/10)if(p<s){var m=n(a),g=n(l);g.push(d-1),m.push(i-f),u.push({accumulator:r,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(r-t[c+1]),highestVariance:Math.max(o,s),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>s&&d<e.length-1&&(m=n(a),g=n(l),u.push({accumulator:r,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>s?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(r-t[c]),a.push(i-f),i=f):s=p}a.push(i)}function i(e,t,n,r,i){var a=new i,s={lineBreaks:e,staffwidth:t};for(var o in r)r.hasOwnProperty(o)&&"wrap"!==o&&"staffwidth"!==o&&(s[o]=r[o]);return a.parse(n,s),{tune:a.getTune(),revisedParams:s}}e.exports={wrapLines:function(e,t){if(t&&0!==e.lines.length){for(var n=[],r=[],i=[],a=[],s=[],o="",c={},l=0,h=0;h<e.lines.length;h++){var u=e.lines[h];if(u.staff){for(var d=u.staff,f=0;f<d.length;f++){void 0===r[f]&&(r[f]=[],i[f]=[],a[f]=[],s[f]=[]);for(var p=d[f],m=p.voices,g=0;g<m.length;g++){void 0===r[f][g]&&(r[f][g]=!0,i[f][g]=0,a[f][g]=0,s[f][g]=0),l>0&&(i[f][g]+=l);for(var v=m[g],b=0;b<v.length;b++){if(r[f][g]){if(n[i[f][g]]||(n[i[f][g]]={staff:[]}),!n[i[f][g]].staff[f])for(var y in n[i[f][g]].staff[f]={voices:[]},p)p.hasOwnProperty(y)&&("meter"===y?0!==i[f][g]&&o===JSON.stringify(p[y])||(o=JSON.stringify(p[y]),n[i[f][g]].staff[f][y]=p[y]):"voices"!==y&&(n[i[f][g]].staff[f][y]=p[y]));s[f][g]&&(n[i[f][g]].staff[f].barNumber=s[f][g]),r[f][g]=!1}var w=v[b];if(!n[i[f][g]].staff[f].voices[g])for(var x in n[i[f][g]].staff[f].voices[g]=[],c)c.hasOwnProperty(x)&&n[i[f][g]].staff[f].voices[g].push(c[x]);n[i[f][g]].staff[f].voices[g].push(w),"stem"===w.el_type&&(c[w.el_type]=w),"bar"===w.el_type&&(a[f][g]++,t[a[f][g]]&&(r[f][g]=!0,i[f][g]++,s[f][g]=w.barNumber,delete w.barNumber))}}}l=0}else n.push(u),l++}e.lines=n}},calcLineWraps:function(e,t,n,a,s,o){if(a.staffwidth<t.left)return{explanation:"Staffwidth is narrower than the margin",tune:e,revisedParams:a};var c=a.scale?Math.max(a.scale,.1):1,l=a.wrap.minSpacing?Math.max(parseFloat(a.wrap.minSpacing),1):1,h=a.wrap.minSpacingLimit?Math.max(parseFloat(a.wrap.minSpacingLimit),1):l-.1,u=a.wrap.maxSpacing?Math.max(parseFloat(a.wrap.maxSpacing),1):void 0;a.wrap.lastLineLimit&&!u&&(u=Math.max(parseFloat(a.wrap.lastLineLimit),1));var d=a.wrap.preferredMeasuresPerLine?Math.max(parseInt(a.wrap.preferredMeasuresPerLine,10),1):void 0,f=(a.staffwidth-t.left)/l/c,p=(a.staffwidth-t.left)/u/c,m=(a.staffwidth-t.left)/h/c,g={widths:t,lineBreakPoint:f,minLineSize:p,attempts:[],staffWidth:a.staffwidth,minWidth:Math.round(m)},v=null;if(d){var b=function(e,t,n){for(var r=[],i=[],a=0,s=!1,o=0;o<e.length;o++)(a+=e[o])>t&&(s=!0),o%n==n-1&&(o!==e.length-1&&r.push(o),i.push(Math.round(a)),a=0);return{failed:s,totals:i,lineBreaks:r}}(t.measureWidths,f,d);g.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:d,lineBreaks:b.lineBreaks,failed:b.failed,totals:b.totals}),b.failed||(v=b.lineBreaks)}if(!v){var y=function(e,t){for(var n=[],r=[],i=0,a=0;a<e.length;a++){var s=e[a],o=i+s;if(o<t)i=o;else t-i<o-t&&i>0?(n.push(a-1),r.push(Math.round(i-s)),i=s):a<e.length-1&&(n.push(a),r.push(Math.round(i)),i=0)}return r.push(Math.round(i)),{lineBreaks:n,totals:r}}(t.measureWidths,f);g.attempts.push({type:"Free Form",lineBreaks:y.lineBreaks,totals:y.totals}),v=y.lineBreaks,y=function(e,t,n,i){for(var a=Math.ceil(e.total/t)+1,s=Math.floor(e.total/a),o=[],c=0;c<a;c++)o.push(s*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<l.length;)r(e.measureWidths,o,l[h].accumulator,l[h].lineAccumulator,l[h].lineWidths,l[h].lastVariance,l[h].highestVariance,l[h].currLine,l[h].lineBreaks,l[h].startIndex,l),h++;for(c=0;c<l.length;c++){var u=l[c];u.variances=[],u.aveVariance=0;for(var d=0;d<u.lineWidths.length;d++){var f=u.lineWidths[d];u.variances.push(f-o[0]),u.aveVariance+=Math.abs(f-o[0])}u.aveVariance=u.aveVariance/u.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:u.lineBreaks,variances:u.variances,aveVariance:u.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(u=l[c]).aveVariance<p&&(p=u.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}(t,f,0,g),g.attempts.push({type:"Optimize",failed:y.failed,reason:y.reason,lineBreaks:y.lineBreaks,totals:y.totals}),y.failed||(v=y.lineBreaks)}var w=a.staffwidth,x=i(v,w,n,a,s),k=o.getMeasureWidths(x.tune),A=!0;return g.attempts.push({type:"heightCheck",height:k.height}),0===v.length&&p>t.total&&(w=t.total*u*c+t.left,g.attempts.push({type:"too sparse",newWidth:Math.round(w)}),A=!1),A||(x=i(v,w,n,a,s)),x.explanation=g,x}}},function(e,t,n){var r=n(0),i=n(1),a=n(33),s=n(34);e.exports=function(){function e(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var n=0,r=0;r<e.length;r++)if(e[r].staff)for(var i=0;i<e[r].staff.length;i++)for(var a=0;a<e[r].staff[i].voices.length;a++)for(var s=e[r].staff[i].voices[a],o=1,c=0;c<s.length;c++){var l=s[c].rest&&"spacer"===s[c].rest.type;if(s[c].startTriplet&&(o=s[c].tripletMultiplier),s[c].duration&&!l&&"tempo"!==s[c].el_type&&(n+=s[c].duration*o),s[c].endTriplet&&(o=1),n>=t&&(n-=t),"bar"===s[c].el_type)return n}return n}(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.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var n=this.metaText?this.metaText.tempo:null;t=this.getBpm(n)}return t<=0&&(t=1),6e4*(this.getBeatsPerMeasure()/t)},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++){var r=t.staff[n].meter;if(r)return r}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,n=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),n=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,n=2):"common_time"===e.type&&(t=4,n=4)),this.meter={num:t,den:n},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++)if(t.staff[n].key)return t.staff[n].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.staff)for(var r=0;r<n.staff.length;r++)for(var i=n.staff[r],a=0;a<i.voices.length;a++)for(var s=i.voices[a],o=0;o<s.length;o++){var c=s[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},this.addElementToEvents=function(e,t,n,i,a,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;f<t.elemset.length;f++)null!==t.elemset[f]&&d.push(t.elemset[f]);var p=t.startTie;if(void 0!==l)e["event"+l].elements.push(d),h&&(e["event"+n]||(e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),e["event"+n].measureStart=!0,h=!1),p||(l=void 0);else{if(e["event"+n]){if(e["event"+n].left?e["event"+n].left=Math.min(e["event"+n].left,t.x):e["event"+n].left=t.x,e["event"+n].elements.push(d),e["event"+n].startCharArray.push(t.abcelem.startChar),e["event"+n].endCharArray.push(t.abcelem.endChar),null===e["event"+n].startChar&&(e["event"+n].startChar=t.abcelem.startChar),null===e["event"+n].endChar&&(e["event"+n].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length){e["event"+n].midiPitches||(e["event"+n].midiPitches=[]);for(f=0;f<t.abcelem.midiPitches.length;f++)e["event"+n].midiPitches.push(t.abcelem.midiPitches[f])}if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){e["event"+n].midiGraceNotePitches||(e["event"+n].midiGraceNotePitches=[]);for(var m=0;m<t.abcelem.midiGraceNotePitches.length;m++)e["event"+n].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[m])}}else e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:t.x,width:t.w,elements:[d],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?r.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(e["event"+n].midiGraceNotePitches=r.cloneArray(t.abcelem.midiGraceNotePitches));h&&(e["event"+n].measureStart=!0,h=!1),p&&(l=n)}}return{isTiedState:l,duration:u/c,nextIsBar:h||"bar"===t.type}},this.makeVoicesArray=function(){for(var e=[],t=[],n={},r=0;r<this.engraver.staffgroups.length;r++)for(var a=this.engraver.staffgroups[r],s=a.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=a.staffs[a.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,u=a.voices,d=0;d<u.length;d++){var f=!1;e[d]||(e[d]=[]),void 0===t[d]&&(t[d]=0);for(var p=u[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(n[t[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:h,line:a.line,measureNumber:t[d],elem:p[m]}),"bar"===p[m].type&&f&&t[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}return this.tempoLocations=n,e},this.setupEvents=function(t,n,r){for(var i,a=[],s={},o=t,c=!0,l=this.makeVoicesArray(),h=0;h<l.length;h++){var u=o,d=Math.round(1e3*u),f=0,p=-1,m=l[h],g=r;n=this.getBeatLength()*g/60;for(var v=-1,b=0;b<m.length;b++){var y=m[b].measureNumber;v!==y&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var w,x=m[b].elem,k=this.addElementToEvents(s,x,d,m[b].top,m[b].height,m[b].line,m[b].measureNumber,n,i,c);if(i=k.isTiedState,c=k.nextIsBar,u+=k.duration,x.duration>0&&(w="event"+d),d=Math.round(1e3*u),"bar"===x.type){var A=x.abcelem.type,T="bar_right_repeat"===A||"bar_dbl_repeat"===A,S="1"===x.abcelem.startEnding,M="bar_left_repeat"===A||"bar_dbl_repeat"===A||"bar_right_repeat"===A;if(T){b>0&&(s[w].endX=x.x),-1===p&&(p=b);var N=0;v=-1;for(var C=f;C<p;C++){v!==(y=m[C].measureNumber)&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var E=m[C].elem;i=(k=this.addElementToEvents(s,E,d,m[C].top,m[C].height,m[C].line,m[C].measureNumber,n,i,c)).isTiedState,c=k.nextIsBar,u+=k.duration,N=d,d=Math.round(1e3*u)}s["event"+N]&&(s["event"+N].endX=m[p].elem.x),c=!0,p=-1}S&&(p=b),M&&(f=b)}}}return function(e){for(var t,n,r,i,a=e.length-1;a>=0;a--){var s=e[a];"bar"===s.type?(s.top=r,s.nextTop=t,t=r,s.bottom=i,s.nextBottom=n,n=i):"event"===s.type&&(r=s.top,i=s.top+s.height)}}(a=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t=t.sort((function(e,t){var n=e.milliseconds-t.milliseconds;return 0!==n?n:"bar"===e.type?-1:1}))}(s)),function(t,n){if(n.length<1)return;for(var r=0;r<n.length-1;r++){var i=n[r],a=e(n,r+1);if(null!==i.left){var s=a&&i.top===a.top?a.left:t[i.line].staffGroup.w;void 0!==i.endX?s>i.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=n[n.length-1];o.endX=t[o.line].staffGroup.w}(this.lines,a),a.push({type:"end",milliseconds:d}),this.addUsefulCallbackInfo(a,g),a},this.addUsefulCallbackInfo=function(e,t){for(var n=this.millisecondsPerMeasure(t),r=0;r<e.length;r++){e[r].millisecondsPerMeasure=n}},this.getBpm=function(e){var t;if(e){t=e.bpm;var n=this.getBeatLength();t=t*(e.duration&&e.duration.length>0?e.duration[0]:n)/n}if(!t){t=180;var r=this.getMeterFraction();r&&3!==r.num&&r.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."),void(this.noteTimings=[]);if(!e){var n=this.metaText?this.metaText.tempo:null;e=this.getBpm(n)}var r=this.getBeatLength(),i=e/60,a=this.getBarLength()/r*t/i;a&&(a-=this.getPickupLength()/r/i);var s=r*i;return this.noteTimings=this.setupEvents(a,s,e),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=a(this,e);return s(t,e)}}},function(e,t){var n=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};n.prototype.addInternalNote=function(e){this.internalNotes.push(e)},n.prototype.setEndAnchor=function(e){this.anchor2=e},n.prototype.setStartX=function(e){this.startLimitX=e},n.prototype.setEndX=function(e){this.endLimitX=e},n.prototype.setHint=function(){this.hint=!0},n.prototype.calcTieDirection=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;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}},n.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;t<this.internalNotes.length;t++){"down"===this.internalNotes[t].stemDir&&(e=!0)}this.above=e}},n.prototype.calcX=function(e,t){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},n.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},n.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&"up"===this.anchor1.stemDir&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;this.above&&"up"===this.anchor2.stemDir&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},n.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.exports=n},function(e,t){e.exports=function(e){for(var t=0,n=0;n<e.voices.length;n++){var r=e.voices[n].staff;e.voices[n].duplicate||(t+=r.top,r.bottom<0&&(t+=-r.bottom))}return t}},function(e,t,n){var r=n(8);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)}},function(e,t,n){var r=n(8);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)}},function(e,t,n){var r=n(4),i=n(5),a=n(13);function s(e,t,n){var r=n;return"f"===e&&"f"===t&&(r=2*r/3),"p"===e&&"p"===t&&(r=5*r/6),"f"===e&&"z"===t&&(r=5*r/8),r}e.exports=function(e,t,n,o,c,l,h){var u,d;if(!o)return null;if(o.length>1&&o.indexOf(".")<0){e.paper.openGroup({klass:h});for(var f=0,p=0;p<o.length;p++){var m=o.charAt(p);d=i.getYCorr(m),(u=i.printSymbol(t+f,e.calcY(n+d),m,e.paper,"","",""))?p<o.length-1&&(f+=s(m,o.charAt(p+1),i.getSymbolWidth(m))):r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return e.paper.closeGroup()}if(d=i.getYCorr(o),a.isInGroup())a.addPath(i.getPathForSymbol(t,e.calcY(n+d),o,c,l));else{if(u=i.printSymbol(t,e.calcY(n+d),o,e.paper,h,"none","#000000"))return u;r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return null}},function(e,t,n){var r=n(4),i=n(25),a=n(26),s=n(23);e.exports=function(e,t,n,o){void 0===t.pitch&&window.console.error(t.type+" Relative Element y-coordinate not set.");var c=e.calcY(t.pitch);switch(t.type){case"symbol":if(null===t.c)return null;var l="symbol";t.klass&&(l+=" "+t.klass),t.graphelem=s(e,t.x,t.pitch,t.c,t.scalex,t.scaley,e.controller.classes.generate(l),"none","#000000");break;case"debug":t.graphelem=r(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim});break;case"barNumber":t.graphelem=r(e,{x:t.x,y:c,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim});break;case"lyric":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim});break;case"chord":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim,lane:t.getLane()});break;case"decoration":t.graphelem=r(e,{x:t.x,y:c+6,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"middle",centerVertically:!0,dim:t.dim});break;case"text":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim,lane:t.getLane()});break;case"multimeasure-text":t.graphelem=r(e,{x:t.x+t.w/2,y:c,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim});break;case"part":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"partsfont",klass:e.controller.classes.generate("par method in n
[all...]
/plugin/abc2/abc-libraries/abc-ui/
H A Dabc-ui-1.0.0.min.js8 function external_eval(param){return eval(param)}function isQuoted(e){return e.q}function quote(e){return e.q=!0,e}function unquote(e){return delete e.q,e}function Symbol(e){return this.nm=e,this}function isSymbol(e){return e&&e.constructor===Symbol}function symbolName(e){return e.nm}function isArray(e){return e&&e.constructor===Array}function inDs(e,t){for(var n=e.length-1;0<=n;--n)if("undefined"!=typeof e[n][t])return e[n];return!1}function member(e,t){return 0<=t.indexOf(e)}function PsParser(){function t(t){e.L=t,e.N=t.length,e.I=0,e.D=0}function n(){return e.I<e.N&&e.L[e.I]}function r(){return e.I<e.N&&e.L[e.I++]}function i(){while(e.I<e.N&&member(e.L[e.I]," \n"))e.I++}function s(){while("%"==n()){while(n()&&"\n"!=n())r();i()}}function o(){r();var e=[],t=1;while(0<t&&n()){var i=r();switch(i){case"(":t++;break;case")":t--,t<=0&&(i=!1);break;case"\\":i=r();switch(i){case"(":break;case")":break;case"\\":break;case"n":i="\n";break;case"r":i="\r";break;case"t":i=" ";break;default:i=!1}}i!==!1&&e.push(i)}return e.join("")}function u(){var e=r();if(member(e,"()<>/% \n"))throw new Error("Symbol expected, got "+e);var t=member(e,"+-0123456789."),i="."==e,s=[e];while(n()&&!member(n(),"()<>[]{}/% \n"))e=r(),s.push(e),t&&!member(e,"0123456789")&&(!i&&"."==e?i=!0:t=!1);return s=s.join(""),1==s.length&&member(s,"+-.")&&(t=!1),t?i?parseFloat(s):parseInt(s,10):new Symbol(s)}function a(){i();switch(n()){case!1:return undefined;case"%":return s();case"[":return new Symbol(r());case"]":return new Symbol(r());case"{":return e.D++,new Symbol(r());case"}":return e.D--,new Symbol(r());case"/":r();var t=u();return quote(t);case"(":return o();case"<":r();if("<"!=n())throw new Error("Encoded strings not implemented yet");return r(),new Symbol("<<");case">":r();if(">"!=n())throw new Error("Unexpected >");return r(),new Symbol(">>");default:return u()}}var e=this;return PsParser.prototype.init=t,PsParser.prototype.peek=n,PsParser.prototype.token=a,this}function Ps0(e,t,n){function r(i,s){if(isSymbol(i)&&!isQuoted(i)){var o=symbolName(i),u=inDs(t,o);if(!u)throw new Error("bind error '"+o+"'");n.push([!1,u[o]])}else if(s&&isArray(i)&&isQuoted(i)){if(0<i.length){var a=i[0],f=quote(i.slice(1));0<f.length&&n.push([!1,f]),r(a,!1)}}else"function"==typeof i?i():e.push(i)}function i(){var t=e.pop();r(t,!1)}function s(){var t=n.pop(),i=t.shift(),s=t.pop();for(var o=0;o<t.length;o++)e.push(t[o]);r(s,!0)}function u(t){o.init(t);while(o.peek()){var r=o.token();if(r||r===0){e.push(r);if(o.D<=0||isSymbol(r)&&(member(symbolName(r),"[]{}")||"<<"==symbolName(r)||">>"==symbolName(r))){i();while(0<n.length)s()}}}return e}var o=new PsParser;return Ps0.prototype.run=r,Ps0.prototype.exec=i,Ps0.prototype.step=s,Ps0.prototype.parse=u,this}function Wps(e){function f(e){if(isSymbol(e)&&!isQuoted(e))return e;if(isArray(e)&&isQuoted(e)){var t=e.length,n=[];for(var r=0;r<t;r++){var i=e[r],s=f(i);isArray(i)?n=n.concat(isQuoted(i)?quote([s]):[s]):n=n.concat(s)}return quote(n)}return e}function l(){var e=arguments;if(e.length)for(var t=0;t<e.length;t++)o.parse(e[t]);else o.parse(e);return n}var t=e,n=[],r={},i=[r],s=[],o=new Ps0(n,i,s);r["true"]=function(){n.push(!0)},r["false"]=function(){n.push(!1)},r["null"]=function(){n.push(null)},r.sub=function(){var e=n.pop();n.push(n.pop()-e)},r.mul=function(){n.push(n.pop()*n.pop())},r.div=function(){var e=n.pop();n.push(n.pop()/e)},r.mod=function(){var e=n.pop();n.push(n.pop()%e)};var u={};r.mark=function(){n.push(u)},r.counttomark=function(){var e=0;for(var t=n.length-1;0<=t;t--){if(u===n[t])return n.push(e);e++}throw new Error("Mark not found")},r["<<"]=r.mark,r[">>"]=function(){var e={};while(0<n.length){var t=n.pop();if(u===t)return n.push(e);e[n.pop()]=t}throw new Error("Mark not found")},r.exch=function(){var e=n.pop(),t=n.pop();n.push(e),n.push(t)},r.clear=function(){n.length=0},r.pop=function(){n.pop()},r.index=function(){n.push(n[n.length-2-n.pop()])},r.roll=function(){var e=n.pop(),t=n.pop(),r=[],i=[];e<0&&(e=t+e);for(var s=0;s<t;s++)s<e?r.unshift(n.pop()):i.unshift(n.pop());for(s=0;s<e;s++)n.push(r.shift());for(s=0;s<t-e;s++)n.push(i.shift())},r.copy=function(){var e=n.pop();if("object"==typeof e){var t=n.pop();for(var r in t)e[r]=t[r];n.push(e)}else{var t=n.length-e;for(var r=0;r<e;r++)n.push(n[t+r])}},r.length=function(){n.push(n.pop().length)},r.astore=function(){var e=n.pop(),t=e.length;for(var r=t-1;0<=r;r--)e[r]=n.pop();n.push(e)},r.array=function(){n.push(new Array(n.pop()))},r.eq=function(){var e=n.pop(),t=n.pop();n.push(t==e)},r.lt=function(){var e=n.pop(),t=n.pop();n.push(t<e)},r.ifelse=function(){var e=n.pop(),t=n.pop(),r=n.pop();s.push([!1,r===!0?t:e])},r.and=function(){var e=n.pop(),t=n.pop();if(!0===e||!1===e){n.push(e==1&&t===!0);return}n.push(e&t)},r.repeat=function c(){var e=n.pop(),t=n.pop();1<t&&s.push([!0,t-1,e,c]),0<t&&s.push([!1,e])},r["for"]=function h(){var e=n.pop(),t=n.pop(),r=n.pop(),i=n.pop();r<0?(t<=i+r&&s.push([!0,i+r,r,t,e,h]),t<=i&&s.push([!1,i,e])):(i+r<=t&&s.push([!0,i+r,r,t,e,h]),i<=t&&s.push([!1,i,e]))},r.exec=function(){s.push([!1,n.pop()])},r.cvx=function(){var e=n.pop();isSymbol(e)&&isQuoted(e)?n.push(unquote(e)):isArray(e)&&!isQuoted(e)?n.push(quote(e)):n.push(e)},r.dict=function(){n.pop(),n.push({})},r.get=function(){var e=n.pop(),t=n.pop();isSymbol(e)?n.push(t[symbolName(e)]):n.push(t[e])},r.getinterval=function(){var e=n.pop(),t=n.pop()+e,r=n.pop(),i=[];while(--e>=0)i.push(r[t++]);n.push(i)},r.put=function(){var e=n.pop(),t=n.pop(),r=n.pop();isSymbol(t)?r[symbolName(t)]=e:r[t]=e},r.begin=function(){i.push(n.pop())},r.end=function(){i.pop()},r.currentdict=function(){n.push(i[i.length-1])},r.where=function(){var e=symbolName(n.pop()),t=inDs(i,e);t?(n.push(t),n.push(!0)):n.push(!1)},r.save=function(){var e=i.slice();for(var t=0;t<e.length;t++){var r=e[t],s={};for(var o in r)s[o]=r[o];e[t]=s}n.push(e)},r.restore=function(){var e=n.pop();while(0<i.length)i.pop();while(0<e.length)i.unshift(e.pop())},r.type=function(){var e=n.pop(),t;if(null===e)t="nulltype";else if(!0===e||!1===e)t="booleantype";else if(u===e)t="marktype";else if("string"==typeof e)t="stringtype";else if(isSymbol(e))t=isQuoted(e)?"nametype":"operatortype";else if("function"==typeof e)t="operatortype";else if(isArray(e))t="arraytype";else if("object"==typeof e)t="dicttype";else{if(1*e!=e)throw new Error("Undefined type '"+e+"'");t=e%1==0?"integertype":"realtype"}n.push(t)};var a=!0;return r[".strictBind"]=function(){a=!0===n.pop()},r.bind=function(){n.push(f(n.pop()))},r["="]=function(){var e=n.pop();alert(e&&e.nm||e)},r["=="]=function(){alert(n.pop())},r.stack=function(){alert(n)},r.pstack=function(){alert(n)},r[".call"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=[];for(var s=0;s<e;s++)i.unshift(n.pop());if(!r[t])throw new Error(".call: "+t+" undef");n.push(r[t].apply(r,i))},r[".call0"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=[];for(var s=0;s<e;s++)i.unshift(n.pop());if(!r[t])throw new Error(".call0: "+t+" undef");r[t].apply(r,i)},r[".svg"]=function(){n.push(t)},r[".math"]=function(){n.push(Math)},r[".date"]=function(){n.push(new Date)},r[".window"]=function(){n.push(window)},r[".callback"]=function(){var e=n.pop();n.push(function(){o.run(e,!0);while(0<s.length)o.step()})},r[".minv"]=function(){var e=n.pop(),t=e[0],r=e[1],i=e[2],s=e[3],o=e[4],u=e[5];n.push([s,r,i,t,i*u-s*o,r*o-t*u])},r[".mmul"]=function(){var e=n.pop(),t=n.pop(),r=t[0],i=t[1],s=t[2],o=t[3],u=t[4],a=t[5],f=e[0],l=e[1],c=e[2],h=e[3],p=e[4],d=e[5];n.push([r*f+i*c,r*l+i*h,s*f+o*c,s*l+o*h,u*f+a*c+p,u*l+a*h+d])},r[".xy"]=function(){var e=n.pop(),t=n.pop(),r=n.pop();n.push(e[0]*r+e[2]*t+e[4]),n.push(e[1]*r+e[3]*t+e[5])},r[".rgb"]=function(){var e=n.pop(),t=n.pop(),r=n.pop();n.push("rgb("+r+","+t+","+e+")")},r[".rgba"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=n.pop();n.push("rgba("+i+","+r+","+t+","+e+")")},Wps.prototype.parse=l,this}function Psvg(e){function d(){return w(0),[o.xoffs-o.xorig,o.yoffs-o.yorig]}function v(){s=!1,w(0),t+="<g";if(o.xscale!=1||o.yscale!=1||o.rotate){t+=' transform="';if(o.xscale!=1||o.yscale!=1)o.xscale==o.yscale?t+="scale("+o.xscale.toFixed(3)+")":t+="scale("+o.xscale.toFixed(3)+","+o.yscale.toFixed(3)+")";if(o.rotate){if(o.xoffs||o.yoffs){var e,n=o.xoffs,r=o.yoffs,u=o.sin,l=o.cos;e=n*l-r*u,r=n*u+r*l,t+=" translate("+e.toFixed(2)+","+r.toFixed(2)+")",a=o.xoffs,f=o.yoffs,o.xoffs=0,o.yoffs=0}t+=" rotate("+o.rotate.toFixed(2)+")"}t+='"'}g(!1),o.rgb&&(t+=' style="color:'+o.rgb+'"'),t+=">\n",i=1}function m(e){var t,n=new e.constructor;for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function g(e){var n=o.font_n;if(!n)return;var r="",i=n.indexOf("Italic"),s=100,u=n.indexOf("Oblique"),a=n.indexOf("Bold"),f=0;a>0&&(r=' font-weight="bold"',s=a,f=2);if(i>0||u>0)i>0&&(r+=' font-style="italic"',i<s&&(s=i),f|=4),u>0&&(r+=' font-style="oblique"',u<s&&(s=u),f=8);s!=100&&(n[s-1]=="-"&&s--,n=n.slice(0,s)),e&&(!(f&2)&&c.indexOf("Bold")>=0&&(r+=' font-weight="normal"'),!(f&12)&&(c.indexOf("Italic")>=0||c.indexOf("Oblique")>=0)&&(r+=' font-style="normal"')),t+=' font-family="'+n+'"'+r+' font-size="'+o.font_s+'"'}function y(){if(p)return;w(1),o.px=o.cx,o.py=o.cy,p='<path d="m'+(o.xoffs+o.cx).toFixed(2)+" "+(o.yoffs-o.cy).toFixed(2)+"\n"}function b(){t+=p,p=""}function w(e){i==2&&(t+="</text>\n",i=1),e==0?i&&(i=0,t+="</g>\n",o.rotate&&(o.xoffs=a,o.yoffs=f,a=0,f=0)):s&&v()}function E(e){return e.length*o.font_s*.5}function S(e,t,n,r,i,s){var u,a,f,l;r>=360&&(r-=360),i>=360&&(i-=360),u=e+n*Math.cos(r*Math.PI/180),a=t+n*Math.sin(r*Math.PI/180),o.cx!=undefined?p?(u!=o.cx||a!=o.cy?p+="l":p+="m",p+=(u-o.cx).toFixed(2)+" "+(-(a-o.cy)).toFixed(2)):(o.cx=u,o.cy=a,y()):(p&&(p=""),o.cx=u,o.cy=a,y()),r==i?(i=180-r,f=e+n*Math.cos(i*Math.PI/180),l=t+n*Math.sin(i*Math.PI/180),p+="a"+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(f-u).toFixed(2)+" "+(a-l).toFixed(2)+" "+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(u-f).toFixed(2)+" "+(l-a).toFixed(2)+"\n",o.cx=u,o.cy=a):(f=e+n*Math.cos(i*Math.PI/180),l=t+n*Math.sin(i*Math.PI/180),p+="a"+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(f-u).toFixed(2)+" "+(a-l).toFixed(2)+"\n",o.cx=f,o.cy=l)}function x(e,t){y(),e==0?p+=" v"+(-t).toFixed(2)+"\n":t==0?p+=" h"+e.toFixed(2)+"\n":p+=" l"+e.toFixed(2)+" "+(-t).toFixed(2)+"\n",o.cx+=e,o.cy+=t}function T(e){e&&w(0);if(!t)return;n.out_svg(t),t=""}function N(e,t,i,s){return o.xorig=o.xoffs=n.sx(0),o.yorig=o.yoffs=n.sy(0),o.cx=0,o.cy=0,r.parse(s+(t/n.stv_g().scale).toFixed(2)+" "+i.toFixed(2)+" "+e),T(!0),!0}var t="",n=e,r=new Wps(this),i=0,s,o={cx:0,cy:0,xoffs:0,yoffs:0,xscale:1,yscale:1,rotate:0,sin:0,cos:1,linewidth:.7,dash:""},u=[],a=0,f=0,l="",c="",h=0,p;Psvg.prototype.strw=E,Psvg.prototype.arc=S,Psvg.prototype.arcn=function(e,t,n,r,i){S(e,t,n,r,i,!0)},Psvg.prototype.closepath=function(){p&&o.cx&&x(o.px-o.cx,o.py-o.cy)},Psvg.prototype.cx=function(){return o.cx},Psvg.prototype.cy=function(){return o.cy},Psvg.prototype.curveto=function(e,t,n,r,i,s){y(),p+=" C"+(o.xoffs+e).toFixed(2)+" "+(o.yoffs-t).toFixed(2)+" "+(o.xoffs+n).toFixed(2)+" "+(o.yoffs-r).toFixed(2)+" "+(o.xoffs+i).toFixed(2)+" "+(o.yoffs-s).toFixed(2)+"\n",o.cx=i,o.cy=s},Psvg.prototype.eofill=function(){b(),t+='" fill-rule="evenodd" fill="currentColor"/>\n'},Psvg.prototype.fill=function(){b(),t+='" fill="currentColor"/>\n'},Psvg.prototype.gsave=function(){u.push(m(o))},Psvg.prototype.grestore=function(){o=u.pop(),s=!0},Psvg.prototype.lineto=function(e,t){y(),e==o.cx?p+=" v"+(o.cy-t).toFixed(2)+"\n":t==o.cy?p+=" h"+(e-o.cx).toFixed(2)+"\n":p+=" l"+(e-o.cx).toFixed(2)+" "+(o.cy-t).toFixed(2)+"\n",o.cx=e,o.cy=t},Psvg.prototype.moveto=function(e,n){o.cx=e,o.cy=n,p?p+=" M"+(o.xoffs+o.cx).toFixed(2)+" "+(o.yoffs-o.cy).toFixed(2)+"\n":i==2&&(t+="</text>\n",i=1)},Psvg.prototype.newpath=function(){o.cx=o.cy=undefined},Psvg.prototype.rcurveto=function(e,t,n,r,i,s){y(),p+=" c"+e.toFixed(2)+" "+(-t).toFixed(2)+" "+n.toFixed(2)+" "+(-r).toFixed(2)+" "+i.toFixed(2)+" "+(-s).toFixed(2)+"\n",o.cx+=i,o.cy+=s},Psvg.prototype.rlineto=x,Psvg.prototype.rmoveto=function(e,n){p?p+=" m"+e.toFixed(2)+" "+(-n).toFixed(2)+"\n":i==2&&(t+="</text>\n",i=1),o.cx+=e,o.cy+=n},Psvg.prototype.rotate=function(e){w(0);var t,n=o.xoffs,r=o.yoffs,i=o.sin,u=o.cos;t=n*u-r*i,r=n*i+r*u,o.xoffs=t/o.xscale,o.yoffs=r/o.yscale,n=o.cx,r=o.cy,t=n*u-r*i,r=-n*i+r*u,o.cx=t/o.xscale,o.cy=r/o.yscale,e=360-e,o.rotate+=e,o.rotate>180?o.rotate-=360:o.rotate<=-180&&(o.rotate+=360),e=o.rotate*Math.PI/180,o.sin=i=Math.sin(e),o.cos=u=Math.cos(e),t=o.cx,o.cx=(t*u+o.cy*i)*o.xscale,o.cy=(-t*i+o.cy*u)*o.yscale,t=o.xoffs,o.xoffs=(t*u+o.yoffs*i)*o.xscale,o.yoffs=(-t*i+o.yoffs*u)*o.yscale,s=!0},Psvg.prototype.scale=function(e,t){o.xoffs/=e,o.yoffs/=t,o.cx/=e,o.cy/=t,o.xscale*=e,o.yscale*=t,s=!0},Psvg.prototype.selectfont=function(e,t){e=e.nm;if(h!=t||e!=l)o.font_n_old=o.font_n,o.font_n=e,o.font_s=t,s=!0},Psvg.prototype.setdash=function(e,t){var n=e.length,r;if(n==0){o.dash="";return}o.dash=' stroke-dashoffset="'+t+'" stroke-dasharray="',r=0;for(;;){o.dash+=e[r];if(--n==0)break;o.dash+=" "}o.dash+='"'},Psvg.prototype.setlinewidth=function(e){o.linewidth=e},Psvg.prototype.setrgbcolor=function(e,t,n){var r=16777216+(Math.floor(e*255)<<16)+(Math.floor(t*255)<<8)+Math.floor(n*255);r=r.toString(16),r=r.replace("1","#"),r!=o.rgb&&(o.rgb=r,s=!0)},Psvg.prototype.show=function(e){var n,r,u;s&&(i==2?n=!0:v()),r=o.cx,u=o.cy,n?(t+="<tspan\n ",g(!0),t+=">"):i!=2&&(t+='<text x="'+(r+o.xoffs).toFixed(2)+'" y="'+(o.yoffs-u).toFixed(2)+'">',i=2),t+=e.replace(/<|>|&| /g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case" ":return"  "}}),n&&(t+="</tspan>"),o.cx=r+E(e)},Psvg.prototype.stroke=function(){b(),o.linewidth!=.7&&(t+='" stroke-width="'+o.linewidth.toFixed(2)),t+='" stroke="currentColor" fill="none"'+o.dash+"/>\n"},Psvg.prototype.translate=function(e,t){o.xoffs+=e,o.yoffs-=t,o.cx-=e,o.cy-=t},Psvg.prototype.arp=function(e,t,r){var i=d();T(),n.out_arp((t+i[0])*n.stv_g().scale,r-i[1],e)},Psvg.prototype.ltr=function(e,t,r){var i=d();T(),n.out_ltr((t+i[0])*n.stv_g().scale,r-i[1],e)},Psvg.prototype.xygl=function(e,t,r){var i=d();T(),n.xygl((e+i[0])*n.stv_g().scale,t-i[1],r)},Psvg.prototype.xygls=function(e,t,r,i){var s=d();T(),n.out_deco_str((t+s[0])*n.stv_g().scale,r-s[1],i,e)},Psvg.prototype.xyglv=function(e,t,r,i){var s=d();T(),n.out_deco_val((t+s[0])*n.stv_g().scale,r-s[1],i,e)},Psvg.prototype.y0=function(e){var t=n.get_staff_tb();return e+t[0].y},Psvg.prototype.y1=function(e){var t=n.get_staff_tb();return e+t[1].y},Psvg.prototype.ps_flush=T,Psvg.prototype.ps_eval=function(e){r.parse(e),T()},Psvg.prototype.psdeco=function(e,t,i,s){var o,u,a,f,l=r.parse("/"+e+" where"),c=l.pop(),h=n.get_staff_tb();return c?(f=0,s.defl.nost&&(f=1),s.defl.noen&&(f|=2),s.s.stem>=0&&(f|=4),l.pop(),a="/defl "+f+" def ",s.lden&&(a+=t.toFixed(2)+" "+i.toFixed(2)+" ",u=s.start,t=u.x,i=u.y+h[u.st].y,t>s.x-20&&(t=s.x-20)),o=s.dd,s.has_val?a+=s.val+" ":o.str&&(a+="("+o.str+") ",i+=o.h*.2),N(e,t,i,a)):!1},Psvg.prototype.psxygl=function(e,t,n){var i=r.parse("/"+n+" where"),s=i.pop();return s?(i.pop(),N(n,e,t,"dlw ")):!1},Psvg.prototype.svgcall=function(e,t,r,i,s){var o=d();T(),e((t+o[0])*n.stv_g().scale,r-o[1],i,s)},r.parse("currentdict/systemdict currentdict put\nsystemdict/{/mark cvx put\nsystemdict/[/mark cvx put\nsystemdict/]\n/counttomark cvx\n/array cvx\n/astore cvx\n/exch cvx\n/pop cvx\n5 array astore cvx put\nsystemdict/}/] cvx/cvx cvx 2 array astore cvx put\nsystemdict/def{currentdict 2 index 2 index put pop pop}put\n\n/maxlength 1000 def % TODO\n/.bdef{bind def}bind def\n/.xdef{exch def}.bdef\n/dup{0 index}.bdef\n/load{dup where pop exch get}.bdef\n/.ldef{load def}.bdef\n/if{{}ifelse}.bdef\n/cleartomark{array pop}.bdef\n/known{exch begin where{currentdict eq}{false}if end}.bdef\n/store{1 index where{3 1 roll put}{def}ifelse}.bdef\n/not{{false}{true}ifelse}.bdef\n%/.logand{{{true}{false}ifelse}{pop false}ifelse}.bdef\n%/and/.logand .ldef % TODO numeric and\n/.logor{{pop true}{{true}{false}ifelse}ifelse}.bdef\n/or/.logor .ldef % TODO numeric or\n/ne{eq not}.bdef\n/ge{lt not}.bdef\n/le{1 index 1 index eq 3 1 roll lt or}.bdef\n/gt{le not}.bdef\n/.repeat{1 1 4 2 roll for}.bdef\n\n%% math\n\n/floor{.math(floor)1 .call}.bdef\n\n/neg{0 exch sub}.bdef\n/add{neg sub}.bdef\n/idiv{div floor}.bdef\n\n/.pi{.math(PI)get}.bdef\n\n/abs{.math(abs)1 .call}.bdef\n%/.acos{.math(acos)1 .call}.bdef\n%/.asin{.math(asin)1 .call}.bdef\n/atan{.math(atan2)2 .call 180 mul .pi div}.bdef\n%/.atan2{.math(atan2)2 .call}.bdef\n%/ceiling{.math(ceil)1 .call}.bdef\n/cos{.pi mul 180 div .math(cos)1 .call}.bdef\n%/.exp{.math(exp)1 .call}.bdef\n%/log{.math(log)1 .call}.bdef\n%/.max{.math(max)2 .call}.bdef\n%/.min{.math(min)2 .call}.bdef\n%/.pow{.math(pow)2 .call}.bdef\n%/.random{.math(random)0 .call}.bdef\n%/rand{.random}.bdef % TODO follow spec\n%/round{.math(round)1 .call}.bdef\n%/sin{.math(sin)1 .call}.bdef\n%/sqrt{.math(sqrt)1 .call}.bdef\n%/.tan{.math(tan)1 .call}.bdef\n%/truncate{.math(truncate)1 .call}.bdef % TODO Math.truncate does not exist!\n\n% graphic\n/arc{.svg(arc)5 .call0}.bdef\n/arcn{.svg(arcn)5 .call0}.bdef\n/closepath{.svg(closepath)0 .call}.bdef\n/currentpoint{.svg(cx)0 .call .svg(cy)0 .call}.bdef\n/curveto{.svg(curveto)6 .call0}.bdef\n/eofill{.svg(eofill)0 .call0}.bdef\n/fill{.svg(fill)0 .call0}.bdef\n/grestore{.svg(grestore)0 .call0}.bdef\n/gsave{.svg(gsave)0 .call0}.bdef\n/lineto{.svg(lineto)2 .call0}.bdef\n/moveto{.svg(moveto)2 .call0}.bdef\n/newpath{.svg(newpath)0 .call0}.bdef\n/rcurveto{.svg(rcurveto)6 .call0}.bdef\n/rlineto{.svg(rlineto)2 .call0}.bdef\n/rmoveto{.svg(rmoveto)2 .call0}.bdef\n/rotate{.svg(rotate)1 .call0}.bdef\n/scale{.svg(scale)2 .call0}.bdef\n/selectfont{.svg(selectfont)2 .call0}.bdef\n/setdash{.svg(setdash)2 .call0}.bdef\n/setlinewidth{.svg(setlinewidth)1 .call0}.bdef\n/setrgbcolor{.svg(setrgbcolor)3 .call0}.bdef\n/show{.svg(show)1 .call0}.bdef\n/stroke{.svg(stroke)0 .call0}.bdef\n/stringwidth{.svg(strw)1 .call 1}.bdef %fixme: height KO\n/translate{.svg(translate)2 .call0}.bdef\n\n/setgray{255 mul dup dup setrgbcolor}.bdef\n% abcm2ps syms.c\n/!{bind def}bind def\n/T/translate load def\n/M/moveto load def\n/RM/rmoveto load def\n/L/lineto load def\n/RL/rlineto load def\n/C/curveto load def\n/RC/rcurveto load def\n/SLW/setlinewidth load def\n/defl 0 def\n/dlw{0.7 SLW}!\n/xymove{/x 2 index def/y 1 index def M}!\n/showc{dup stringwidth pop .5 mul neg 0 RM show}!\n%\n% abcm2ps internal glyphs\n/arp{.svg(arp)3 .call0}.bdef\n/ltr{.svg(ltr)3 .call0}.bdef\n/ft0{(acc-1).svg(xygl)3 .call0}.bdef\n/nt0{(acc3).svg(xygl)3 .call0}.bdef\n/sh0{(acc1).svg(xygl)3 .call0}.bdef\n/dsh0{(acc2).svg(xygl)3 .call0}.bdef\n/trl{(trl).svg(xygl)3 .call0}.bdef\n/lmrd{(lmrd).svg(xygl)3 .call0}.bdef\n/turn{(turn).svg(xygl)3 .call0}.bdef\n/umrd{(umrd).svg(xygl)3 .call0}.bdef\n/y0{.svg(y0)1 .call}.bdef\n/y1{.svg(y1)1 .call}.bdef\n")}var abc=null,$ABC_UI=function(){"use strict";function $(e,t,n){return e.indexOf(t)!==-1?"":t+" "+n+"\n"}function J(e,t){e=e||{};if(e.zoom===undefined||e.zoom===null)e.zoom=1;if(e.pagewidth===undefined||e.pagewidth===null)e.pagewidth=p;var r=q+" s"+n+"\n";return n++,r+=$(t,"%%pagewidth",e.pagewidth.toString()+"cm"),r+=$(t,"%%staffwidth",e.pagewidth.toString()+"cm"),r+=$(t,"%%scale",e.zoom.toString()),r+=$(t,"%%topmargin","0px"),r+=$(t,"%%botmargin","0px"),r+=$(t,"%%leftmargin","16px"),r+=$(t,"%%rightmargin","8px"),r+=$(t,"%%topspace","0px"),r+=$(t,"%%musicspace","0px"),r+=$(t,"%%vocalspace","0px"),r+=$(t,"%%staffsep","0px"),r+=$(t,"%%sysstaffsep",".7cm"),r+=$(t,"%%vocalfont Time","13"),r}function K(e,t){var n=e.nextSibling.nextSibling;n!==null&&n.nodeName==="#text"&&(n=e.nextSibling.nextSibling);if(n!==null&&n!==undefined&&n.nodeName&&n.nodeName==="DIV"&&n.classList&&n.classList.contains(t))return n;n=e.cloneNode(!0);var r=n.classList;while(r.length>0)r.remove(r.item(0));return n.classList.add(t),e&&e.nextSibling&&e.nextSibling.nodeName=="#text"&&(e=e.nextSibling),e.parentNode.insertBefore(n,e.nextSibling),n}function Q(e,t){var n="",r={read_file:null,errmsg:function(e,t,n){},img_out:function(e){n+=e},page_format:!1},i=J(t,e)+X+V;abc=new Abc(r);try{abc.tosvg("edit",i),abc.tosvg("score.abc",e)}catch(s){var o="%c "+s.message+"\nabc2svg tosvg bug - stack:\n"+s.stack;console.log(o,"color: red;")}return n}function G(e,t){const n={beam:!0,slur:!0,tuplet:!0,deco:!0};var r="",i={read_file:null,errmsg:function(e,t,n){},img_out:function(e){r+=e},anno_start:null,anno_stop:function(e,r,i,s,o,u,a){if(n[e])return;isNaN(u)||(abc.out_svg('<rect class="'+C+" "+t.idScore+" "+r+'" x="'),abc.out_sxsy(s,'" y="',o),abc.out_svg('" width="'+u.toFixed(2)+'" height="'+a.toFixed(2)+'"/>\n'))}},s=J(t,e)+X+V;abc=new Abc(i);try{abc.tosvg("edit",s),abc.tosvg("follower.abc",e)}catch(o){var u="%c "+o.message+"\nabc2svg tosvg bug - stack:\n"+o.stack;console.log(u,"color: red;")}return r}function Y(e,t){if(t===undefined)return;var n=document.getElementById(e);if(n===undefined||n===null)return null;var r=t.indexOf(B,0)===-1,i={errmsg:function(e,t,n){console.log("%c "+e,"color: red;")},get_abcmodel:function(t,i,s,f){var l=i.length;for(var c=0;c<l;c++){var h=i[c],p=h.instr||0;h.midictl&&(h.midictl[32]&&(p+=h.midictl[32]*128),h.midictl[0]&&(p+=h.midictl[0]*128*128),p=128),u.indexOf(p)===-1&&(u.push(p),o=!1)}var d=0;if(r&&l>1){var v=!0;for(c=0;c<l;c++){var m=$ABC_UTIL.remapVoiceName(i[c],a);if($ABC_UTIL.isActiveVoice(m)){d++,v||n.appendChild(document.createElement("br")),v=!1;var g=document.createElement("input");g.type="checkbox",g.id=e+"_V"+c,g.classList.add(A),g.checked=!0,n.appendChild(g);var y=document.createElement("label");y.classList.add(N),y.appendChild(document.createTextNode(" "+m)),n.appendChild(y)}}}n.hidden=d<2}},s=I+"\n"+X;try{abc=new Abc(i),abc.tosvg("player",s),abc.tosvg("audio.abc",t)}catch(f){var l="%c "+f.message+"\nabc2svg tosvg bug - stack:\n"+f.stack;console.log(l,"color: red;")}}function Z(e,n,o){function ot(e){var t=st;e!==undefined&&(t=$ABC_UTIL.updateTempo(st,e));var n={events:$ABC_EVENTS.render(t,g,X),id:v};ut&&(ut.value=JSON.stringify(n));var r={idScore:v,zoom:o.scale,pagewidth:u};rt.innerHTML=$ABC_UTIL.svgMerge(Q(t,r),G(t,r))}if(e===undefined||e===null)return null;var u=parseFloat(e.classList[1]);isNaN(u)&&(u=p);var f=parseFloat(e.classList[2]);isNaN(f)||(o.scale=f),o=o||{};var l=n.indexOf(j,0)===-1&&n.indexOf(F,0)===-1;o.bPlayer===undefined&&(o.bPlayer=l),o.width===undefined&&(o.width=h),o.scale===undefined&&(o.scale=d),o.bHideTempo===undefined&&(o.bHideTempo=!0),o.lang===undefined&&(o.lang=a);var c=O+t,v=M+t,m=_+t,g=D+t,y=P+t;t++;var N=$ABC_UTIL.buildTempoSlider(n,m),C=K(e,b),H='<table id="'+c+'">',B='<div id="'+v+'"></div>';if(o.bPlayer){var I=n.indexOf(R,0)!==-1,q=n.indexOf(U,0)!==-1,z=n.indexOf(W,0)!==-1,V=!(I||q||z),$='<button id="'+y+'" class="'+k+'" value="80"></button>',J='<button id="'+m+'" class="'+w+'"></button>',Z='<div id="'+g+'" class="'+T+'"></div>',et="<div>"+N.html+"</div>";V?C.innerHTML=H+"<tr>"+'<td valign="center">'+"<table>"+'<tr><td align="center">'+$+J+et+"</td></tr>"+"<tr><td>"+Z+"</td></tr>"+"</table>"+"</td>"+"<td>"+B+"</td>"+"</tr><table>":z?C.innerHTML=H+"<tr>"+"<td>"+B+"</td>"+'<td valign="center">'+"<table>"+'<tr><td align="center">'+$+J+et+"</td></tr>"+"<tr><td>"+Z+"</td></tr>"+"</table>"+"</td>"+"</tr><table>":I?C.innerHTML=H+"<tr>"+'<td align="center">'+"<table>"+'<tr valign="center">'+'<td align="center">'+$+J+et+"</td>"+'<td width="10px"></td>'+"<td>"+Z+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<tr><td>"+B+"</td></tr>"+"<table>":q&&(C.innerHTML=H+"<tr><td>"+B+"</td></tr>"+"<tr>"+'<td align="center">'+"<table>"+'<tr valign="center">'+'<td align="center">'+$+J+et+"</td>"+'<td width="10px"></td>'+"<td>"+Z+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<table>")}else C.innerHTML=H+"<tr><td>"+B+"</td></tr><table>";var tt=document.getElementById(c),nt=document.getElementById(m),rt=document.getElementById(v),it=document.getElementById(y),st=$ABC_UTIL.normalize(n,o);if(o.bPlayer){var ut=document.getElementById(m);Y(g,st);var at=N.selection;it.value=at,ot(at);var ft="."+L,lt=tt.querySelectorAll(ft);for(var ct=0,ht=lt.length;ct<ht;ct++)lt[ct].addEventListener("click",function(){var e="."+m+"."+L+"."+E,t=parseInt(this.classList[2]),n=it?it.value:undefined;if(t==n)return;nt.classList.contains(S)&&($EVENT_PLAYER.stop(),nt.classList.toggle(S)),tt.querySelector(e).classList.toggle(E),this.classList.toggle(E),it&&(it.value=t),ot(t)});ft="."+A;var pt=tt.querySelectorAll(ft);for(ct=0,ht=pt.length;ct<ht;ct++)pt[ct].addEventListener("change",function(){nt.classList.contains(S)&&($EVENT_PLAYER.stop(),nt.classList.toggle(S));var e=it?it.value:undefined;e==="undefined"&&(e=undefined),ot(e)});r?ut.classList.contains(x)||ut.classList.add(x):ut.hidden=!r,ut.addEventListener("click",function(){if(this.classList.contains(x)){$EVENT_PLAYER.stop(),this.classList.toggle(S);if(this.classList.contains(S)){var e=document.querySelectorAll("."+w);for(var t=0,n=e.length;t<n;t++)e[t].classList.contains(S)&&e[t]!=ut&&e[t].classList.toggle(S);if(s!==null){var r=document.getElementsByClassName(s);for(t=0,n=r.length;t<n;t++)r[t].style.setProperty("fill-opacity",0)}i=ut;var o=JSON.parse(ut.value);s=o.id,$EVENT_PLAYER.play(0,1e6,o.events)}}})}else{var dt={idScore:v,zoom:o.scale,pagewidth:u};rt.innerHTML=$ABC_UTIL.svgMerge(Q(st,dt),G(st,dt))}}function et(e,t,n){n===undefined&&(n=!1),t=t||!1,e=e||c;var r="div."+y;n||(r+="."+v);var i=e[0]=="m",s=-1,o,u,a="";if(t===!0){var f=i?m:g;s=f;var l=r+"."+f,h=document.querySelectorAll(l);h.forEach(function(e){var t=K(e,b);t.hidden=!0}),f=i?g:m;var p=r+"."+f,d=document.querySelectorAll(p);d.forEach(function(e){var t=K(e,b);t.hidden=!1})}var w=document.querySelectorAll(r);for(o=0,u=w.length;o<u;o++){a="";var E="",S=w[o];if(s===-1||s!==-1&&!S.classList.contains(s)){var x=S.childNodes.length===0?"":S.childNodes[0].nodeValue,T=1,N=e,C=S.classList.contains(v);x.trim()===""?E=external_eval(S.id):S.id!==""?(T=parseFloat(x),isNaN(T)?(T=1,x.indexOf("\n")==-1?(x.charAt(0)!=="<"&&(N=x,C=!0,x.indexOf("m")!=-1?N="m"+x.replace("m",""):x.indexOf("M")==-1&&(N="M"+x)),E=external_eval(S.id)):E=x):E=external_eval(S.id)):E=x;var k={scale:T};C&&(k.transpose=N),Z(S,a+E,k)}}}function tt(e){var t=e||{};t.lang&&(a=t.lang),t.instruments&&t.instruments.length>0&&(u=t.instruments),et(t.tonality,t.bMajorOrMinor,!0),u.length===0&&!o&&u.push(0),u.length>0&&nt(u)}function nt(e){var t=e.length;$EVENT_PLAYER.init(e,function(){$EVENT_PLAYER.stop(),i.classList.contains(S)&&i.classList.toggle(S)},function(e,t){var n=document.getElementsByClassName(s+" "+e);if(n!==undefined&&n.length>0){var r=t?.2:0;n[0].style.setProperty("fill-opacity",r)}},function(e){t--;if(t===0){r=!0;var n=document.querySelectorAll("."+w);for(var i=0,s=n.length;i<s;i++)n[i].classList.toggle(x),n[i].hidden=!1}},function(e){console.warn("Failure loading Soundfont instrument "+e)})}var e={},t=0,n=0,r=!1,i=null,s="",o=!0,u=[],a="en";const f="C",l="M",c=l+f,h=600,p=16,d=1,v="transposable",m="major",g="minor",y="abc-source",b="abc-render",w="abc-player",E="selected",S="playing",x="ready",T="abc-voices",N="abc-voice",C="abc-follow",k="abc-hidden",L="abc-dot",A="check-voice",O="abc-container",M=b,_=w,D=T,P="abc-tempo",H="%%voicecombine",B="%%player_no_voice",j="%%no_player",F="%%player_off",I="%%play",q="%%fullsvg",R="%%player_top",U="%%player_bottom",z="%%player_left",W="%%player_right",X="%%deco red 10 @ 0 0 0\n%%deco blue 10 @ 0 0 0\n%%deco green 10 @ 0 0 0\n%%deco brown 10 @ 0 0 0\n%%deco orange 10 @ 0 0 0\n%%deco yellow 10 @ 0 0 0\n%%deco gray 10 @ 0 0 0\n%%deco cyan 10 @ 0 0 0\n%%deco coral 10 @ 0 0 0\n%%deco gold 10 @ 0 0 0\n%%deco khaki 10 @ 0 0 0\n%%deco indigo 10 @ 0 0 0\n%%deco lime 10 @ 0 0 0\n%%deco navy 10 @ 0 0 0\n%%deco orchid 10 @ 0 0 0\n%%deco pink 10 @ 0 0 0\n%%deco peru 10 @ 0 0 0\n%%deco plum 10 @ 0 0 0\n%%deco purple 10 @ 0 0 0\n%%deco tan 10 @ 0 0 0\n%%deco teal 10 @ 0 0 0\n%%deco o>( 1 arrow_orange 0 0 0\n%%deco o>) 1 arrow_orange 0 0 0\n%%deco r>( 1 arrow_red 0 0 0\n%%deco r>) 1 arrow_red 0 0 0\n%%deco g>( 1 arrow_green 0 0 0\n%%deco g>) 1 arrow_green 0 0 0\n%%deco b>( 1 arrow_blue 0 0 0\n%%deco b>) 1 arrow_blue 0 0 0\n%%deco n>( 1 arrow_black 0 0 0\n%%deco n>) 1 arrow_black 0 0 0\n%%deco ->( 1 arrow_gray 0 0 0\n%%deco ->) 1 arrow_gray 0 0 0\n",V='%%beginsvg\n<defs>\n <marker id="arrow_orange" fill="orange" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_red" fill="red" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_blue" fill="blue" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_green" fill="green" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_gray" fill="gray" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_black" fill="black" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <path id="x_notehead" d="m-3 -3l6 6m0 -6l-6 6" class="stroke" style="stroke-width:1.2"/>\n <path id="xcircle_notehead" d="m-3 -3 l6 6 m0 -6 l-6 6 M 0, 0 m -4, 0 a 4,4 0 1,0 8,0 a 4,4 0 1,0 -8,0" class="stroke" style="stroke-width:1.2"></path>\n <path id="triangle_notehead" d="M0 -5 L-4 4 H4 Z"/>\n <path id="square_notehead" d="M0 -4 L-4 0 L0 4 L4 0Z"/>\n</defs>\n%%endsvg\n%%beginjs\nvar dsx=12,dex=14;\nuser.arrow_red = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_red");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_red); color: red"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_green = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_green");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_green); color: green"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_blue = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_blue");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_blue); color: blue"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_orange = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_orange");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_orange); color: orange"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_gray = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_gray");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_gray); color: gray"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_black = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_black");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_black); color: black"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\n%%endjs\n';return e.init=function(e){tt(e)},e.updateTonality=function(e,t){et(e,t)},e.buildScore=function(e,t,n){return Z(e,t,n)},e}(),$ABC_UTIL=function(){"use strict";function N(e){var t=!0;e.bEditors===!1&&(t=!1);var n=document.querySelectorAll(s);for(var i=0,o=n.length;i<o;i++){var u=n[i],a=u.innerHTML;a=a.replace(/&gt;/g,">");var f=I(a),l="";if(t){var c="?abc=",h=T.encode(f),p=encodeURI(m+c+h),d=encodeURI(g+c+h),y=B(a,{bStandard:!0,bKeepSpace:!0}),b=T.encode(y),w=encodeURI(v+c+b);l+="See in editors <a href='"+w+"' target='_blank'>abc2svg</a>, "+"<a href='"+p+"' target='_blank'>abc-ui</a>, "+"<a href='"+d+"' target='_blank'>dev.music</a>."}var E=u.classList.contains(r);E&&(f=k(f,e),l+="<pre class='abc-text'>"+f+"</pre>");var S=document.createElement("div");S.innerHTML=l;var x=u.parentNode;x.insertBefore(S,u)}}function C(e,t,n,r){r=r||{};var i=e,s;return t.forEach(function(e){r.bMacro?e="%%"+e:r.bDeco&&(e="!"+e+"!"),s='<span class="'+n+'">'+e+"</span>",e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=i.replace(new RegExp(e,"g"),s)}),i}function k(e,t){t=t||{};var n=e,r;if(t.bMacro){var i={bMacro:!0};n=C(n,y,"abc-macro",i),n=C(n,b,"abc-ui-macro",i),w.forEach(function(e){e="%%"+e;var t=n.indexOf(e);if(t!==-1){var r=n.indexOf("\n",t),i=n.substring(0,t),s=n.substring(t,r),o='<span class="abc-ui-macro">'+s+"</span>",u=n.substring(r,n.length);n=i+o+u}})}if(t.bDeco){var s={bDeco:!0};n=C(n,E,"abc-deco",s),n=C(n,S,"color-deco",s),n=C(n,x,"arrow-deco",s)}return n}function L(e,t,n,r){if(r!=undefined)return r+e[0];if(t===!0)return"="+e[0];if(n===!0)return e[0];var i=e;return e.indexOf("#")!==-1?i="^"+e[0]:e.indexOf("b")!==-1&&(i="_"+e[0]),i}function A(e,t){var n=t.substring(1,t.length),r=L(n);if(r==="C")return e;if(r.indexOf("B")!==-1||r.indexOf("A")!==-1)r+=",";var i=e,s=0,o;for(;;){s=i.indexOf("K:",s+1);if(s===-1)break;o=i.indexOf("\n",s+1);var u=i.substring(s,o),a=u+" shift=C"+r+"\n";if(o===-1)break;i=i.substring(0,s)+a+i.substring(o+1,i.length)}return i}function O(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].replace(/^\s+|\s+$/gm,"");s=s.replace(/\s+/g," "),s=s.replace(/^\t+|\t+$/gm,""),s!==""&&(t+=s+"\n")}return t}function M(e,t){t=t||"en";var n="",r="",i="",s="",u="",a="",f="",h="",d="",v="",m="",g="",y="",b="";return e.indexOf("+name")!==-1?(f=' name="'+p[t].soprano+'" sname="'+p[t].sopranoShort+'"',d=' name="'+p[t].alto+'" sname="'+p[t].altoShort+'"',m=' name="'+p[t].tenor+'" sname="'+p[t].tenorShort+'"',y=' name="'+p[t].bass+'" sname="'+p[t].bassShort+'"'):e.indexOf("+shortname")!==-1&&(f=' name="'+p[t].sopranoShort+'" sname="'+p[t].sopranoShort+'"',d=' name="'+p[t].altoShort+'" sname="'+p[t].altoShort+'"',m=' name="'+p[t].tenorShort+'" sname="'+p[t].tenorShort+'"',y=' name="'+p[t].bassShort+'" sname="'+p[t].bassShort+'"'),e.indexOf("T")!==-1?(a="clef=C1",h="clef=C3",v="clef=C4",g="clef=F4"):e.indexOf("G")!==-1?(a=l,h=l,v="clef=treble_8",g=c):(a=l,h=l,v="clef=C",g=c),e.indexOf("D")!==-1&&(s="V:D "+a+"\n",r+="D "),e.indexOf("C")!==-1&&(u="V:C "+a+"\n",r+="C "),e.indexOf("N")!==-1&&(b="V:N "+g+"\n",i+=" N"),n+=s+u+"V:S "+a+f+"\n"+"V:A "+h+d+"\n"+"V:T "+v+m+"\n"+"V:B "+g+y+"\n"+b+o+"[("+r+"S) | A | T | (B"+i+")]\n",n}function _(e){var t=e.indexOf("D")!==-1,n=e.indexOf("C")!==-1,r=e.indexOf("N")!==-1,i=e.indexOf("2+2")!==-1||e.indexOf("4")!==-1,s=e.indexOf("3+1")!==-1,u=e.indexOf("4+1")!==-1,a=e.indexOf("3+2")!==-1,f=e.indexOf("2+3")!==-1,h=e.indexOf("3+3")!==-1,p=e.indexOf("4+2")!==-1,d=e.indexOf("5+1")!==-1,v="",m="",g="";return t&&(v+="V:D "+l+"\n",m+="D "),n&&(v+="V:C "+l+"\n",m+="C "),r&&(v+="V:N "+c+"\n",g+=" N"),h?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+c+"\nV:5 "+c+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3)|(4 5 6"+g+")}\n":d?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+l+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3 4 5)|(6"+g+")}\n":p?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+c+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3 4)|(5 6"+g+")}\n":u?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+c+"\n"+o+" {("+m+"1 2 3 4)|(5"+g+")}\n":a?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+c+"\nV:5 "+c+"\n"+o+" {("+m+"1 2 3)|(4 5"+g+")}\n":f?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+c+"\nV:4 "+c+"\nV:5 "+c+"\n"+o+" {("+m+"1 2)|(3 4 5"+g+")}\n":i?v+="V:S "+l+"\nV:A "+l+"\nV:T "+c+"\nV:B "+c+"\n"+o+" {("+m+"S A)|(T B"+g+")}\n":s?v+="V:S "+l+"\nV:A "+l+"\nV:T "+l+"\nV:B "+c+"\n"+o+" {("+m+"S A T)|(B"+g+")}\n":v+="V:KG "+l+"\nV:KF "+c+"\n"+o+" {("+m+"KG)|(KF"+g+")}\n",v}function D(e,t){var n,r,i,s=e.indexOf(a,0);if(s!==-1){n=e.indexOf("\n",s+1);if(n!==-1)return r=e.substring(s,n),i=_(r,t),e.indexOf("K:")===-1&&(i+="K:C\n"),e=e.substring(0,s)+i+e.substring(n+1,e.length),e}s=e.indexOf(f,0);if(s!==-1){n=e.indexOf("\n",s+1);if(n!==-1)return r=e.substring(s,n),i=M(r,t),e.indexOf("K:")===-1&&(i+="K:C\n"),e=e.substring(0,s)+i+e.substring(n+1,e.length),e}return e}function P(e){var t=undefined,n=[],r=e.indexOf(u,0);if(r!==-1){var i=e.indexOf("\n",r+1);if(i!==-1){r=e.indexOf("{",r+1)+1,i=e.indexOf("}",r);var s=e.substring(r,i);s=s.replace(/\s/g,"");var o=!1,a;r=0;do i=s.indexOf(",",r),i!==-1?a=s.substring(r,i):(a=s.substring(r,s.length),o=!0),a.trim(),a.indexOf("*")!==-1&&(t=a.replace(/\*/g,""),a=t),n.push(a),r=i+1;while(!o)}}return t===undefined&&(t=n[0]),{tempos:n,selection:t}}function H(e,t){var n=P(e);if(n.selection===undefined)return{html:"",selection:undefined};var r=n.tempos,i=parseInt(r[0]),s=parseInt(r[r.length-1]),o=4,u=9,a=(u-o)/(s-i),f=o-a*i,l='<div class=" + class_abc_tempo + ">';for(var c=0,h=r.length;c<h;c++){var p=parseInt(r[c]),d=Math.round(a*p+f),v=" dot"+d,m=r[c]===n.selection?" selected":"";l+='<span class="'+t+" abc-dot "+r[c]+m+v+'"></span>'}return l+="</div>",{html:l,selection:n.selection}}function B(e,t){t=t||{};var n=!1;t.bKeepSpace!==undefined&&t.bKeepSpace===!0&&(n=!0);var r=n?I(e):O(e),i=-1,s=-1;r.indexOf("X:")!==-1&&(i=r.indexOf("X:",0),i!==-1&&(s=r.indexOf("\n",i+1),s!==-1&&(r=r.substring(0,i)+r.substring(s+1,r.length))));var o="";t.bHideTempo!==undefined&&(t.bHideTempo===!0?(i=r.indexOf("Q:",0),i!==-1&&(o="%%writefields Q 0\n")):t.bHideTempo===!1&&(o="%%writefields Q 1\n"));var u=o+"X:1\n";r.indexOf("L:")===-1&&(u+="L:1/1\n"),r=u+D(r,t.lang),r.indexOf("K:")===-1&&(i=r.indexOf("\n",r.indexOf("L:"))+1,r=r.substring(0,i)+"K:C\n"+r.substring(i,r.length)),t.transpose&&(r=A(r,t.transpose));if(t.bStandard===!0){r=r.replace(/%%MIDI program 128/g,"%%MIDI channel 10"),r=r.replace(/%%no_player\n/g,""),r=r.replace(/%%player_no_voice\n/g,"");var a=S.concat(x);a.forEach(function(e){e="!"+e+"!";var t=" ".repeat(e.length);e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=r.replace(new RegExp(e,"g"),t)})}return q(r)}function j(e,t){var n=e,r="Q:1/4="+t+"\n",i=e.indexOf("X:1\n");return i!==-1&&(i+=4,n=e.substring(0,i)+r+e.substring(i,e.length)),n}function F(e,t){var n=e,r=e.indexOf(t);if(r!==-1){var i=e.indexOf("\n",r+1);if(i!==-1)return n=e.substring(0,r)+e.substring(i+1,e.length),F(n,t)}return n}function I(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].trim();s!==""&&(t+=s+"\n")}return q(t)}function q(e){var t=e.lastIndexOf("\n"),n=e.length;return t===n-1?e.substring(0,t):e}function R(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].trim();s=s.replace(/\s+/g," "),s!==""&&(t+=s+"\n")}return t}function U(e){var t=document.createElement("div");t.innerHTML=e;var n=t.querySelectorAll("style, defs, path, text, use");for(var r=0,i=n.length;r<i;r++){var s=n[r];s.parentNode.removeChild(s)}return R(t.innerHTML)}function z(e,t){var n=e.split(h),r=t.split(h),i=n.length,s=r.length;if(i!==s)return e;var o="";for(var u=0,a=i;u<a;u++){var f=n[u],l=U(r[u]),c=l.indexOf('<g class="music"');o+=f+l.substring(c,l.length)+h}return o}var e={};const t="abc-tempo",n="abc-source",r="view-source",i="view-editor",s="div."+n+"."+r+", div."+n+"."+i,o="%%score",u="%%tempo",a="%%piano",f="%%chorus",l="clef=treble",c="clef=bass",h="</svg>",p={en:{soprano:"Soprano",sopranoShort:"S",alto:"Alto",altoShort:"A",tenor:"Tenor",tenorShort:"T",bass:"Bass",bassShort:"B",KG:"G key",KGShort:"GK",KF:"F key",KFShort:"FG"},fr:{soprano:"Soprano",sopranoShort:"S",alto:"Alto",altoShort:"A",tenor:"Ténor",tenorShort:"T",bass:"Basse",bassShort:"B",KG:"Clé de sol",KGShort:"Sol",KF:"Clé de fa",KFShort:"Fa"}};var d="en";const v="../../../../editors/abc2svg/index.html",m="../../../../editors/abc_ui/index.html",g="http://dev.music.free.fr/editors/abc_ui/index.html",y=["scores","score","staves","keywarn","timewarn","stemheight","bstemdown","flatbeams","slurheight","squarebreve","voicecombine","singleline","dblrepbar","graceslurs","gracespace","graceword","stafflines","cancelkey","ambitus","straightflags","MIDI","voicemap","diagram","chordnames","measurenb","measurebox ","setbarnb","contbarnb","equalbars","barsperstaff","break","stretchlast","stretchstaff","leftmargin","pagewidth","soloffs","musicspace","shiftunison","textoption","begintext","endtext","center","infoline","aligncomposer","composerfont","composerspace","hyphencont","text","clef","pos","map","sth"],b=["no_player","player_off","player_no_voice","tempo"],w=["piano","chorus"],E=["beambr1","beambr2","ped","ped-up","ped(","ped)","1","2","3","4","5","/","//","///","-(","-)","roll","snap","thumb","open","+","0","breath","shortphrase","mediumphrase","longphrase","tenuto","wedge","accent","^","upbow","downbow","emphasis","marcato","arpeggio","mordent","uppermordent","lowermordent","trill","pralltriller","trill(","trill)","diminuendo(","diminuendo)","crescendo(","crescendo)","fermata","invertedfermata","D.C.","coda","D.S.","segno","fine","turn","turnx","invertedturn","invertedturnx","mf","f","ff","fff","ffff","mp","p","pp","ppp","pppp","8va(","8va)","8vb(","8vb)"],S=["red","blue","green","brown","orange","yellow","gray","cyan","coral","gold","khaki","indigo","lime","navy","orchid","pink","peru","plum","purple","tan","teal"],x=["o>(","o>)","b>(","b>)","g>(","g>)","r>(","r>)","n>(","n>)",">(",">)"];var T={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},encode:function(e){var t,n,r,i,s,o,u,a="",f=0;for(e=T._utf8_encode(e);f<e.length;)i=(t=e.charCodeAt(f++))>>2,s=(3&t)<<4|(n=e.charCodeAt(f++))>>4,o=(15&n)<<2|(r=e.charCodeAt(f++))>>6,u=63&r,isNaN(n)?o=u=64:isNaN(r)&&(u=64),a=a+this._keyStr.charAt(i)+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u);return a}};return e.remapVoiceName=function(e,t){t=t||"en";const n={KG:p[t].KG,KF:p[t].KF,S:p[t].soprano,A:p[t].alto,T:p[t].tenor,B:p[t].bass};var r=e.id.toUpperCase();return e.nm?n[e.nm]?n[e.nm]:e.nm:n[r]?n[r]:e.id},e.isActiveVoice=function(e){const t=["D","C","N"];return t.indexOf(e.toUpperCase())===-1},e.updateTempo=function(e,t){return j(e,t)},e.buildTempoSlider=function(e,t){return H(e,t)},e.normalize=function(e,t){return B(e,t)},e.addHtmlVievers=function(e){return N(e)},e.remove=function(e,t){return F(e,t)},e.svgMerge=function(e,t){return z(e,t)},e}(),$ABC_EVENTS=function(){"use strict";function u(e){o&&console.log("$ABC_EVENTS."+e)}function a(){u("init"),t=null,n=0,r=0,i=0,s=0}function f(e,n,o){function L(e){const t=e.v;for(var n=0;n<10;n++)m[t].set(v,n*7);g[t].set(m[t])}function A(e){v=[0,0,0,0,0,0,0];switch(e.k_sf){case 7:v[6]=1;case 6:v[2]=1;case 5:v[5]=1;case 4:v[1]=1;case 3:v[4]=1;case 2:v[0]=1;case 1:v[3]=1;break;case-7:v[3]=-1;case-6:v[0]=-1;case-5:v[4]=-1;case-4:v[1]=-1;case-3:v[5]=-1;case-2:v[2]=-1;case-1:v[6]=-1}L(e)}function O(){for(var e=0;e<a;e++){var t=n[e].clef;y[e]=!t.clef_octave||t.clef_oct_transp?0:t.clef_octave;var r=n[e],i=r.instr||0;r.midictl&&(r.midictl[32]&&(i+=r.midictl[32]*128),r.midictl[0]&&(i+=r.midictl[0]*128*128)),b[e]=i,m[e]=new Float32Array(70),g[e]=new Float32Array(70),r.key.v=e,A(r.key)}}function M(e,t){var n=e.notes[t],r=n.pit+19-7,i=n.acc;y[e.v]&&(r+=y[e.v]),i?(i==3?i=0:n.micro_n&&(console.log("micro tone not supported"),i=(i<0?-n.micro_n:n.micro_n)/n.micro_d*2),d[r]=i):i=d[r];var s=r/7|0;return r=h[r%7]+i,r>=12?(r-=12,s++):r<0&&(r+=12,s--),c[r]+l[s]}function _(t){if(t.v!=w)return null;var n;if(t.bar_type[0]===":"){u("_handle_bar with ':|' or ':]'"),t.bar_type="|"+t.bar_type.slice(1),N=t,C||(C=t);if(T){t=T;for(n=0;n<a;n++)g[n].set(S[n]),y[n]=E[n];r=x}else t=e,O();return s=t.time,t}if(!t.invis)for(n=0;n<a;n++)g[n].set(m[n]);if(t.bar_type[t.bar_type.length-1]==":"){u("_handle_bar with '|:'"),T=t,C=null;for(n=0;n<a;n++)S||(S=[]),S[n]||(S[n]=new Float32Array(70)),S[n].set(g[n]),E||(E=[]),E[n]=y[n];x=r}else t.text&&t.text[0]=="1"&&(u("_handle_bar with 1st time repeat"),C=t);return null}function D(e,t,n){u("_do_tie");var i,s,o,a=e.time+e.dur,f=e.notes[t],l=f.pit;for(o=e.next;;o=o.next){if(!o||o.time!=a)return n;if(o==C){var c=o.v;o=N.ts_next;while(o&&o.v!==c)e=e.ts_next;if(!e)return n;a=o.time}if(o.time!=a)return n;if(o.type==abc2svg.C.NOTE)break}s=o.notes.length;for(i=0;i<s;i++){f=o.notes[i];if(f.pit==l)return n+=o.dur/r,f.ti2=!0,f.ti1?D(o,i,n):n}return n}function P(e,n,r){for(var i=0;i<=e.nhd;i++){var s=e.notes[i];if(s.ti2)continue;var a=!0;o&&(a=o.indexOf(e.v)===-1);if(a){s=M(e,i);var f=e.istart,l=e.notes[i].ti1?D(e,i,r):r,c=b[e.v];t.push([f,n,c,s,l]),u("add event: index="+f+", time="+n+", instrument="+c+", note='"+s+"', duration="+l)}}}function H(e){u("_gen_grace");var t=e.next;if(e.time==0&&s===0){var n=0;if(e.sappo)n=abc2svg.C.BLEN/16;else if(!t||t.type!=abc2svg.C.NOTE)n=k/2;s-=n}var o,a,l,c;if(e.sappo)c=f/16;else if((!t||t.type!=abc2svg.C.NOTE)&&e.prev&&e.prev.type==abc2svg.C.NOTE)c=e.prev.dur/2;else{t.ts_prev.ts_next=t.ts_next,t.ts_next.ts_prev=t.ts_prev;for(var h=t.ts_next;h;h=h.ts_next)if(h.time!=t.time){t.ts_next=h,t.ts_prev=h.ts_prev,t.ts_prev.ts_next=t,h.ts_prev=t;break}t.dots?t.dots==1?c=t.dur/3:c=t.dur*2/7:c=t.dur/2,t.time+=c,t.dur-=c}a=0;for(o=e.extra;o;o=o.next)o.type==abc2svg.C.NOTE&&a++;c/=a*r,l=i;for(o=e.extra;o;o=o.next){if(o.type!=abc2svg.C.NOTE)continue;P(o,l,c),l+=c}}const a=n.length,f=1536,l="012345678",c=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],h=[0,2,4,5,7,9,11];var p=e,d,v=[],m=[],g=[],y=[],b=[],w=null,E=null,S=null,x=null,T=null,N=null,C=null,k=null;O(),t?p.time<s&&(s=p.time):(t=[],s=i=0,r=f/4*80/60);while(p){if(p.tempo){var B=0;for(var j=0,F=p.tempo_notes.length;j<F;j++)B+=p.tempo_notes[j];r=B*p.tempo/60}var I=p.time-s;I>0&&(i+=I/r,s=p.time),p==C&&(p=N,s=p.time),d=g[p.v];switch(p.type){case abc2svg.C.BAR:var q=_(p);q!==null&&(p=q);break;case abc2svg.C.CLEF:y[p.v]=!p.clef_octave||p.clef_oct_transp?0:p.clef_octave;break;case abc2svg.C.GRACE:H(p);break;case abc2svg.C.KEY:A(p);break;case abc2svg.C.REST:case abc2svg.C.NOTE:k=p.dur;var R=p.next;if(R&&R.type===abc2svg.C.GRACE){I=0;if(R.sappo)I=abc2svg.C.BLEN/16;else if(!R.next||R.next.type!==abc2svg.C.NOTE)I=k/2;R.time-=I,k-=I}k/=r,p.type==abc2svg.C.NOTE?P(p,i,k):t.push([p.istart,i,-1,0,k]);break;case abc2svg.C.STAVES:w=p.sy.top_voice}p=p.ts_next}}function l(e,n,r){if(e===undefined)return;var i="",s={errmsg:function(e,t,n){console.log("%c "+e,"color: red;")},get_abcmodel:function(e,t){const r=t.length;if(r!==1)for(var s=0;s<r;s++){var o=n+"_V"+s,a=document.getElementById(o);if(a===undefined||a!==null&&a.checked===!1)i+=s+" "}u("voice_no_play="+i),f(e,t,i)}},o=$ABC_UTIL.remove(e,"%%voicecombine");a();var l="%%play\n"+r;try{abc=new Abc(s),abc.tosvg("play",l),abc.tosvg("follower.abc",o)}catch(c){var h="%c "+c.message+"\nabc2svg tosvg bug - stack:\n"+c.stack;console.log(h,"color: red;")}return t}var e={},t=null,n=0,r=0,i=0,s=0;const o=!1;return e.render=function(e,t,n){return u("render"),l(e,t,n)},e}(),$EVENT_PLAYER=function(){"use strict";function p(e){c&&console.log("$EVENT_PLAYER."+e)}function d(e,t,r){n[e]&&(p("_playNote("+e+", '"+t+"', "+r+")"),n[e].play(t,l,{duration:r}))}function v(){var e,n,c,p;if(u===0){r&&r();return}c=s[o++];if(!c||c[0]>u){r&&r();return}n=c[1]-a;for(;;){var m=c[2],g=c[3],y=c[4];d(m,g,y);if(i){var b=c[0],w=(c[1]+f-t.currentTime)*h,E=w+y*h;setTimeout(i,w,b,!0),setTimeout(i,E,b,!1)}p=s[o];if(!p){e=n+y;break}c=p,e=c[1]-a;if(e!=n)break;o++}l+=e-n,setTimeout(v,(l-t.currentTime-1)*h)}function m(e,n,i){p("_play("+e+", "+n+")"),s=i;if(!s||!s.length){r&&r();return}o=0,u=n,a=0;while(s[o]&&o<e&&e!=0)a=s[o][1],o++;s[o]&&(l=t.currentTime+s[o][1]-a),f=t.currentTime+.05,v()}function g(){return p("_stop() at index="+o),u=0,a=0,o}function y(e,s,o,u,a){r=s,i=o;if("AudioContext"in window)console.log("%cSound being generated with window.AudioContext.","color: green;"),t=new window.AudioContext;else{if(!("webkitAudioContext"in window)){alert("Web Audio API is not available!\nCan't generate sound!");return}console.log("%cSound being generated with window.webkitAudioContext.","color: green;"),t=new window.webkitAudioContext}if(t===null&&a){a("Web Audio API is not available!");return}$SF_PLAYER.init(t,e,function(e){n[e.index]=e,u&&u(e)},function(e){a&&a(e)})}var e={},t=null,n={},r=null,i=null,s=null,o=0,u=0,a=0,f=0,l=0;const c=!1,h=1e3;return e.init=function(e,t,n,r,i){p("init"),y(e,t,n,r,i)},e.play=function(e,t,n){p("play"),m(e,t,n)},e.stop=function(){return p("stop"),g()},e.playNote=function(e,t,n){p("playNote"),d(e,t,n)},e}();if(typeof MIDI=="undefined")var MIDI={};typeof MIDI.Soundfont=="undefined"&&(MIDI.Soundfont={});var $SF_PLAYER=function(){"use strict";function i(e,n){t&&console.log("$SF_PLAYER."+e)}function s(e,t){n&&console.log("$SF_PLAYER - "+e,t)}function o(e,t,n,r){i("_load");var s=null;l(t)?s=c:w(t)?s=E:h(t)?s=p:y(t)?s=b:u(t)&&(s=a);var o=n||{};return s?s(e,t,o):r?Promise.resolve(r):Promise.reject("Source not valid ("+t+")")}function a(e,t,n){i("_loadMidiJSFile");var r=g(n.from,t);return o(e,o.fetch(r,"text").then(f),n)}function f(e){i("_midiJsToJson");var t=e.indexOf("MIDI.Soundfont.");if(t<0)throw Error("Invalid MIDI.js Soundfont format");t=e.indexOf("=",t)+2;var n=e.lastIndexOf(",");return JSON.parse(e.slice(t,n)+"}")}function l(e){return e instanceof ArrayBuffer}function c(e,t,n){return i("_loadArrayBuffer"),new Promise(function(n,r){e.decodeAudioData(t,function(e){n(e)},function(){r("Can't decode audio data ("+t.slice(0,30)+"...)")})})}function h(e){return e&&typeof e=="object"}function p(e,t,n){i("_loadObjectData");var r="",s={},u=Object.keys(t).map(function(i){if(n.only&&n.only.indexOf(i)===-1)return null;r+=i+", ";var u=t[i];return o(e,u,n,u).then(function(e){s[i]=e})});return Promise.all(u).then(function(){return i(r),s})}function d(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0}function v(e,t){var n=e.replace(/[^A-Za-z0-9\+\/]/g,""),r=n.length,i=t?Math.ceil((r*3+1>>2)/t)*t:r*3+1>>2,s=new Uint8Array(i);for(var o,u,a=0,f=0,l=0;l<r;l++){u=l&3,a|=d(n.charCodeAt(l))<<18-6*u;if(u===3||r-l===1){for(o=0;o<3&&f<i;o++,f++)s[f]=a>>>(16>>>o&24)&255;a=0}}return s}function m(e){return function(t){return typeof t=="string"&&e.test(t)}}function g(e,t){return typeof e=="string"?e+t:typeof e=="function"?e(t):t}function b(e,t,n){i("_loadBase64Audio");var r=t.indexOf(",");return o(e,v(t.slice(r+1)).buffer,n)}function w(e){return e&&typeof e.then=="function"}function E(e,t,n){return i("_loadPromise"),t.then(function(t){return o(e,t,n)})}function S(e){i("ADSR");var t=e.createGain(),n=t._voltage=N(e),r=C(n),s=C(n),o=C(n);return t._startAmount=C(s),t._endAmount=C(o),t._multiplier=C(r),t._multiplier.connect(t),t._startAmount.connect(t),t._endAmount.connect(t),t.value=r.gain,t.startValue=s.gain,t.endValue=o.gain,t.startValue.value=0,t.endValue.value=0,Object.defineProperties(t,x),t}function N(e){i("getVoltage");var t=e.createBufferSource(),n=e.createBuffer(1,2,e.sampleRate);return n.getChannelData(0).set(T),t.buffer=n,t.loop=!0,t}function C(e){i("scale");var t=e.context.createGain();return e.connect(t),t}function k(e){return Math.log(e+1)/Math.log(100)}function L(e,t,n,r,i){var s=t-e,o=r-n,u=i-n,a=u/o,f=e+a*s;return f<=e&&(f=e),f>=t&&(f=t),f}function M(e,t,n){function f(t,n){return n.id=i++,s[n.id]=n,n.source.onended=function(){var t=e.currentTime;n.source.disconnect(),n.env.disconnect(),n.disconnect(),a.emit("ended",t,n.id,n)},n.id}function l(t,n,r){var i=e.createGain();return i.gain.value=0,i.connect(o),i.env=P(e,r,u),i.env.connect(i.gain),i.source=e.createBufferSource(),i.source.buffer=n,i.source.connect(i),i.source.loop=r.loop||u.loop,i.source.playbackRate.value=H(r.cents||u.cents),i.source.loopStart=r.loopStart||u.loopStart,i.source.loopEnd=r.loopEnd||u.loopEnd,i.stop=function(n){var r=n||e.currentTime;a.emit("stop",r,t);var s=i.env.stop(r);i.source.stop(s)},i}var r=!1,i=0,s={},o=e.createGain(),u=Object.assign({},O,n),a={context:e,out:o,opts:u};return t instanceof AudioBuffer?a.buffer=t:a.buffers=t,a.start=function(t,n,i){if(a.buffer&&t!==null)return a.start(null,t,n);var s=t?a.buffers[t]:a.buffer;if(!s){console.warn("Buffer "+t+" not found.");return}if(!r){console.warn("SamplePlayer not connected to any node.");return}var o=i||A;n=Math.max(e.currentTime,n||0),a.emit("start",n,t,o);var u=l(t,s,o);return u.id=f(t,u),u.env.start(n),u.source.start(n),a.emit("started",n,u.id,u),o.duration&&u.stop(n+o.duration),u},a.play=function(e,t,n){return a.start(e,t,n)},a.stop=function(e,t){var n;return t=t||Object.keys(s),t.map(function(t){return n=s[t],n?(n.stop(e),n.id):null})},a.connect=function(e){return r=!0,o.connect(e),a},a.emit=function(e,t,n,r){a.onevent&&a.onevent(e,t,n,r);var i=a["on"+e];i&&i(t,n,r)},a}function _(e){return typeof e=="number"}function P(e,t,n){i("envelope");var r=S(e),s=t.adsr||n.adsr;return D.forEach(function(e,i){s?r[e]=s[i]:r[e]=t[e]||n[e]}),r.value.value=_(t.gain)?t.gain:_(n.gain)?n.gain:1,r}function H(e){return e?Math.pow(2,e/1200):1}function B(e){return/\.js(\?.*)?$/i.test(e)}function j(e,t,n){return n=n==="ogg"?n:"mp3",t=t==="FluidR3_GM"?t:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+t+"/"+e+"-"+n+".js"}function F(e){return r.indexOf(e)}function I(e,t,n){var r=n||{};s("_initInstrument",t);if(MIDI.Soundfont[t])return s("Already loaded, decode Soundfont ",t),o(e,MIDI.Soundfont[t],{only:r.only||r.notes}).then(function(n){var i=M(e,n,r).connect(e.destination);return i.name=t,i.index=F(t),i});var i=r.isSoundfontURL||B,u=r.nameToUrl||j,a=i(t)?t:u(t,r.soundfont,r.format);return o(e,a,{only:r.only||r.notes}).then(function(n){s("Load and decode ",a);var i=M(e,n,r).connect(e.destination);return i.url=a,i.name=t,i.index=F(t),i})}function q(e){function t(e){var t=[];for(var n=0,r=e.length;n<r;n++){var i=-1;typeof e[n]=="number"?i=e[n]:typeof e[n]=="string"&&(i=F(e[n])),i<=128&&i!=-1&&t.push(i)}return t}function n(e){return e.sort().filter(function(e,t,n){return!t||e!=n[t-1]})}return n(t(e))}var e={};const t=!1,n=!1,r=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honky-tonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass__lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_sci-fi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];o.fetch=function(e,t){return i("_load.fetch"),new Promise(function(n,r){var i=new XMLHttpRequest;t&&(i.responseType=t),i.open("GET",e),i.onload=function(){i.status===200?n(i.response):r(Error(i.statusText))},i.onerror=function(){r(Error("Network Error"))},i.send()})};var u=m(/\.js(\?.*)?$/i),y=m(/^data:audio/),x={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(e){i("start");var t=this._multiplier.gain,n=this._startAmount.gain,r=this._endAmount.gain;this._voltage.start(e),this._decayFrom=this._decayFrom=e+this.attack,this._startedAt=e;var s=this.sustain;t.cancelScheduledValues(e),n.cancelScheduledValues(e),r.cancelScheduledValues(e),r.setValueAtTime(0,e),this.attack?(t.setValueAtTime(0,e),t.linearRampToValueAtTime(1,e+this.attack),n.setValueAtTime(1,e),n.linearRampToValueAtTime(0,e+this.attack)):(t.setValueAtTime(1,e),n.setValueAtTime(0,e)),this.decay&&t.setTargetAtTime(s,this._decayFrom,k(this.decay))}},stop:{value:function(e,t){i("stop"),t&&(e-=this.release);var n=e+this.release;if(this.release){var r=this._multiplier.gain,s=this._startAmount.gain,o=this._endAmount.gain;r.cancelScheduledValues(e),s.cancelScheduledValues(e),o.cancelScheduledValues(e);var u=k(this.release);if(this.attack&&e<this._decayFrom){var a=L(0,1,this._startedAt,this._decayFrom,e);r.linearRampToValueAtTime(a,e),s.linearRampToValueAtTime(1-a,e),s.setTargetAtTime(0,e,u)}o.setTargetAtTime(1,e,u),r.setTargetAtTime(0,e,u)}return this._voltage.stop(n),n}},onended:{get:function(){return this._voltage.onended},set:function(e){this._voltage.onended=e}}},T=new Float32Array([1,1]),A={},O={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0},D=["attack","decay","sustain","release"];return e.init=function(e,t,n,i,o){if(typeof u=="undefined")var u={};typeof u.Soundfont=="undefined"&&(u.Soundfont={}),t=q(t);var a=t.length;s(a,"instrument(s) to initialize.");for(var f=0;f<a;f++){var l=t[f],c=r[l];s("#"+l,c),I(e,c).then(function(e){console.log('%cSoundfont instrument "'+e.name+'" loaded. (MIDI program '+e.index+")","color: green;"),n&&n(e)},function(e){i&&i(e)})}},e}();abc2svg={C:{BLEN:1536,BAR:0,CLEF:1,CUSTOS:2,GRACE:4,KEY:5,METER:6,MREST:7,NOTE:8,PART:9,REST:10,SPACE:11,STAVES:12,STBRK:13,TEMPO:14,BLOCK:16,REMARK:17,FULL:0,EMPTY:1,OVAL:2,OVALBARS:3,SQUARE:4,SL_ABOVE:1,SL_BELOW:2,SL_AUTO:3,SL_HIDDEN:4,SL_DOTTED:8},Abc:function(user){"use strict";function clone(e,t){if(!e)return e;var n=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(t&&typeof e[r]=="object"?n[r]=clone(e[r],t-1):n[r]=e[r]);return n}function errbld(e,t,n,r){var i,s,o,u,a;if(user.errbld){switch(e){case 0:e="warn";break;case 1:e="error";break;default:e="fatal"}user.errbld(e,t,n,r);return}if(r!=undefined&&r>=0){i=o=0;for(;;){s=parse.file.indexOf("\n",i);if(s<0||s>r)break;o++,i=s+1}u=r-i}a="",n&&(a=n,o&&(a+=":"+(o+1)+":"+(u+1)),a+=" ");switch(e){case 0:a+="Warning: ";break;case 1:a+="Error: ";break;default:a+="Internal bug: "}user.errmsg(a+t,o,u)}function error(e,t,n,r,i,s,o){var u,a,f,l;user.textrans&&(l=user.textrans[n],l&&(n=l)),arguments.length>3&&(n=n.replace(/\$./g,function(e){switch(e){case"$1":return r;case"$2":return i;case"$3":return s;default:return o}})),t&&t.fname?errbld(e,n,t.fname,t.istart):errbld(e,n)}function scanBuf(){this.index=0,scanBuf.prototype.char=function(){return this.buffer[this.index]},scanBuf.prototype.next_char=function(){return this.buffer[++this.index]},scanBuf.prototype.get_int=function(){var e=0,t=this.buffer[this.index];while(t>="0"&&t<="9")e=e*10+Number(t),t=this.next_char();return e}}function syntax(e,t,n,r,i,s){var o={fname:parse.fname,istart:parse.istart+parse.line.index};error(e,o,t,n,r,i,s)}function js_inject(js){/eval *\(|Function|setTimeout|setInterval/.test(js)?syntax(1,"Unsecure code"):eval('"use strict"\n'+js)}function y_get(e,t,n,r){var i,s=staff_tb[e],o=n/realwidth*YSTEP|0,u=(n+r)/realwidth*YSTEP|0;o<0&&(o=0),u>=YSTEP&&(u=YSTEP-1,o>u&&(o=u));if(t){i=s.top[o++];while(o<=u)i<s.top[o]&&(i=s.top[o]),o++}else{i=s.bot[o++];while(o<=u)i>s.bot[o]&&(i=s.bot[o]),o++}return i}function y_set(e,t,n,r,i){var s=staff_tb[e],o=n/realwidth*YSTEP|0,u=(n+r)/realwidth*YSTEP|0;o<0&&(o=0),u>=YSTEP&&(u=YSTEP-1,o>u&&(o=u));if(t)while(o<=u)s.top[o]<i&&(s.top[o]=i),o++;else while(o<=u)s.bot[o]>i&&(s.bot[o]=i),o++}function up_p(e,t){switch(t){case C.SL_ABOVE:return!0;case C.SL_BELOW:return!1}return e.multi&&e.multi!=0?e.multi>0:e.p_v.have_ly?e.pos.voc!=C.SL_ABOVE:!1}function d_arp(e){var t,n,r,i=e.s,s=e.dd,o=5;if(i.type==C.NOTE)for(t=0;t<=i.nhd;t++){if(i.notes[t].acc)r=5+i.notes[t].shac;else{r=6-i.notes[t].shhd;switch(i.head){case C.SQUARE:r+=3.5;break;case C.OVALBARS:case C.OVAL:r+=2}}r>o&&(o=r)}n=3*(i.notes[i.nhd].pit-i.notes[0].pit)+4,t=s.h,n<t&&(n=t),e.has_val=!0,e.val=n,e.x-=o,e.y=3*(i.notes[0].pit-18)-3}function d_cresc(e){if(e.ldst)return;var t,n,r,i,s,o,u,a,f=e.s,l=e.start,c,h;t=l.s,s=t.x+3,a=l.ix,a>0&&(c=a_de[a-1]),e.st=f.st,e.lden=!1,e.has_val=!0,i=up_p(f,f.pos.dyn),i&&(e.up=!0),c&&c.s==t&&(e.up&&!c.up||!e.up&&c.up)&&(r=c.dd,f_staff[r.func]&&(u=c.x+c.val+4,u>s&&(s=u))),e.defl.noen?(o=e.x-s,o<20&&(s=e.x-20-3,o=20)):(u=f.x,h=a_de[e.ix+1],h&&h.s==t&&(e.up&&!h.up||!e.up&&h.up)&&(r=h.dd,f_staff[r.func]&&(u-=5)),o=u-s-4,o<20&&(s-=(20-o)*.5,o=20)),e.val=o,e.x=s,e.y=y_get(e.st,i,s,o),i||(n=e.dd,e.y-=n.h)}function d_near(e){var t,n,r=e.s,i=e.dd;if(i.str)return;r.multi?n=r.multi>0:n=r.stem<0,n?t=r.ymx|0:t=r.ymn-i.h|0,t>-6&&t<24&&(n&&(t+=3),t=((t+6)/6|0)*6-6),n?r.ymx=t+i.h:r.ymn=t,e.y=t,r.type==C.NOTE&&(e.x+=r.notes[r.stem>=0?0:r.nhd].shhd),i.name[0]=="d"&&r.nflags>=-1&&(n?r.stem>0&&(e.x+=3.5):r.stem<0&&(e.x-=3.5))}function d_pf(e){var t,n,r,i,s=e.s,o=e.dd,u;e.val=o.wl+o.wr,i=up_p(s,s.pos.vol),i&&(e.up=!0),r=s.x-o.wl,e.ix>0&&(u=a_de[e.ix-1],u.s==s&&(e.up&&!u.up||!e.up&&u.up)&&(t=u.dd,f_staff[t.func]&&(n=u.x+u.val+4,n>r&&(r=n)))),e.x=r,e.y=y_get(s.st,i,r,e.val),i||(e.y-=o.h)}function d_slide(e){var t,n,r=e.s,i=r.notes[0].pit,s=5;for(t=0;t<=r.nhd;t++){if(r.notes[t].acc)n=4+r.notes[t].shac;else{n=5-r.notes[t].shhd;switch(r.head){case C.SQUARE:n+=3.5;break;case C.OVALBARS:case C.OVAL:n+=2}}r.notes[t].pit<=i+3&&n>s&&(s=n)}e.x-=s,e.y=3*(i-18)}function d_trill(e){if(e.ldst)return;var t,n,r,i,s,o=e.s,u=o.st,a=e.start.s,f=a.x;e.prev&&(f=e.prev.x+10,r=e.prev.y),e.st=u;if(e.dd.func!=4)switch(e.dd.glyph){case"8va":case"15ma":n=1;break;default:n=o.multi>=0}e.defl.noen?(i=e.x-f,i<20&&(f=e.x-20-3,i=20)):(i=o.x-f-6,o.type==C.NOTE&&(i-=6),i<20&&(f-=(20-i)*.5,i=20)),t=e.dd,r||(r=y_get(u,n,f,i)),n?(s=staff_tb[a.st].topbar+2,r<s&&(r=s)):(r-=t.h,s=staff_tb[a.st].botbar-2,r>s&&(r=s)),e.lden=!1,e.has_val=!0,e.val=i,e.x=f,e.y=r,n&&(r+=t.h),y_set(u,n,f,i,r),n?a.ymx=o.ymx=r:a.ymn=o.ymn=r}function d_upstaff(e){if(e.ldst)return;if(e.start){d_trill(e);return}var t,n,r,i=e.s,s=e.dd,o=i.x,u=s.wl+s.wr,a=staff_tb[i.st].topbar+2,f=staff_tb[i.st].botbar-2;i.nhd&&(o+=i.notes[i.stem>=0?0:i.nhd].shhd),n=-1;if(s.func==4)n=0;else if(i.pos)switch(i.pos.orn){case C.SL_ABOVE:n=1;break;case C.SL_BELOW:n=0}switch(s.glyph){case"accent":case"roll":!n||n<0&&(i.multi<0||!i.multi&&i.stem>0)?(t=y_get(i.st,!1,i.x-s.wl,u)-2,t>f&&(t=f),t-=s.h,y_set(i.st,!1,i.x,0,t),r=!0,i.ymn=t):(t=y_get(i.st,!0,i.x-s.wl,u)+2,t<a&&(t=a),y_set(i.st,!0,i.x-s.wl,u,t+s.h),i.ymx=t+s.h);break;case"brth":case"lphr":case"mphr":case"sphr":t=a+1,s.glyph=="brth"&&t<i.ymx&&(t=i.ymx);for(i=i.ts_next;i;i=i.ts_next)if(i.seqst)break;o+=((i?i.x:realwidth)-o)*.45;break;default:s.name.indexOf("invert")==0&&(r=!0),s.name!="invertedfermata"&&(n>0||n<0&&i.multi>=0)?(t=y_get(i.st,!0,i.x-s.wl,u)+2,t<a&&(t=a),y_set(i.st,!0,i.x-s.wl,u,t+s.h),i.ymx=t+s.h):(t=y_get(i.st,!1,i.x-s.wl,u)-2,t>f&&(t=f),t-=s.h,y_set(i.st,!1,i.x-s.wl,u,t),s.name=="fermata"&&(r=!0),i.ymn=t)}r&&(t+=s.h,e.inv=!0),e.x=o,e.y=t}function deco_add(e){var t=e.match(/(\S*)\s+(.*)/);decos[t[1]]=t[2]}function deco_def(e){var t,n,r,i,s,o,u,a,f=decos[e];if(!f){cfmt.decoerr&&error(1,null,"Unknown decoration '$1'",e);return}t=f.match(/(\d+)\s+(.+?)\s+([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)/);if(!t){error(1,null,"Invalid decoration '$1'",e);return}var l=Number(t[1]),c=parseFloat(t[3]),h=parseFloat(t[4]),p=parseFloat(t[5]);if(isNaN(l)){error(1,null,"%%deco: bad C function value '$1'",t[1]);return}if((l<0||l>10)&&(l<32||l>41)){error(1,null,"%%deco: bad C function index '$1'",l);return}if(c<0||h<0||p<0){error(1,null,"%%deco: cannot have a negative value '$1'",f);return}if(c>50||h>80||p>80){error(1,null,"%%deco: abnormal h/wl/wr value '$1'",f);return}n=dd_tb[e],n||(n={name:e},dd_tb[e]=n),n.func=n.name.indexOf("head-")==0?9:l,n.glyph=t[2],n.h=c,n.wl=h,n.wr=p,a=f.replace(t[0],"").trim(),a&&(a[0]=='"'&&(a=a.slice(1,-1)),n.str=a),n.func==6&&n.str==undefined&&(n.str=n.name),s=n.name.slice(-1);if(s=="("||s==")"&&n.name.indexOf("(")<0){i=n.name.slice(0,-1)+(s=="("?")":"("),r=dd_tb[i];if(r)s=="("?(n.dd_en=r,r.dd_st=n):(n.dd_st=r,r.dd_en=n);else{r=deco_def(i);if(!r)return}}return n}function deco_cnv(e,t,n){var r,i,s,o,u,a=e.length;for(r=0;r<a;r++){o=e[r],s=dd_tb[o];if(!s){s=deco_def(o);if(!s)continue}switch(s.func){case 0:if(t.type==C.BAR&&s.name=="dot"){t.bar_dotted=!0;break};case 1:case 2:if(!t.notes){error(1,t,errs.must_note_rest,s.name);continue}break;case 8:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}u=t.notes[t.nhd],u.a_dcn||(u.a_dcn=[]),u.a_dcn.push(s.name);continue;case 9:if(!t.notes){error(1,t,errs.must_note_rest,s.name);continue}for(i=0;i<=t.nhd;i++)u=t.notes[i],u.a_dcn||(u.a_dcn=[]),u.a_dcn.push(s.name);continue;default:break;case 10:if(t.notes)for(i=0;i<=t.nhd;i++)t.notes[i].color=s.name;else t.color=s.name;continue;case 32:t.invis=!0;continue;case 33:if(t.type!=C.BAR){error(1,t,"!beamon! must be on a bar");continue}t.beam_on=!0;continue;case 34:if(t.type!=C.NOTE||!n||n.type!=C.NOTE||t.nflags!=n.nflags){error(1,t,"!$1! must be on the last of a couple of notes",s.name);continue}t.trem2=!0,t.beam_end=!0,n.trem2=!0,n.beam_st=!0,t.ntrem=n.ntrem=Number(s.name[4]),n.nflags=--t.nflags,n.head=++t.head,t.nflags>0?t.nflags+=t.ntrem:(t.nflags<=-2&&(t.stemless=!0,n.stemless=!0),t.nflags=t.ntrem),n.nflags=t.nflags;for(i=0;i<=t.nhd;i++)t.notes[i].dur*=2;for(i=0;i<=n.nhd;i++)n.notes[i].dur*=2;continue;case 35:if(t.type!=C.NOTE){error(1,t,"!xstem! must be on a note");continue}t.xstem=!0,t.nflags=0;continue;case 36:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}s.name[6]=="1"?t.beam_br1=!0:t.beam_br2=!0;continue;case 37:t.rbstop=1;continue;case 38:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}t.trem1=!0,t.ntrem=s.name.length,t.nflags>0?t.nflags+=t.ntrem:t.nflags=t.ntrem;continue;case 39:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}t.feathered_beam=s.name[5]=="a"?1:-1;continue;case 40:t.stemless=!0;continue;case 41:t.rbstop=2;continue}t.a_dd||(t.a_dd=[]),t.a_dd.push(s)}}function deco_update(e,t){var n,r,i=a_de.length;for(n=0;n<i;n++)r=a_de[n],r.s==e&&(r.x+=t)}function deco_width(e){var t,n,r=0,i=e.a_dd,s=i.length;for(n=0;n<s;n++){t=i[n];switch(t.func){case 1:r<7&&(r=7);break;case 2:r<14&&(r=14);break;case 3:switch(t.glyph){case"brth":case"lphr":case"mphr":case"sphr":e.wr<20&&(e.wr=20)}}}return r!=0&&e.prev&&e.prev.type==C.BAR&&(r-=3),r}function draw_all_deco(){if(a_de.length==0)return;var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v=[],m=[];if(!cfmt.dynalign){o=nstaff,a=staff_tb[o].y;while(--o>=0)f=staff_tb[o].y,m[o]=(a+24+f)*.5,a=f}for(;;){e=a_de.shift();if(!e)break;n=e.dd;if(!n)continue;if(n.dd_en)continue;r=e.s,s=n.glyph,h=s.indexOf("/"),h>0&&(r.stem>=0?s=s.slice(0,h):s=s.slice(h+1)),f_staff[n.func]?set_sscale(r.st):set_scale(r),o=e.st;if(!staff_tb[o].topbar)continue;u=e.x,a=e.y+staff_tb[o].y;if(e.m!=undefined)i=r.notes[e.m],u+=i.shhd*stv_g.scale;else if(f_staff[n.func]&&!cfmt.dynalign&&(e.up&&o>0||!e.up&&o<nstaff)){e.up?l=m[--o]:l=m[o++],l-=n.h*.5;if(e.up&&a<l||!e.up&&a>l){f=y_get(o,!e.up,e.x,e.val)+staff_tb[o].y,e.up&&(f-=n.h);if(e.up&&f>l||!e.up&&f<l)a=l}}c=user[s];if(c&&typeof c=="function"){c(u,a,e);continue}if(self.psdeco(s,u,a,e))continue;anno_start(r,"deco"),e.inv&&(g_open(u,a,0,1,-1),u=a=0),e.has_val?(n.func!=2||stv_g.st<0?out_deco_val(u,a,s,e.val/stv_g.scale,e.defl):out_deco_val(u,a,s,e.val,e.defl),e.defl.noen&&v.push(e.start)):n.str!=undefined&&n.str!="sfz"?(p=n.str,p[0]=="@"&&(d=p.match(/^@([0-9.-]+),([0-9.-]+);?/),u+=Number(d[1]),a+=Number(d[2]),p=p.replace(d[0],"")),out_deco_str(u,a,s,p)):e.lden?out_deco_long(u,a,e):xygl(u,a,s),stv_g.g&&g_close(),anno_stop(r,"deco")}a_de=v}function draw_deco_near(){function n(e){var t,n,r=e.x-e.wl,i=a_de.length;for(t=0;t<i;t++)n=a_de[t],n.ix=t,n.s.x=n.x=r,n.defl.nost=!0}function r(e){var t,n,r,i,s,o,u=e.a_dd.length;for(n=0;n<u;n++){t=e.a_dd[n];switch(t.func){default:i=0;break;case 3:case 4:case 5:if(ottava[t.name]){o=t.name.slice(0,-1)+e.st.toString();if(od[o]){if(t.name[t.name.length-1]=="("){od[o]++;continue}od[o]--;if(e.v+1!=od[o]>>8||!od[o])continue;od[o]&=255}else t.name[t.name.length-1]=="("&&(od[o]=1+(e.v+1<<8))}i=e.pos.orn;break;case 6:i=e.pos.vol;break;case 7:i=e.pos.dyn}if(i==C.SL_HIDDEN)continue;s={s:e,dd:t,st:e.st,ix:a_de.length,defl:{},x:e.x,y:e.y},a_de.push(s),t.dd_en?s.ldst=!0:t.dd_st&&(s.lden=!0,s.defl.nost=!0);if(!f_near[t.func])continue;func_tb[t.func](s)}}function i(e,t){var n,r,i,s,o,u,a,f=e.notes[t],l=f.a_dcn.length;for(o=0;o<l;o++){u=f.a_dcn[o],a=dd_tb[u];if(!a){a=deco_def(u);if(!a)continue}switch(a.func){case 0:case 1:case 3:case 4:case 8:break;default:error(1,null,"Cannot have !$1! on a head",a.name);continue;case 9:f.invis=!0;break;case 10:f.color=a.name;continue;case 32:f.invis=!0;continue;case 40:e.stemless=!0;continue}i={s:e,dd:a,st:e.st,m:t,ix:0,defl:{},x:e.x,y:3*(f.pit-18)},a_de.push(i),a.dd_en?i.ldst=!0:a.dd_st&&(i.lden=!0,i.defl.nost=!0)}}function s(e){var t;e.a_dd&&r(e);if(e.notes)for(t=0;t<e.notes.length;t++)e.notes[t].a_dcn&&i(e,t)}function o(){var e,t,n,r,i,s,o,u,a,f=a_de.length;for(e=0;e<f;e++){n=a_de[e];if(!n.ldst)continue;i=n.dd,s=i.dd_en,u=n.s,o=u.v;for(t=e+1;t<f;t++){r=a_de[t];if(!r.start&&r.dd==s&&r.s.v==o)break}if(t==f){a=u.st;for(t=e+1;t<f;t++){r=a_de[t];if(!r.start&&r.dd==s&&r.s.st==a)break}}t==f&&(r={s:n.s,st:n.st,dd:s,ix:a_de.length-1,x:realwidth-6,y:n.s.y,lden:!0,defl:{noen:!0}},r.x<u.x+10&&(r.x=u.x+10),n.m!=undefined&&(r.m=n.m),a_de.push(r)),r.start=n,r.defl.nost=n.defl.nost,i.name=="trill("&&e>0&&a_de[e-1].dd.name=="trill"&&(r.prev=a_de[e-1])}for(e=0;e<f;e++){r=a_de[e];if(!r.lden||r.start)continue;u=r.s,n={s:prev_scut(u),st:r.st,dd:r.dd.dd_st,ix:a_de.length-1,y:u.y,ldst:!0},n.x=n.s.x,r.m!=undefined&&(n.m=r.m),a_de.push(n),r.start=n}}var e,t;for(e=tsfirst;e;e=e.ts_next){switch(e.type){case C.CLEF:case C.KEY:case C.METER:continue}break}a_de.length!=0&&n(e);for(;e;e=e.ts_next){switch(e.type){case C.BAR:case C.MREST:case C.NOTE:case C.REST:case C.SPACE:break;case C.GRACE:for(t=e.extra;t;t=t.next)s(t);default:continue}s(e)}o()}function draw_deco_note(){var e,t,n,r,i=a_de.length;for(e=0;e<i;e++)t=a_de[e],n=t.dd,r=n.func,f_note[r]&&t.m==undefined&&func_tb[r](t)}function draw_deco_staff(){function g(e){var t,n,i,s,o,u,a,f,l;i=staff_tb[e.st].topbar+25;for(t=e.sym;t;t=t.next){if(t.type!=C.BAR)continue;if(!t.rbstart||t.norepbra)continue;if(!t.next)break;l||(l=t,set_font("repeat")),n=t;for(;;){if(!t.next)break;t=t.next;if(t.rbstop)break}s=y_get(e.st,!0,n.x,t.x-n.x),i<s&&(i=s),n.text&&(f=strwh(n.text),s=y_get(e.st,!0,n.x+4,f[0]),s+=f[1],i<s&&(i=s)),t.rbstart&&(t=t.prev)}t=l;if(!t)return;set_dscale(e.st,!0),s=i*staff_tb[e.st].staffscale;for(;t;t=t.next){if(!t.rbstart||t.norepbra)continue;n=t;for(;;){if(!t.next)break;t=t.next;if(t.rbstop)break}if(n==t)break;r=n.x,t.type!=C.BAR?a=t.rbstop?0:t.x-realwidth+4:t.bar_type.length>1&&t.bar_type!="[]"||t.bar_type=="]"?n.st>0&&!(cur_sy.staves[n.st-1].flags&STOP_BAR)?a=t.wl:t.bar_type.slice(-1)==":"?a=12:t.bar_type[0]!=":"?a=0:a=8:a=t.rbstop?0:8,a=t.x-r-a,!t.next&&!t.rbstop&&!e.bar_start&&(e.bar_start=clone(t),e.bar_start.type=C.BAR,e.bar_start.bar_type="[",delete e.bar_start.text,e.bar_start.rbstart=1,delete e.bar_start.a_gch),n.text&&xy_str(r+4,s-gene.curfont.size-3,n.text),xypath(r,s),n.rbstart==2&&(output+="m0 20v-20"),output+="h"+a.toFixed(2),t.rbstop==2&&(output+="v20"),output+='"/>\n',y_set(n.st,!0,r,a,i+2),t.rbstart&&(t=t.prev)}}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v=new Array(nstaff),m=a_de.length;for(o=0;o<=nstaff;o++)v[o]={ymin:0,ymax:0};for(o=0;o<m;o++){a=a_de[o],f=a.dd;if(!f)continue;if(!f_staff[f.func]||a.m!=undefined)continue;func_tb[f.func](a);if(f.dd_en)continue;cfmt.dynalign&&(a.up?a.y>v[a.st].ymax&&(v[a.st].ymax=a.y):a.y<v[a.st].ymin&&(v[a.st].ymin=a.y))}for(o=0;o<m;o++){a=a_de[o],f=a.dd;if(!f)continue;if(f.dd_en||!f_staff[f.func])continue;cfmt.dynalign?(a.up?i=v[a.st].ymax:i=v[a.st].ymin,a.y=i):i=a.y,a.up&&(i+=f.h),y_set(a.st,a.up,a.x,a.val,i)}for(o=0;o<=nstaff;o++)v[o]={ymin:0,ymax:24};for(e=tsfirst;e;e=e.ts_next){if(!e.a_gch)continue;t||(t=e),c=null;for(h=0;h<e.a_gch.length;h++){l=e.a_gch[h];if(l.type!="g")continue;c=l;if(l.y<0)break}c&&(s=c.w,c.y>=0?(i=y_get(e.st,!0,e.x,s),i>v[e.st].ymax&&(v[e.st].ymax=i)):(i=y_get(e.st,!1,e.x,s),i<v[e.st].ymin&&(v[e.st].ymin=i)))}if(t){for(o=0;o<=nstaff;o++)d=staff_tb[o].botbar,v[o].ymin>d-4&&(v[o].ymin=d-4),p=staff_tb[o].topbar,v[o].ymax<p+4&&(v[o].ymax=p+4);set_dscale(-1);for(e=t;e;e=e.ts_next){if(!e.a_gch)continue;self.draw_gchord(e,v[e.st].ymin,v[e.st].ymax)}}for(u=0;u<voice_tb.length;u++){n=voice_tb[u];if(n.second||!n.sym)continue;g(n)}}function draw_measnb(){var e,t,n,r,i,s,o,u,a=cur_sy;for(t=0;t<=nstaff;t++)if(a.st_print[t])break;if(t>nstaff)return;set_dscale(t),staff_tb[t].staffscale!=1&&(u=get_font("measure").size,param_set_font("measurefont","* "+(u/staff_tb[t].staffscale).toString())),set_font("measure"),e=tsfirst,n=gene.nbar;if(n>1)if(cfmt.measurenb==0)o=!0,i=y_get(t,!0,0,20),i<staff_tb[t].topbar+14&&(i=staff_tb[t].topbar+14),cfmt.measurebox?xy_str_b(0,i,n.toString()):xy_str(0,i,n.toString()),y_set(t,!0,0,20,i+gene.curfont.size+2);else if(n%cfmt.measurenb==0){for(;;e=e.ts_next){switch(e.type){case C.METER:case C.CLEF:case C.KEY:case C.STBRK:continue}break}while(e.st!=t)e=e.ts_next;if(e.type!=C.BAR||!e.bar_num)e.prev&&e.prev.type!=C.CLEF&&(e=e.prev),r=e.x-e.wl,o=!0,s=cwid("0")*gene.curfont.swfac,n>=10&&(s*=n>=100?3:2),cfmt.measurebox&&(s+=4),i=y_get(t,!0,r,s),i<staff_tb[t].topbar+6&&(i=staff_tb[t].topbar+6),i+=2,cfmt.measurebox?(xy_str_b(r,i,n.toString()),i+=2,s+=3):xy_str(r,i,n.toString()),i+=gene.curfont.size,y_set(t,!0,r,s,i),e.ymx=i}for(;e;e=e.ts_next){switch(e.type){case C.STAVES:a=e.sy;for(t=0;t<nstaff;t++)if(a.st_print[t])break;set_sscale(t);continue;default:continue;case C.BAR:if(!e.bar_num)continue}n=e.bar_num;if(cfmt.measurenb==0||n%cfmt.measurenb!=0||!e.next)continue;o||(o=!0),s=cwid("0")*gene.curfont.swfac,n>=10&&(s*=n>=100?3:2),cfmt.measurebox&&(s+=4),r=e.x-s*.4,i=y_get(t,!0,r,s),i<staff_tb[t].topbar+6&&(i=staff_tb[t].topbar+6),e.next.type==C.NOTE&&(e.next.stem>0?i<e.next.ys-gene.curfont.size&&(i=e.next.ys-gene.curfont.size):i<e.next.y&&(i=e.next.y)),i+=2,cfmt.measurebox?(xy_str_b(r,i,n.toString()),i+=2,s+=3):xy_str(r,i,n.toString()),i+=gene.curfont.size,y_set(t,!0,r,s,i),e.ymx=i}gene.nbar=n,u&&param_set_font("measurefont","* "+u.toString())}function draw_notempo(e,t,n,r,i){var s,o,u,a=identify_note(e,r),f=a[0],l=a[1],c=a[2];out_XYAB('<g transform="translate(X,Y) scale(F)">\n',t+4,n+5,i);switch(f){case C.OVAL:o="HD";break;case C.EMPTY:o="Hd";break;default:o="hd"}xygl(-posx,posy,o),s=4;if(l){u=9,c>0&&(u+=4);switch(f){case C.SQUARE:u+=3;break;case C.OVALBARS:case C.OVAL:u+=2;break;case C.EMPTY:u+=1}s=u*l,u-=posx;while(--l>=0)xygl(u,posy,"dot"),u+=3.5}return r<C.BLEN&&(c<=0?out_stem(-posx,posy,21):(out_stem(-posx,posy,21,!1,c),s<6&&(s=6))),output+="</g>\n",(s+15)*i}function tempo_width(e){var t=0;return set_font("tempo"),e.tempo_str1&&(t=strwh(e.tempo_str1)[0]),e.tempo_ca&&(t+=strwh(e.tempo_ca)[0]),e.tempo_notes&&(t+=10*e.tempo_notes.length+6+cwid(" ")*gene.curfont.swfac*6+10),e.tempo_str2&&(t+=strwh(e.tempo_str2)[0]),t}function write_tempo(e,t,n){var r,i,s=.6*gene.curfont.size/15;set_font("tempo"),e.tempo_str1&&(xy_str(t,n,e.tempo_str1),t+=strwh(e.tempo_str1)[0]+3);if(e.tempo_notes){for(r=0;r<e.tempo_notes.length;r++)t+=draw_notempo(e,t,n,e.tempo_notes[r],s);xy_str(t,n,"="),t+=strwh("= ")[0],e.tempo_ca&&(xy_str(t,n,e.tempo_ca),t+=strwh(e.tempo_ca)[0]),e.tempo?(xy_str(t,n,e.tempo.toString()),i=cwid("0")*gene.curfont.swfac,t+=i+5,e.tempo>=10&&(t+=i,e.tempo>=100&&(t+=i))):t+=draw_notempo(e,t,n,e.new_beat,s)}e.tempo_str2&&xy_str(t,n,e.tempo_str2),e.del=!0}function draw_partempo(e,t){var n,r,i,s,o,u,a=0,f=0,l=staff_tb[e].topbar+8,c=0,h=1,p=0;for(n=tsfirst;n;n=n.ts_next){if(n.type!=C.TEMPO||n.del)continue;i||(i=n),o=tempo_width(n),n.time==0&&n.x>40&&(n.x=40),u=y_get(e,!0,n.x-16,o),u>l&&(l=u),p>=n.x-16&&!(c&h>>1)&&(c|=h),h<<=1,p=n.x-16+o}if(i){set_sscale(-1),set_font("tempo"),f=gene.curfont.size+2+2,u=2-f,s=u-f,c!=0&&(f*=2),t<l+f&&(a=l+f-t);for(n=i;n;n=n.ts_next){if(n.type!=C.TEMPO||n.del)continue;if(user.anno_start||user.anno_stop)n.wl=16,n.wr=30,n.ymn=c&1?s:u,n.ymx=n.ymn+14,anno_start(n);write_tempo(n,n.x-16,c&1?s:u),anno_stop(n),c>>=1}}l=staff_tb[e].topbar+8;for(n=tsfirst;n;n=n.ts_next){if(n.type!=C.PART)continue;r||(r=n,set_font("parts"),s=gene.curfont.size+2+2),o=strwh(n.text)[0],u=y_get(e,!0,n.x-10,o+3),l<u&&(l=u)}if(r){set_sscale(-1),t<l+s+f&&(a=l+s+f-t);for(n=r;n;n=n.ts_next){if(n.type!=C.PART)continue;n.x-=10;if(user.anno_start||user.anno_stop)o=strwh(n.text)[0],n.wl=0,n.wr=o,n.ymn=-f-s,n.ymx=n.ymn+s,anno_start(n);cfmt.partsbox?xy_str_b(n.x,2-f-s,n.text):xy_str(n.x,2-f-s,n.text),anno_stop(n)}}return a}function b_pos(e,t,n,r){function l(e){var t=Math.round((e+12)/6)*6-12;return t-e}var i,s,o,u,a=e?3.5:BEAM_SHIFT,f=e?1.8:BEAM_DEPTH;if(t>0){s=r-(n-1)*a-f;if(s>26)return 0;i=r}else{i=r+(n-1)*a+f;if(i<-2)return 0;s=r}return o=l(i-BEAM_OFFSET),u=l(s+BEAM_OFFSET),o*o>u*u?u:o}function sym_dup(e){var t,n,r=clone(e);r.invis=!0,delete r.text,delete r.a_gch,delete r.a_ly,delete r.a_dd,r.notes=clone(e.notes);for(t=0;t<=r.nhd;t++)n=r.notes[t]=clone(e.notes[t]),delete n.a_dcn;return r}function calculate_beam(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T;t.beam_st||(n=sym_dup(t),lkvsym(n,t),lktsym(n,t),n.x-=12,n.x>t.prev.x+12&&(n.x=t.prev.x+12),n.beam_st=!0,delete n.beam_end,n.tmp=!0,delete n.slur_start,delete n.slur_end,t=n),s=o=0,f=l=!1,u=t.st,a=t.v,E=t.grace?GSTEM_XOFF:3.5;for(r=t;;r=r.next){if(r.type==C.NOTE){r.nflags>o&&(o=r.nflags),s++,r.st!=u&&(f=!0),r.stem!=t.stem&&(l=!0),!x&&!r.invis&&(!r.stemless||r.trem2)&&(x=!0);if(r.beam_end)break}if(!r.next){for(;;r=r.prev)if(r.type==C.NOTE)break;n=sym_dup(r),n.next=r.next,n.next&&(n.next.prev=n),r.next=n,n.prev=r,n.ts_next=r.ts_next,n.ts_next&&(n.ts_next.ts_prev=n),r.ts_next=n,n.ts_prev=r,delete n.beam_st,n.beam_end=!0,n.tmp=!0,delete n.slur_start,delete n.slur_end,n.x+=12,n.x<realwidth-12&&(n.x=realwidth-12),r=n,s++;break}}if(!x)return!1;e.s2=r;if(staff_tb[u].y==0){if(f)return!1}else if(!f)return e.s1=t,e.a=(t.ys-r.ys)/(t.xs-r.xs),e.b=t.ys-t.xs*e.a+staff_tb[u].y,e.nflags=o,!0;w=t,y=100,b=0;for(n=t;;n=n.next){if(n.type!=C.NOTE)continue;(S=n.p_v.scale)==1&&(S=staff_tb[n.st].staffscale),n.stem>=0?(c=E+n.notes[0].shhd,n.notes[n.nhd].pit>b&&(b=n.notes[n.nhd].pit,w=n)):(c=-E+n.notes[n.nhd].shhd,n.notes[0].pit<y&&(y=n.notes[0].pit,w=n)),n.xs=n.x+c*S;if(n==r)break}cfmt.flatbeams?d=0:!l&&s>=3&&w!=t&&w!=r&&(d=0),h=t.ys+staff_tb[u].y,d==undefined&&(d=(r.ys+staff_tb[r.st].y-h)/(r.xs-t.xs)),d!=0&&(d>0?d=BEAM_SLOPE*d/(BEAM_SLOPE+d):d=BEAM_SLOPE*d/(BEAM_SLOPE-d)),v=(h+r.ys+staff_tb[r.st].y)/2-d*(r.xs+t.xs)/2,g=0,n=t;if(l)p=((t.grace?3.5:BEAM_SHIFT)*(o-1)+BEAM_DEPTH)*.5,t.stem!=r.stem&&t.nflags<r.nflags?v+=p*r.stem:v+=p*t.stem;else if(!t.grace){var N=BEAM_DEPTH+BEAM_SHIFT*(o-1);while(n.ts_prev&&n.ts_prev.type==C.NOTE&&n.ts_prev.time==n.time&&n.ts_prev.x>t.xs)n=n.ts_prev;for(;n&&n.time<=r.time;n=n.ts_next){if(n.type!=C.NOTE||n.invis||n.st!=u&&n.v!=a)continue;c=n.v==a?n.xs:n.x,p=d*c+v-staff_tb[n.st].y;if(n.v==a)m=min_tb[n.nhd==0?0:1][n.nflags],n.stem>0?(n.notes[n.nhd].pit>26&&(m-=2,n.notes[n.nhd].pit>28&&(m-=2)),m-=p-3*(n.notes[n.nhd].pit-18)):(n.notes[0].pit<18&&(m-=2,n.notes[0].pit<16&&(m-=2)),m-=3*(n.notes[0].pit-18)-p),m+=BEAM_DEPTH+BEAM_SHIFT*(n.nflags-1);else{if(t.stem>0)if(n.stem>0){if(n.ymn>p+4||n.ymx<p-N-2)continue;n.v>a?m=n.ymx-p:m=n.ymn+8-p}else m=n.ymx-p;else if(n.stem<0){if(n.ymx<p-4||n.ymn>p-N-2)continue;n.v<a?m=p-n.ymn:m=p-n.ymx+8}else m=p-n.ymn;m+=2+N}m>g&&(g=m)}}else for(;;n=n.next){p=d*n.xs+v-staff_tb[n.st].y,m=GSTEM-2,n.stem>0?m-=p-3*(n.notes[n.nhd].pit-18):m+=p-3*(n.notes[0].pit-18),m+=3*(n.nflags-1),m>g&&(g=m);if(n==r)break}g>0&&(v+=t.stem*g);if(!f&&!l)for(n=t.next;;n=n.next){switch(n.type){case C.REST:i=n.ts_next;if(!i||i.st!=u||i.type!=C.NOTE&&i.type!=C.REST)break;case C.BAR:if(n.invis)break;case C.CLEF:h=d*n.x+v,t.stem>0?(h=n.ymx-h+BEAM_DEPTH+BEAM_SHIFT*(o-1)+2,h>0&&(v+=h)):(h=n.ymn-h-BEAM_DEPTH-BEAM_SHIFT*(o-1)-2,h<0&&(v+=h));break;case C.GRACE:for(i=n.extra;i;i=i.next)h=d*i.x+v,t.stem>0?(h=i.ymx-h+BEAM_DEPTH+BEAM_SHIFT*(o-1)+2,h>0&&(v+=h)):(h=i.ymn-h-BEAM_DEPTH-BEAM_SHIFT*(o-1)-2,h<0&&(v+=h))}if(n==r)break}d==0&&(v+=b_pos(t.grace,t.stem,o,v-staff_tb[u].y));for(n=t;;n=n.next){switch(n.type){case C.NOTE:n.ys=d*n.xs+v-staff_tb[n.st].y,n.stem>0?(n.ymx=n.ys+2.5,n.ts_prev&&n.ts_prev.stem>0&&n.ts_prev.st==n.st&&n.ts_prev.ymn<n.ymx&&n.ts_prev.x==n.x&&n.notes[0].shhd==0&&(n.ts_prev.x-=3,n.ts_prev.xs-=3)):n.ymn=n.ys-2.5;break;case C.REST:h=d*n.x+v-staff_tb[n.st].y,T=BEAM_DEPTH+BEAM_SHIFT*(o-1)+(n.head!=C.FULL?4:9);if(t.stem>0){h-=T,t.multi==0&&h>12&&(h=12);if(n.y<=h)break}else{h+=T,t.multi==0&&h<12&&(h=12);if(n.y>=h)break}n.head!=C.FULL&&(h=((h+3+12)/6|0)*6-12),n.y=h}if(n==r)break}return staff_tb[u].y==0?!1:(e.s1=t,e.a=d,e.b=v,e.nflags=o,!0)}function draw_beams(e){function v(e,t,n,r,i,s){var o,u,a=i.s1,f=a.nflags;a.ntrem&&(f-=a.ntrem),a.trem2&&s>f&&(a.dur>=C.BLEN/2?(e=a.x+6,t=i.s2.x-6):a.dur<C.BLEN/4&&(e+=5,t-=6)),o=i.a*e+i.b-n,t-=e,t/=stv_g.scale,u=i.a*t*stv_g.scale,xypath(e,o,!0),output+="l"+t.toFixed(2)+" "+(-u).toFixed(2)+"v"+r.toFixed(2)+"l"+(-t).toFixed(2)+" "+u.toFixed(2)+'z"/>\n'}var t,n,r,i,s,o,u,a,f,l,c,h,p=e.s1,d=e.s2;anno_start(p,"beam"),p.grace?(s=3.5,o=3.2,i=.29,u=1.8):(s=BEAM_SHIFT,o=BEAM_STUB,i=.34,u=BEAM_DEPTH),r=p.stem,p.stem!=d.stem&&p.nflags<d.nflags&&(r=d.stem),r<0&&(u=-u),v(p.xs-i,d.xs+i,0,u,e,1),a=0;for(t=p;;t=t.next){t.type==C.NOTE&&t.stem!=r&&(t.ys=e.a*t.xs+e.b-staff_tb[t.st].y+s*(t.nflags-1)*t.stem-u);if(t==d)break}p.feathered_beam&&(a=s/(d.xs-p.xs),p.feathered_beam>0?(a=-a,s=a*p.xs):s=a*d.xs,a*=r),i=0;for(n=2;n<=e.nflags;n++){i+=s,a!=0&&(e.a+=a);for(t=p;;t=t.next){if(t.type!=C.NOTE||t.nflags<n){if(t==d)break;continue}if(t.trem1&&n>t.nflags-t.ntrem){h=t.dur>=C.BLEN/2?t.x:t.xs,v(h-5,h+5,(i+2.5)*r,u,e,n);if(t==d)break;continue}l=t;for(;;){if(t==d)break;f=t.next;if(f.type==C.NOTE||f.type==C.REST)if(f.trem1){if(f.nflags-f.ntrem<n)break}else if(f.nflags<n)break;if(f.beam_br1||f.beam_br2&&n>2)break;t=f}c=t;while(c.type!=C.NOTE)c=c.prev;h=l.xs;if(l==c)if(l==p)h+=o;else if(l==d)h-=o;else if(l.beam_br1||l.beam_br2&&n>2)h+=o;else{f=l.next;while(f.type!=C.NOTE)f=f.next;if(f.beam_br1||f.beam_br2&&n>2)h-=o;else{l=l.prev;while(l.type!=C.NOTE)l=l.prev;l.nflags<f.nflags||l.nflags==f.nflags&&l.dots<f.dots?h+=o:h-=o}}v(h,c.xs,i*r,u,e,n);if(t==d)break}}p.tmp?unlksym(p):d.tmp&&unlksym(d),anno_stop(p,"beam")}function draw_lstaff(e){function u(e,t,n){var r,i,s,o;while(!cur_sy.st_print[t]){if(cur_sy.staves[t].flags&n)return;t++}r=i=t;for(;;){cur_sy.st_print[r]&&(i=r);if(cur_sy.staves[r].flags&n)break;r++}s=staff_tb[t].y+staff_tb[t].topbar*staff_tb[t].staffscale,o=staff_tb[i].y+staff_tb[i].botbar*staff_tb[i].staffscale,n&(CLOSE_BRACE|CLOSE_BRACE2)?out_brace(e,o,s-o):out_bracket(e,s,s-o)}var t,n,r,i,s=cur_sy.nstaff,o=0;for(t=0;;t++){cur_sy.staves[t].flags&(OPEN_BRACE|OPEN_BRACKET)&&o++;if(cur_sy.st_print[t])break;cur_sy.staves[t].flags&(CLOSE_BRACE|CLOSE_BRACKET)&&o--;if(t==s)break}for(n=s;n>t;n--)if(cur_sy.st_print[n])break;if(t==n&&o==0)return;r=staff_tb[n].y+staff_tb[n].botbar*staff_tb[n].staffscale,i=staff_tb[t].y+staff_tb[t].topbar*staff_tb[t].staffscale-r,xypath(e,r),output+="v"+(-i).toFixed(2)+'"/>\n';for(t=0;t<=s;t++)cur_sy.staves[t].flags&OPEN_BRACE&&u(e,t,CLOSE_BRACE),cur_sy.staves[t].flags&OPEN_BRACKET&&u(e,t,CLOSE_BRACKET),cur_sy.staves[t].flags&OPEN_BRACE2&&u(e-6,t,CLOSE_BRACE2),cur_sy.staves[t].flags&OPEN_BRACKET2&&u(e-6,t,CLOSE_BRACKET2)}function draw_meter(e,t){if(!t.a_meter)return;var n,r,i,s,o=t.st,u=staff_tb[o],a=u.y;u.stafflines!="|||||"&&(a+=(u.topbar+u.botbar)/2-12);for(r=0;r<t.a_meter.length;r++)s=t.a_meter[r],e=t.x+t.x_meter[r],s.bot?out_XYAB('<g transform="translate(X,Y)" text-anchor="middle">\n <text y="-12">A</text>\n <text>B</text>\n</g>\n',e,a+6,m_gl(s.top),m_gl(s.bot)):out_XYAB('<text x="X" y="Y" text-anchor="middle">A</text>\n',e,a+12,m_gl(s.top))}function draw_acc(e,t,n,r,i){if(r)if(r==i)n=n==-1?-2:2;else if(r*2!=i){xygl(e,t,"acc"+n+"_"+r+"_"+i);return}xygl(e,t,"acc"+n)}function draw_hl(e,t,n,r,i){var s,o,u=staff_tb[r],a=u.y,f=u.stafflines,l=(f.length-1)*6,c=u.botline;if(!/[\[|]/.test(f))return;t%6&&(t+=3),n%6&&(n-=3);if(f.indexOf("-")>=0&&(t>c&&t<l||n>c&&n<l||t<=c&&n>=l)){s=t,o=n;while(s>c&&f[s/6]=="-")s-=6;while(o<l&&f[o/6]=="-")o+=6;for(;s<o;s+=6)f[s/6]=="-"&&xygl(e,a+s,i)}for(;t<c;t+=6)xygl(e,a+t,i);for(;n>l;n-=6)xygl(e,a+n,i)}function draw_keysig(e,t,n){if(n.k_none)return;var r=n.k_old_sf,i=e.st,s=staff_tb[i].y,o,u,a,f=n.k_y_clef;f&1&&(f+=7),f/=2;while(f<0)f+=7;f%=7;if(!n.k_a_acc){if(cfmt.cancelkey||n.k_sf==0)if(n.k_sf==0||r*n.k_sf<0){u=sharp_cl[f],a=u>9?sharp1:sharp2;for(o=0;o<r;o++)xygl(t,s+u,"acc3"),u+=a[o],t+=5.5;u=flat_cl[f],a=u<18?flat1:flat2;for(o=0;o>r;o--)xygl(t,s+u,"acc3"),u+=a[-o],t+=5.5;n.k_sf!=0&&(t+=3)}if(n.k_sf>0){u=sharp_cl[f],a=u>9?sharp1:sharp2;for(o=0;o<n.k_sf;o++)xygl(t,s+u,"acc1"),u+=a[o],t+=5.5;if(cfmt.cancelkey&&o<r){t+=2;for(;o<r;o++)xygl(t,s+u,"acc3"),u+=a[o],t+=5.5}}if(n.k_sf<0){u=flat_cl[f],a=u<18?flat1:flat2;for(o=0;o>n.k_sf;o--)xygl(t,s+u,"acc-1"),u+=a[-o],t+=5.5;if(cfmt.cancelkey&&o>r){t+=2;for(;o>r;o--)xygl(t,s+u,"acc3"),u+=a[-o],t+=5.5}}}else if(n.k_a_acc.length){var l,c=n.k_a_acc[0].acc,h=100;for(o=0;o<n.k_a_acc.length;o++)l=n.k_a_acc[o],u=(n.k_y_clef+l.pit-18)*3,o!=0&&(u>h+18||u<h-18)?t-=5.5:l.acc!=c&&(t+=3),c=l.acc,draw_hl(t,u,u,i,"hl"),h=u,draw_acc(t,s+u,l.acc,l.micro_n,l.micro_d),t+=5.5}}function bar_cnv(e){switch(e){case"[":case"[]":return"";case"|:":case"|::":case"|:::":return"["+e;case":|":case"::|":case":::|":return e+"]";case"::":return cfmt.dblrepbar;case"||:":return"[|:"}return e}function draw_bar(e,t,n){var r,i,s,o=e.bar_type,u=e.st,a=staff_tb[u],f=e.x;if(!o)return;u!=0&&e.ts_prev&&e.ts_prev.type!=C.BAR&&(n=a.topbar*a.staffscale),e.ymx=e.ymn+n,set_sscale(-1),anno_start(e),s=a.y+12,a.stafflines!="|||||"&&(s+=(a.topbar+a.botbar)/2-12);if(e.bar_mrep){set_sscale(u);if(e.bar_mrep==1){for(i=e.prev;i.type!=C.REST;i=i.prev);xygl(i.x,s,"mrep")}else xygl(f,s,"mrep2"),e.v==cur_sy.top_voice&&(set_font("annotation"),xy_str(f,s+a.topbar-9,e.bar_mrep.toString(),"c"))}for(r=o.length;--r>=0;){switch(o[r]){case"|":set_sscale(-1),out_bar(f,t,n,e.bar_dotted?a.staffscale:0);break;default:f-=3,set_sscale(-1),out_thbar(f,t,n);break;case":":f-=2,set_sscale(u),xygl(f+1,s-12,"rdots")}f-=3}set_sscale(-1),anno_stop(e)}function draw_rest(e){var t,n,r,i,s,o,u,a,f,l=staff_tb[e.st];if(!l.topbar)return;if(e.dur==e.p_v.meter.wmeasure||e.rep_nb&&e.rep_nb>=0){t=e.ts_next;while(t&&t.time!=e.time+e.dur)t=t.ts_next;i=t?t.x:realwidth,t=e;while(!t.seqst)t=t.ts_prev;t=t.ts_prev,i=(i+t.x)/2,e.a_dd&&deco_update(e,i-e.x),e.x=i}else i=e.x,e.notes[0].shhd&&(i+=e.notes[0].shhd*stv_g.scale);if(e.invis)return;u=l.y;if(e.rep_nb){set_sscale(e.st),anno_start(e),l.stafflines=="|||||"?u+=12:u+=(l.topbar+l.botbar)/2,e.rep_nb<0?xygl(i,u,"srep"):(xygl(i,u,"mrep"),e.rep_nb>2&&e.v==cur_sy.top_voice&&(set_font("annotation"),xy_str(i,u+l.topbar-9,e.rep_nb.toString(),"c"))),anno_stop(e);return}set_scale(e),anno_start(e),s=e.y,n=5-e.nflags,n==7&&s==12&&l.stafflines.length<=2&&(s-=6),xygl(i,s+u,e.notes[0].head?e.notes[0].head:rest_tb[n]);if(n>=6){r=s/6;switch(n){default:switch(l.stafflines[r+1]){case"|":case"[":break;default:xygl(i,s+6+u,"hl1")}n==9&&(s-=6,r--);break;case 7:s+=6,r++;case 6:}switch(l.stafflines[r]){case"|":case"[":break;default:xygl(i,s+u,"hl1")}}if(e.dots){i+=8,s+=u+3;for(n=0;n<e.dots;n++)xygl(i,s,"dot"),i+=3.5}anno_stop(e)}function draw_gracenotes(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g={};for(d=e.extra;d;d=d.next){d.beam_st&&!d.beam_end&&self.calculate_beam(g,d)&&draw_beams(g),anno_start(d),draw_note(d,!g.s2),d==g.s2&&(g.s2=null),anno_stop(d);if(!d.next)break}e.sappo&&(d=e.extra,d.next?(i=(d.next.x-d.x)*.5+4,s=(d.ys+d.next.ys)*.5-d.y,d.stem>0?s-=1:s+=1):(i=9,s=d.stem>0?5:-5),m=d.notes[d.stem<0?0:d.nhd],out_acciac(x_head(d,m),y_head(d,m),i,s,d.stem>0));if(e.p_v.key.k_bagpipe||!cfmt.graceslurs||e.slur_start||!e.next||e.next.type!=C.NOTE)return;v=d;if(v.stem>=0){t=127;for(d=e.extra;d;d=d.next)d.y<t&&(t=d.y,v=d);n=v.x,r=v.y-5,e.extra!=v&&(n-=4,r+=1),e=e.next,a=e.x-1,e.stem<0&&(a-=4),f=3*(e.notes[0].pit-18)-5,h=(a-n)*.4,h>3&&(h=3),p=h,l=.2,c=.8,r>f+7?(n=v.x-1,r+=.5,f+=6.5,a=e.x-5.5,h=(r-f)*.8,p=(r-f)*.2,l=0):f>r+4&&(f=r+4,n=v.x+2,r=v.y-4)}else{t=-127;for(d=e.extra;d;d=d.next)d.y>t&&(t=d.y,v=d);n=v.x,r=v.y+5,e.extra!=v&&(n-=4,r-=1),e=e.next,a=e.x-1,e.stem>=0&&(a-=2),f=3*(e.notes[e.nhd].pit-18)+5,h=(n-a)*.4,h<-3&&(h=-3),p=h,l=.2,c=.8,r<f-7?(n=v.x-1,r-=.5,f-=6.5,a=e.x-5.5,h=(r-f)*.8,p=(r-f)*.2,l=0):f<r-4&&(f=r-4,n=v.x+2,r=v.y+4)}i=l*a+(1-l)*n-n,s=l*f+(1-l)*r-h-r,o=c*a+(1-c)*n-n,u=c*f+(1-c)*r-p-r,anno_start(e,"slur"),xypath(n,r+staff_tb[e.st].y),output+="c"+i.toFixed(2)+" "+(-s).toFixed(2)+" "+o.toFixed(2)+" "+(-u).toFixed(2)+" "+(a-n).toFixed(2)+" "+(-f+r).toFixed(2)+'"/>\n',anno_stop(e,"slur")}function setdoty(e,t){var n,r,i;for(n=0;n<=e.nhd;n++)i=3*(e.notes[n].pit-18),i%6==0&&(e.dot_low?i-=3:i+=3),t[n]=i;for(n=0;n<e.nhd;n++){if(t[n+1]>t[n])continue;r=n;while(r>0){if(t[r]>t[r-1]+6)break;r--}if(3*(e.notes[r].pit-18)-t[r]<t[n+1]-3*(e.notes[n+1].pit-18))while(r<=n)t[r++]-=6;else t[n+1]=t[n]+6}}function x_head(e,t){return e.x+t.shhd*stv_g.scale}function y_head(e,t){return staff_tb[e.st].y+3*(t.pit-18)}function draw_basic_note(e,t,n,r){var i,s,o,u,a,f,l,c=!1,h=t.notes[n],p=staff_tb[t.st].y,d=3*(h.pit-18),v=h.shhd*stv_g.scale,m=e+v,g=d+p,y=identify_note(t,h.dur),b=y[0],w=y[1],E=y[2];d%6==0&&v!=(t.stem>0?t.notes[0].shhd:t.notes[t.nhd].shhd)&&(u=0,d>=30?(u=d,u%6&&(u-=3)):d<=-6&&(u=d,u%6&&(u+=3)),u&&xygl(m,u+p,"hl"));if(!h.invis)if(t.grace)o="ghd",m-=4.5*stv_g.scale;else if(h.map&&h.map[0])i=t.head,o=h.map[0][i],o||(o=h.map[0][h.map[0].length-1]),i=o.indexOf("/"),i>=0&&(t.stem>=0?o=o.slice(0,i):o=o.slice(i+1));else if(t.type==C.CUSTOS)o="custos";else switch(b){case C.OVAL:o="HD";break;case C.OVALBARS:if(t.head!=C.SQUARE){o="HDD";break};case C.SQUARE:h.dur<C.BLEN*4?o="breve":(o="longa",l=t.stem>0),!tsnext&&t.next&&t.next.type==C.BAR&&!t.next.next&&(w=0);break;case C.EMPTY:o="Hd";break;default:o="hd"}h.color!=undefined?c=set_color(h.color):h.map&&h.map[2]&&(c=set_color(h.map[2])),o&&(l&&(g_open(m,g,0,1,-1),m=g=0),self.psxygl(m,g,o)||xygl(m,g,o),l&&g_close());if(w){a=e+(7.7+t.xmx)*stv_g.scale,r[n]==undefined&&(r[n]=3*(t.notes[n].pit-18),(t.notes[n].pit&1)==0&&(r[n]+=3)),f=r[n]+p;while(--w>=0)xygl(a,f,"dot"),a+=3.5}h.acc&&(e-=h.shac*stv_g.scale,t.grace?(g_open(e,d+p,0,.75),draw_acc(0,0,h.acc,h.micro_n,h.micro_d),g_close()):draw_acc(e,d+p,h.acc,h.micro_n,h.micro_d)),c!=0&&set_color(c)}function draw_note(e,t){var n,r,i,s,o,u,a,f,l,c,s,h,p=new Array(e.nhd+1);e.dots&&setdoty(e,p),h=e.notes[e.stem<0?e.nhd:0],c=x_head(e,h),o=staff_tb[e.st].y;if(e.grace)f="ghl";else switch(e.head){default:f="hl";break;case C.OVAL:case C.OVALBARS:f="hl1";break;case C.SQUARE:f="hl2"}draw_hl(c,3*(e.notes[0].pit-18),3*(e.notes[e.nhd].pit-18),e.st,f),s=y_head(e,h),e.stemless?e.xstem&&(n=e.ts_prev,u=(n.stem>0?n.y:n.ys)-e.y,u+=staff_tb[n.st].y-o,u/=e.p_v.scale,out_stem(c,s,u)):(u=e.ys-e.y,l=e.nflags,e.ntrem&&(l-=e.ntrem),!t||l<=0?(e.nflags>0&&(e.stem>=0?u-=1:u+=1),out_stem(c,s,u,e.grace)):out_stem(c,s,u,e.grace,l,cfmt.straightflags));if(t&&e.trem1){var d=e.ntrem||0,v=c;u=3*(e.notes[e.stem>0?e.nhd:0].pit-18),e.head==C.FULL||e.head==C.EMPTY?(v+=(e.grace?GSTEM_XOFF:3.5)*e.stem,e.stem>0?u+=6+5.4*d:u-=11.4):e.stem>0?u+=5+5.4*d:u-=10.4,u/=e.p_v.scale,out_trem(v,o+u,d)}c=e.x;for(i=0;i<=e.nhd;i++)draw_basic_note(c,e,i,p)}function next_scut(e){var t=e;for(e=e.next;e;e=e.next){if(e.rbstop)return e;t=e}return t}function prev_scut(e){while(e.prev){e=e.prev;if(e.rbstart)return e}e=e.p_v.sym;while(e.type!=C.CLEF)e=e.ts_prev;return e.next&&e.next.type==C.KEY&&(e=e.next),e.next&&e.next.type==C.METER?e.next:e}function slur_direction(e,t){var n,r,i;if(e.grace&&e.stem>0)return-1;for(n=e;;n=n.next){if(n.type==C.NOTE){if(!n.stemless){if(n.stem<0)return 1;r=!0}n.notes[0].pit<22&&(i=!0)}if(n==t)break}return!r&&!i?1:-1}function slur_out(e,t,n,r,i,s,o){var u,a,f,l=.3,c=.45;a=r-t,a<0&&(a=-a),u=n-e,u>40&&a/u<.7&&(l=.3+.002*(u-40),l>.7&&(l=.7));var h=.5*(e+n),p=.5*(t+r),d=h+l*(e-h),v=p+l*(t-p)+s;d=e+c*(d-e),v=t+c*(v-t);var m=h+l*(n-h),g=p+l*(r-p)+s;m=n+c*(m-n),g=r+c*(g-r),u=.03*(n-e),a=2*i,f=.2+.001*(n-e),f>.6&&(f=.6),f*=i;var y=stv_g.v?stv_g.scale:1;o?output+='<path class="stroke" stroke-dasharray="5,5" d="M':output+='<path class="fill" d="M',out_sxsy(e," ",t),output+="c"+((d-e)/stv_g.scale).toFixed(2)+" "+((t-v)/y).toFixed(2)+" "+((m-e)/stv_g.scale).toFixed(2)+" "+((t-g)/y).toFixed(2)+" "+((n-e)/stv_g.scale).toFixed(2)+" "+((t-r)/y).toFixed(2),o||(output+="\n v"+(-f).toFixed(2)+"c"+((m-u-n)/stv_g.scale).toFixed(2)+" "+((r+f-g-a)/y).toFixed(2)+" "+((d+u-n)/stv_g.scale).toFixed(2)+" "+((r+f-v-a)/y).toFixed(2)+" "+((e-n)/stv_g.scale).toFixed(2)+" "+((r+f-t)/y).toFixed(2)),output+='"/>\n'}function slur_multi(e,t){for(;;){if(e.multi)return e.multi;if(e==t)break;e=e.next}return 0}function draw_slur(e,t,n,r,i){var s=e,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w;while(s.v!=t.v)s=s.ts_next;switch(i&7){case C.SL_ABOVE:w=1;break;case C.SL_BELOW:w=-1;break;default:w=slur_multi(s,t),w||(w=slur_direction(s,t))}var E=1,S=s.st,x=!1;if(s!=t){o=s.next;for(;;){if(o.type==C.NOTE||o.type==C.REST)E++,o.st!=S&&(x=!0,o.st<S&&(S=o.st));if(o==t)break;o=o.next}}x&&error(2,s,"*** multi-staves slurs not treated yet"),a=e.x,e.notes&&e.notes[0].shhd&&(a+=e.notes[0].shhd);if(e!=t)l=t.x,t.notes&&(l+=t.notes[0].shhd);else{for(o=t.ts_next;o;o=o.ts_next)if(o.type==C.STAVES)break;l=o?o.x:realwidth}n>=0?f=3*(s.notes[n].pit-18)+5*w:(f=w>0?s.ymx+2:s.ymn-2,s.type==C.NOTE&&(w>0?s.stem>0&&(a+=5,s.beam_end&&s.nflags>=-1&&!s.in_tuplet&&(s.nflags>0?(a+=2,f=s.ys-3):f=s.ys-6)):s.stem<0&&(a-=1,t.grace?f=s.y-8:s.beam_end&&s.nflags>=-1&&(!s.in_tuplet||s.ys<f+3)&&(s.nflags>0?(a+=2,f=s.ys+3):f=s.ys+6)))),r>=0?c=3*(t.notes[r].pit-18)+5*w:(c=w>0?t.ymx+2:t.ymn-2,t.type==C.NOTE&&(w>0?t.stem>0&&(l+=1,t.beam_st&&t.nflags>=-1&&!t.in_tuplet&&(c=t.ys-6)):t.stem<0&&(l-=5,t.beam_st&&t.nflags>=-1&&!t.in_tuplet&&(c=t.ys+6)))),s.type!=C.NOTE&&(f=c+1.2*w,a=s.x+s.wr*.5,a>l-12&&(a=l-12)),t.type!=C.NOTE&&(s.type==C.NOTE?c=f+1.2*w:c=f,s!=t&&(l=t.x-t.wl*.3)),E>=3&&(s.next.type!=C.BAR&&s.next.x<a+48&&(w>0?(v=s.next.ymx-2,f<v&&(f=v)):(v=s.next.ymn+2,f>v&&(f=v))),t.prev&&t.prev.type!=C.BAR&&t.prev.x>l-48&&(w>0?(v=t.prev.ymx-2,c<v&&(c=v)):(v=t.prev.ymn+2,c>v&&(c=v)))),d=(c-f)/(l-a);if(d>SLUR_SLOPE||d<-SLUR_SLOPE)d=d>SLUR_SLOPE?SLUR_SLOPE:-SLUR_SLOPE,d*w>0?f=c-d*(l-a):c=f+d*(l-a);v=c-f,v>8?v=8:v<-8&&(v=-8),m=v,m<0&&(m=-m),y=.5*m,b=.3*v,v*w>0?(l-=y,c-=b):(a+=y,f+=b),s.grace&&(a=s.x-GSTEM_XOFF*.5),t.grace&&(l=t.x+GSTEM_XOFF*1.5),g=0,d=(c-f)/(l-a);if(s!=t&&s.v==t.v){p=f-d*a;for(o=s.next;o!=t;o=o.next){if(o.st!=S)continue;switch(o.type){case C.NOTE:case C.REST:w>0?(v=3*(o.notes[o.nhd].pit-18)+6,v<o.ymx&&(v=o.ymx),v-=d*o.x+p,v>g&&(g=v)):(v=3*(o.notes[0].pit-18)-6,v>o.ymn&&(v=o.ymn),v-=d*o.x+p,v<g&&(g=v));break;case C.GRACE:for(u=o.extra;u;u=u.next)w>0?(v=3*(u.notes[u.nhd].pit-18)+6,v<u.ymx&&(v=u.ymx),v-=d*u.x+p,v>g&&(g=v)):(v=3*(u.notes[0].pit-18)-6,v>u.ymn&&(v=u.ymn),v-=d*u.x+p,v<g&&(g=v))}}f+=.45*g,c+=.45*g,g*=.65}E>3?h=(.08*(l-a)+12)*w:h=(.03*(l-a)+8)*w,w>0?(h<3*g&&(h=3*g),h>40&&(h=40)):(h>3*g&&(h=3*g),h<-40&&(h=-40)),v=c-f,v<0&&(v=-v),w>0?h<.8*v&&(h=.8*v):h>-0.8*v&&(h=-0.8*v),h*=cfmt.slurheight,slur_out(a,f,l,c,w,h,i&C.SL_DOTTED),y=l-a,d=(c-f)/y,p=f-d*a+.4*h;if(s.v==t.v)for(o=s;o!=t;o=o.next){if(o.st!=S)continue;v=d*o.x+p,o.ymx<v?o.ymx=v:o.ymn>v&&(o.ymn=v),o.next==t?(y=l,t.sl1&&(y-=5)):y=o.next.x,o!=s&&(a=o.x),y-=a,y_set(S,w>0,a,y,v)}return(w>0?C.SL_ABOVE:C.SL_BELOW)|i&C.SL_DOTTED}function draw_slurs(e,t){var n,r,i,s,o,u,a,f,l,c=e;for(;;){if(!c||c==t){if(!i||!(c=i.next)||c==t)break;i=null}if(c.type==C.GRACE){i=c,c=c.extra;continue}if(c.type!=C.NOTE&&c.type!=C.REST&&c.type!=C.SPACE||!c.slur_start&&!c.sl1){c=c.next;continue}r=null,n=c.next;var h=!1;for(;;){if(!n){if(s){n=s.next,s=null;continue}if(!i||h)break;n=i.next,h=!0;continue}if(n.type==C.GRACE){s=n,n=n.extra;continue}if(n.type==C.BAR&&(n.bar_type[0]==":"||n.bar_type=="|]"||n.bar_type=="[|"||n.text&&n.text[0]!="1")){r=n;break}if(n.type!=C.NOTE&&n.type!=C.REST&&n.type!=C.SPACE){n=n.next;continue}if(n.slur_end||n.sl2){r=n;break}if(n.slur_start||n.sl1){if(s){for(r=n;r.next;r=r.next);r.next=s.next,s.next&&(s.next.prev=r),r=null}draw_slurs(n,t),s&&s.next&&(s.next.prev.next=null,s.next.prev=s)}if(n==t)break;n=n.next}if(!n)r=next_scut(c);else if(!r){c=n;if(c==t)break;continue}if(i){for(n=c;n.next;n=n.next);n.next=i.next,i.next&&(i.next.prev=n),i.slur_start=C.SL_AUTO}s&&(s.prev.next=s.extra,s.extra.prev=s.prev,s.slur_start=C.SL_AUTO);if(c.slur_start)f=c.slur_start&15,c.slur_start>>=4,u=-1;else{for(u=0;u<=c.nhd;u++)if(c.notes[u].sl1)break;f=c.notes[u].sl1&15,c.notes[u].sl1>>=4,c.sl1--}a=-1,l=0;if(r.type!=C.NOTE&&r.type!=C.REST&&r.type!=C.SPACE||!r.slur_end&&!r.sl2){if(r.type!=C.BAR||r.bar_type[0]!=":"&&r.bar_type!="|]"&&r.bar_type!="[|"&&(!r.text||r.text[0]=="1"))l=1}else if(r.slur_end)r.slur_end--;else{for(a=0;a<=r.nhd;a++)if(r.notes[a].sl2)break;r.notes[a].sl2--,r.sl2--}f=draw_slur(c,r,u,a,f),l&&(r.p_v.slur_start||(r.p_v.slur_start=0),r.p_v.slur_start<<=4,r.p_v.slur_start+=f),i&&i.next&&(i.next.prev.next=null,i.next.prev=i),s&&(s.prev.next=s,s.extra.prev=null);if(c.slur_start||c.sl1)continue;if(c==t)break;c=c.next}}function draw_tuplet(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,d,b,w,E,S,x;s=e.st;for(n=e;n;n=n.next){if(n.type!=C.NOTE&&n.type!=C.REST){if(n.type==C.GRACE)for(i=n.extra;i;i=i.next)if(i.slur_start||i.sl1)u=!0;continue}if(n.slur_start||n.slur_end||n.sl1||n.sl2)u=!0;n.st<s&&(s=n.st);if(t==0){n.tp1&&draw_tuplet(n,1);if(n.te0)break}else if(n.te1)break}if(!n){error(1,e,"No end of tuplet in this music line"),t==0?e.tp0=0:e.tp1=0;return}if(u){draw_slurs(e,n);if(e.slur_start||e.sl1)return;for(r=e.next;r!=n;r=r.next)if(r.slur_start||r.slur_end||r.sl1||r.sl2)return;if(n.slur_end||n.sl2)return}t==0?(E=e.tp0,e.tp0=0,S=e.tq0):(E=e.tp1,e.tp1=0,S=e.tq1);if(e.tf[0]==1)return;w=e.tf[3],w||(w=e.stem>0?C.SL_ABOVE:C.SL_BELOW);if(e==n)o=!0;else if(e.tf[1]==1)o=!0,draw_slur(e,n,-1,-1,w);else if(e.tf[0]==2||e.type!=C.NOTE||n.type!=C.NOTE)o=!1;else{o=!0;for(r=e;;r=r.next){if(r.type!=C.NOTE&&r.type!=C.REST){if(r.type==C.GRACE||r.type==C.SPACE)continue;o=!1;break}if(r==n)break;if(r.beam_end){o=!1;break}}if(o&&!e.beam_st&&!e.beam_br1&&!e.beam_br2)for(r=e.prev;r;r=r.prev)if(r.type==C.NOTE||r.type==C.REST){r.nflags>=e.nflags&&(o=!1);break}if(o&&!n.beam_end)for(r=n.next;r;r=r.next)if(r.type==C.NOTE||r.type==C.REST){!r.beam_br1&&!r.beam_br2&&r.nflags>=n.nflags&&(o=!1);break}}if(o){if(e.tf[2]==1)return;h=(n.x+e.x)/2,e==n?d=0:d=(n.ys-e.ys)/(n.x-e.x),b=e.ys-d*e.x,m=d*h+b,w==C.SL_ABOVE?(p=y_get(s,1,h-4,8),p>m&&(b+=p-m),b+=2):(p=y_get(s,0,h-4,8),p<m&&(b+=p-m),b-=10);for(r=e;;r=r.next)if(r.x>=h)break;e.stem*n.stem>0&&(e.stem>0?h+=1.5:h-=1.5),p=d*h+b,e.tf[2]==0?out_bnum(h,p,E):out_bnum(h,p,E+":"+S),w==C.SL_ABOVE?(p+=10,r.ymx<p&&(r.ymx=p),y_set(s,!0,h-3,6,p)):(r.ymn>p&&(r.ymn=p),y_set(s,!1,h-3,6,p));return}e.tf[1]!=0&&error(2,e,"'what' value of %%tuplets not yet coded"),w=e.tf[3],w||(w=e.multi>=0?C.SL_ABOVE:C.SL_BELOW);if(w==C.SL_ABOVE){e.st==n.st?l=c=staff_tb[s].topbar+4:(l=e.ymx,c=n.ymx),a=e.x-4;if(e.st==s){for(r=e;!r.dur;r=r.next);p=y_get(s,1,r.x-4,8),p>l&&(l=p),e.stem>0&&(a+=3)}if(n.st==s){for(r=n;!r.dur;r=r.prev);p=y_get(s,1,r.x-4,8),p>c&&(c=p)}n.dur>n.prev.dur?n.next?f=n.next.x-n.next.wl-5:f=realwidth-6:(f=n.x+4,x=n.stem>=0?0:n.nhd,n.notes[x].shhd>0&&(f+=n.notes[x].shhd),n.st==s&&n.stem>0&&(f+=3.5)),h=.5*(a+f),p=.5*(l+c),d=(c-l)/(f-a),v=3*(n.notes[n.nhd].pit-e.notes[e.nhd].pit)/(f-a),v>0?d<0?d=0:d>v&&(d=v):d>0?d=0:d<v&&(d=v),d*d<.1*.1&&(d=0),y=0;for(r=e;;r=r.next){if(!r.dur||r.st!=s){if(r==n)break;continue}m=p+(r.x-h)*d,g=y_get(s,1,r.x-4,8)+2,g-m>y&&(y=g-m);if(r==n)break}p+=y,l=p+d*(a-h),c=p+d*(f-h),p+=8;for(r=e;;r=r.next)if(r.st==s){m=p+(r.x-h)*d,r.ymx<m&&(r.ymx=m);if(r==n)break;y_set(s,!0,r.x,r.next.x-r.x,m)}else if(r==n)break}else{a=e.x-7,n.dur>n.prev.dur?n.next?f=n.next.x-n.next.wl-8:f=realwidth-6:(f=n.x+2,n.notes[n.nhd].shhd>0&&(f+=n.notes[n.nhd].shhd)),e.stem>=0&&(a+=2,f+=2);if(e.st==s){for(r=e;!r.dur;r=r.next);l=y_get(s,0,r.x-4,8)}else l=0;if(n.st==s){for(r=n;!r.dur;r=r.prev);c=y_get(s,0,r.x-4,8)}else c=0;h=.5*(a+f),p=.5*(l+c),d=(c-l)/(f-a),v=3*(n.notes[0].pit-e.notes[0].pit)/(f-a),v>0?d<0?d=0:d>v&&(d=v):d>0?d=0:d<v&&(d=v),d*d<.1*.1&&(d=0),y=0;for(r=e;;r=r.next){if(!r.dur||r.st!=s){if(r==n)break;continue}m=p+(r.x-h)*d,g=y_get(s,0,r.x-4,8),g-m<y&&(y=g-m);if(r==n)break}p+=y-10,l=p+d*(a-h),c=p+d*(f-h),p-=2;for(r=e;;r=r.next){if(r.st==s){if(r==n)break;m=p+(r.x-h)*d,r.ymn>m&&(r.ymn=m),y_set(s,!1,r.x,r.next.x-r.x,m)}if(r==n)break}}if(e.tf[2]==1){out_tubr(a,l+4,f-a,c-l,w==C.SL_ABOVE);return}out_tubrn(a,l,f-a,c-l,w==C.SL_ABOVE,e.tf[2]==0?E.toString():E+":"+S),m=.5*(l+c),w==C.SL_ABOVE?y_set(s,!0,h-3,6,m+9):y_set(s,!1,h-3,6,m)}function draw_note_ties(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m,g,y;for(s=0;s<n.length;s++){u=n[s],f=e.notes[u].pit,a=r[s],l=i!=2?t.notes[a].pit:f,o=(e.notes[u].ti1&7)==C.SL_ABOVE?1:-1,d=e.x,g=e.notes[u].shhd,o>0?u<e.nhd&&f+1==e.notes[u+1].pit&&e.notes[u+1].shhd>g&&(g=e.notes[u+1].shhd):u>0&&f==e.notes[u-1].pit+1&&e.notes[u-1].shhd>g&&(g=e.notes[u-1].shhd),d+=g*.6,v=t.x,i!=2&&(g=t.notes[a].shhd,o>0?a<t.nhd&&l+1==t.notes[a+1].pit&&t.notes[a+1].shhd<g&&(g=t.notes[a+1].shhd):a>0&&l==t.notes[a-1].pit+1&&t.notes[a-1].shhd<g&&(g=t.notes[a-1].shhd),v+=g*.6),h=e.st;switch(i){case 0:f!=l&&!(f&1)&&(f=l);break;case 3:o=-o;case 1:d=e.x,d>v-20&&(d=v-20),f=l,h=t.st;break;default:if(e!=t)v-=t.wl,t.type==C.BAR&&(v+=5);else{y=e.time+e.dur;for(p=e.ts_next;p;p=p.ts_next)if(p.time>y)break;v=p?p.x:realwidth}v<d+16&&(v=d+16)}v-d>20?(d+=3.5,v-=3.5):(d+=1.5,v-=1.5),c=3*(f-18),m=(.04*(v-d)+10)*o,slur_out(d,staff_tb[h].y+c,v,staff_tb[h].y+c,o,m,e.notes[u].ti1&C.SL_DOTTED)}}function draw_ties(e,t,n){var r,i,s,o,u,a,f,l=[],c=[],h=[],p=e.nhd,d=e.time+e.dur;if(n==2){for(i=0;i<=p;i++)e.notes[i].ti1&&h.push(i);draw_note_ties(e,t||e,h,h,n);return}for(i=0;i<=p;i++){if(!e.notes[i].ti1)continue;f=-1,u=e.notes[i].opit||e.notes[i].pit;for(o=t.nhd;o>=0;o--){a=t.notes[o].opit||t.notes[o].pit;switch(a-u){case 1:case-1:e.notes[i].acc!=t.notes[o].acc&&(f=o);default:continue;case 0:f=o}break}f>=0?(l.push(i),c.push(f)):h.push(i)}draw_note_ties(e,t,l,c,n);if(!h.length)return;r=e.ts_next;while(r&&r.time<d)r=r.ts_next;while(r&&r.time==d){if(r.type!=C.NOTE||r.st!=e.st){r=r.ts_next;continue}l.length=0,c.length=0;for(i=h.length;--i>=0;){s=h[i],u=e.notes[s].opit||e.notes[s].pit;for(o=r.nhd;o>=0;o--){a=r.notes[o].opit||r.notes[o].pit;if(a==u){l.push(s),c.push(o),h[i]=h.pop();break}}}if(l.length>0){draw_note_ties(e,r,l,c,n==1?1:0);if(h.length==0)return}r=r.ts_next}h.length!=0&&error(1,e,"Bad tie")}function tie_comb(e){var t,n,r;n=e.time+e.dur,r=e.st;for(t=e.ts_next;t;t=t.ts_next){if(t.st!=r)continue;if(t.time==n){if(t.type==C.NOTE)return t;continue}if(t.time>n)return e}return}function draw_all_ties(e){function l(e,t,n){var r;if(e.type==C.GRACE)for(r=e.extra;r;r=r.next)r.ti1&&draw_ties(r,t,n);else draw_ties(e,t,n)}var t,n,r,i,s,o,u,a,f;for(t=e.sym;t;t=t.next){switch(t.type){case C.CLEF:case C.KEY:case C.METER:continue}break}o=e.s_rtie;for(n=t;n;n=n.next){if(n.dur||n.type==C.GRACE)break;if(n.type!=C.BAR||!n.text)continue;n.text[0]=="1"?o=e.s_tie:e.s_tie=o}if(!n)return;e.s_tie&&(e.s_tie.x=t.x+t.wr,t=e.s_tie,e.s_tie=null,t.st=n.st,t.ts_next=n.ts_next,t.time=n.time-t.dur,draw_ties(t,n,1));for(;;){for(t=n;t;t=t.next){if(t.ti1)break;if(!o)continue;if(t.type!=C.BAR||!t.text)continue;if(t.text[0]=="1"){o=null;continue}if(t.bar_type=="|")continue;for(n=t.next;n;n=n.next)if(n.type==C.NOTE)break;if(!n){t=null;break}u=clone(o),u.x=t.x,u.next=n,u.st=n.st,u.time=n.time-u.dur,draw_ties(u,n,1)}if(!t)break;s=t.time+t.dur;for(n=t.next;n;n=n.next){if(n.dur)break;if(n.type==C.BAR&&n.text){if(n.text[0]!="1")break;o=t}}if(!n){for(n=t.ts_next;n;n=n.ts_next){if(n.st!=t.st)continue;if(n.time<s)continue;if(n.time>s){n=null;break}if(n.dur)break}if(!n){l(t,null,2),e.s_tie=t;break}}else{if(n.type!=C.NOTE&&n.type!=C.BAR){error(1,t,"Bad tie");continue}if(n.time!=s){r=tie_comb(t);if(r==t){error(1,t,"Bad tie");continue}n=r}}for(r=t.ts_next;r;r=r.ts_next){if(r.st!=t.st)continue;if(r.time>s)break;if(r.type==C.CLEF){i=!0;continue}}if(i||t.st!=n.st){i=!1,f=(n.x-t.x)*.4,a=n.x,n.x-=f,n.x>t.x+32&&(n.x=t.x+32),l(t,n,2),n.x=a,a=t.x,t.x+=f,t.x<n.x-24&&(t.x=n.x-24),draw_ties(t,n,3),t.x=a;continue}l(t,n,n.type==C.NOTE?0:2)}e.s_rtie=o}function draw_all_slurs(e){var t,n,r,i=e.sym,s=e.slur_start,o=0;if(!i)return;if(s){e.slur_start=0;while(s!=0)o<<=4,o|=s&15,s>>=4}draw_slurs(i,undefined);for(;i;i=i.next)while(i.slur_end||i.sl2){if(i.slur_end)i.slur_end--,r=-1;else{for(r=0;r<=i.nhd;r++)if(i.notes[r].sl2)break;i.notes[r].sl2--,i.sl2--}s=o&15,t=prev_scut(i),draw_slur(t,i,-1,r,s);if(t.type!=C.BAR||t.bar_type[0]!=":"&&t.bar_type!="|]"&&t.bar_type!="[|"&&(!t.text||t.text[0]=="1"))o>>=4}i=e.sym;while(o!=0){s=o&15,o>>=4,t=next_scut(i),draw_slur(i,t,-1,-1,s);if(t.type!=C.BAR||t.bar_type[0]!=":"&&t.bar_type!="|]"&&t.bar_type!="[|"&&(!t.text||t.text[0]=="1"))e.slur_start||(e.slur_start=0),e.slur_start<<=4,e.slur_start+=s}}function draw_sym_near(){var e,t,n,r,i,s,o,u,a,i,f,l,c,h;h=output,output="";for(r=0;r<voice_tb.length;r++){var p={},d=!0;e=voice_tb[r];for(n=e.sym;n;n=n.next)switch(n.type){case C.GRACE:for(o=n.extra;o;o=o.next)o.beam_st&&!o.beam_end&&self.calculate_beam(p,o);break;case C.NOTE:if(n.beam_st&&!n.beam_end||d&&!n.beam_st)d=!1,self.calculate_beam(p,n)}}for(i=0;i<=nstaff;i++){t=staff_tb[i],t.top||(t.top=new Float32Array(YSTEP),t.bot=new Float32Array(YSTEP));for(a=0;a<YSTEP;a++)t.top[a]=0,t.bot[a]=24}set_tie_room(),draw_deco_near();for(n=tsfirst;n;n=n.ts_next){if(n.invis)continue;switch(n.type){case C.GRACE:for(o=n.extra;o;o=o.next)y_set(n.st,!0,o.x-2,4,o.ymx+1),y_set(n.st,!1,o.x-2,4,o.ymn-1);continue;case C.MREST:y_set(n.st,!0,n.x+16,32,n.ymx+2);continue;default:y_set(n.st,!0,n.x-n.wl,n.wl+n.wr,n.ymx+2),y_set(n.st,!1,n.x-n.wl,n.wl+n.wr,n.ymn-2);continue;case C.NOTE:}n.stem>0?(n.beam_st?(f=3,u=n.beam_end?4:10):(f=-8,u=n.beam_end?11:16),y_set(n.st,!0,n.x+f,u,n.ymx),y_set(n.st,!1,n.x-n.wl,n.wl+n.wr,n.ymn)):(y_set(n.st,!0,n.x-n.wl,n.wl+n.wr,n.ymx),n.beam_st?(f=-6,u=n.beam_end?4:10):(f=-8,u=n.beam_end?5:16),f+=n.notes[0].shhd,y_set(n.st,!1,n.x+f,u,n.ymn)),n.notes[n.nhd].acc&&(s=n.y+8,n.ymx<s&&(n.ymx=s),y_set(n.st,!0,n.x,0,s)),n.notes[0].acc&&(s=n.y,n.notes[0].acc==1||n.notes[0].acc==3?s-=7:s-=5,n.ymn>s&&(n.ymn=s),y_set(n.st,!1,n.x,0,s))}for(r=0;r<voice_tb.length;r++){e=voice_tb[r],n=e.sym;if(!n)continue;set_color(n.color),i=e.st,set_dscale(i);for(;n;n=n.next)n.tp0&&draw_tuplet(n,0);draw_all_slurs(e);for(n=e.sym;n;n=n.next)n.tp0&&draw_tuplet(n,0)}for(i=0;i<=nstaff;i++){t=staff_tb[i],l=t.topbar+2,c=t.botbar-2;for(a=0;a<YSTEP;a++)l>t.top[a]&&(t.top[a]=l),c<t.bot[a]&&(t.bot[a]=c)}set_color(undefined),draw_deco_note(),draw_deco_staff(),set_dscale(-1);for(r=0;r<voice_tb.length;r++){e=voice_tb[r];if(e.have_ly){draw_all_lyrics();break}}cfmt.measurenb>=0&&draw_measnb(),set_dscale(-1),output=h}function draw_vname(e){var t,n,r,i,s,o,u,a,f=[];for(r=cur_sy.nstaff;r>=0;r--)if(cur_sy.st_print[r])break;if(r<0)return;for(i=0;i<voice_tb.length;i++){t=voice_tb[i];if(!t.sym)continue;r=cur_sy.voices[i].st;if(!cur_sy.st_print[r])continue;if(t.new_name){a=2;break}t.snm&&(a=1)}if(!a)return;for(i=0;i<voice_tb.length;i++){t=voice_tb[i];if(!t.sym)continue;r=cur_sy.voices[i].st;if(!cur_sy.st_print[r])continue;t.new_name&&delete t.new_name,o=a==2?t.nm:t.snm;if(!o)continue;if(cur_sy.staves[r].flags&CLOSE_BRACE2)while(!(cur_sy.staves[r].flags&OPEN_BRACE2))r--;else if(cur_sy.staves[r].flags&CLOSE_BRACE)while(!(cur_sy.staves[r].flags&OPEN_BRACE))r--;f[r]?f[r]+="\\n"+o:f[r]=o}if(f.length==0)return;set_font("voice"),e=-e*.5;for(r=0;r<f.length;r++){if(!f[r])continue;s=f[r].split("\\n"),u=staff_tb[r].y+staff_tb[r].topbar*.5*staff_tb[r].staffscale+9*(s.length-1)-gene.curfont.size*.3,n=r;if(cur_sy.staves[r].flags&OPEN_BRACE2)while(!(cur_sy.staves[n].flags&CLOSE_BRACE2))n++;else if(cur_sy.staves[r].flags&OPEN_BRACE)while(!(cur_sy.staves[n].flags&CLOSE_BRACE))n++;n!=r&&(u-=(staff_tb[r].y-staff_tb[n].y)*.5);for(n=0;n<s.length;n++)o=s[n],xy_str(e,u,o,"c"),u-=18}}function set_staff(){var e,t,n,r,i,s,o,u,a,f,l,c,h;for(i=0;i<voice_tb.length;i++)c=voice_tb[i],c.scale!=1&&(c.scale_str='transform="scale('+c.scale.toFixed(2)+')"');for(n=0;n<=nstaff;n++)if(gene.st_print[n])break;s=0;if(n>nstaff)n--,h=staff_tb[n];else{h=staff_tb[n];for(t=0;t<YSTEP;t++)l=h.top[t],s<l&&(s=l)}s+=draw_partempo(n,s);if(!gene.st_print[n])return s;s*=h.staffscale,o=cfmt.staffsep*.5+h.topbar*h.staffscale,s<o&&(s=o),s<h.ann_top&&(s=h.ann_top),h.y=-s,r=n;var p=cur_sy.staves[r];for(n++;n<=nstaff;n++){h=staff_tb[n];if(!gene.st_print[n])continue;o=p.sep||cfmt.sysstaffsep,a=p.maxsep||cfmt.maxsysstaffsep,u=0;if(h.staffscale==staff_tb[r].staffscale){for(t=0;t<YSTEP;t++)l=h.top[t]-staff_tb[r].bot[t],u<l&&(u=l);u*=h.staffscale}else for(t=0;t<YSTEP;t++)l=h.top[t]*h.staffscale-staff_tb[r].bot[t]*staff_tb[r].staffscale,u<l&&(u=l);o+=h.topbar*h.staffscale,u<o&&(u=o),a+=h.topbar*h.staffscale,u>a&&(u=a),s+=u,h.y=-s,r=n,p=cur_sy.staves[r]}f=0;for(t=0;t<YSTEP;t++)l=staff_tb[r].bot[t],f>l&&(f=l);f>h.ann_bot&&(f=h.ann_bot),f*=staff_tb[r].staffscale;for(n=0;n<=nstaff;n++)h=staff_tb[n],u=h.y,h.staffscale!=1&&(h.scale_str='transform="translate(0,'+(posy-u).toFixed(2)+") "+"scale("+h.staffscale.toFixed(2)+')"');if(f==0){for(n=nstaff;n>=0;n--)if(gene.st_print[n])break;if(n<0)return s}return u=-f,o=cfmt.staffsep*.5,u<o&&(u=o),a=cfmt.maxstaffsep*.5,u>a&&(u=a),s+u}function draw_systems(e){function p(){var e,t,n,r,i=0;for(e=0;e<=cur_sy.nstaff;e++){if(l[e]<0){c[e]=h[e]=0;continue}t=staff_tb[e].staffscale,n=staff_tb[e].topbar*t,r=staff_tb[e].botbar*t,i==0&&(i=staff_tb[e].y+n),c[e]=staff_tb[e].y+r,h[e]=i-c[e],i=cur_sy.staves[e].flags&STOP_BAR?0:c[e]}}function d(e,t,n){var r,i,s,o,u,a=0,f="",l=cur_sy.staves[e].stafflines,c=l.length;if(!/[\[|]/.test(l))return;r=n-t,set_sscale(e),i=r/stv_g.scale;if(cache&&cache.st_l==l&&cache.st_ws==i){xygl(t,staff_tb[e].y,"stdef"+cfmt.fullsvg);return}for(s=0;s<c;s++,a-=6){if(l[s]==".")continue;o=0;for(;s<c;s++,a-=6,o-=6){switch(l[s]){case".":case"-":continue;case u:f+="m-"+i.toFixed(2)+" "+o+"h"+i.toFixed(2),o=0;continue}u!=undefined&&(f+='"/>\n'),u=l[s],f+='<path class="stroke"',u=="["&&(f+=' stroke-width="1.5"'),f+=' d="m0 '+a+"h"+i.toFixed(2),o=0}f+='"/>\n'}a=staff_tb[e].y;if(!cache&&r==get_lwidth()){cache={st_l:l,st_ws:i},s="stdef"+cfmt.fullsvg,glyphs[s]='<g id="'+s+'">\n'+f+"</g>",xygl(t,a,s);return}out_XYAB('<g transform="translate(X, Y)">\n'+f+"</g>\n",t,a)}var t,n,r,i,s,o,u,a,f,l=[],c=[],h=[];draw_vname(e);for(r=0;r<=nstaff;r++)l[r]=cur_sy.st_print[r]?0:-1;p(),draw_lstaff(0);for(t=tsfirst;t;t=t.ts_next){if(f&&t.time!=f){f=0;for(r=0;r<=nstaff;r++)cur_sy.st_print[r]||(l[r]=-1);p()}switch(t.type){case C.STAVES:a=t.ts_prev.type==C.BAR?t.ts_prev.x:0;if(!a){for(n=t.ts_next;n;n=n.ts_next){if(n.time!=t.time)break;switch(n.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:a=n.x;continue}break}n||(a=realwidth)}u=t.sy;for(r=0;r<=nstaff;r++){i=l[r];if(i<0){u.st_print[r]&&(l[r]=a?a:t.x-t.wl-2);continue}if(u.st_print[r]&&u.staves[r].stafflines==cur_sy.staves[r].stafflines)continue;a?(s=a,f=t.time):(s=t.x-t.wl-2,l[r]=-1),d(r,i,s),u.st_print[r]&&(l[r]=s)}cur_sy=u,p();continue;case C.BAR:r=t.st;if(t.second||t.invis)break;draw_bar(t,c[r],h[r]);break;case C.STBRK:if(cur_sy.voices[t.v].range==0&&t.xmx>14){var v=0;for(var m=0;m<voice_tb.length;m++)cur_sy.voices[m].range>0&&v++;for(n=t.ts_next;n;n=n.ts_next){if(n.type!=C.STBRK)break;v--}v==0&&draw_lstaff(t.x)}n=t.prev;if(!n)break;s=n.x,n.type!=C.BAR&&(s+=n.wr),r=t.st,i=l[r];if(i>=0){if(i>=s)continue;d(r,i,s)}l[r]=t.x}}for(r=0;r<=nstaff;r++){if(f&&!cur_sy.st_print[r])continue;i=l[r];if(i<0||i>=realwidth)continue;d(r,i,realwidth)}}function draw_symbols(e){var t={},n,r,i,s,o;for(n=e.sym;n;n=n.next){if(n.invis)switch(n.type){case C.KEY:e.key=n;default:continue;case C.NOTE:}i=n.x,set_color(n.color);switch(n.type){case C.NOTE:set_scale(n),n.beam_st&&!n.beam_end&&self.calculate_beam(t,n)&&draw_beams(t),n.invis||(anno_start(n),draw_note(n,!t.s2),anno_stop(n)),n==t.s2&&(t.s2=null);break;case C.REST:draw_rest(n);break;case C.BAR:break;case C.CLEF:o=n.st,n.time>staff_tb[o].clef.time&&(staff_tb[o].clef=n);if(n.second)break;if(!staff_tb[n.st].topbar)break;set_color(undefined),set_sscale(o),anno_start(n),s=staff_tb[o].y,n.clef_name?xygl(i,s+n.y,n.clef_name):n.clef_small?xygl(i,s+n.y,"s"+n.clef_type+"clef"):xygl(i,s+n.y,n.clef_type+"clef"),n.clef_octave&&(n.clef_octave>0?(s+=n.ymx-10,n.clef_small&&(s-=1)):(s+=n.ymn+6,n.clef_small&&(s+=1)),xygl(i-2,s,"oct")),anno_stop(n);break;case C.METER:e.meter=n;if(n.second||!staff_tb[n.st].topbar)break;if(cfmt.alignbars&&n.st!=0)break;set_color(undefined),set_sscale(n.st),anno_start(n),draw_meter(i,n),anno_stop(n);break;case C.KEY:e.key=n;if(n.second||!staff_tb[n.st].topbar)break;set_color(undefined),set_sscale(n.st),anno_start(n),draw_keysig(e,i,n),anno_stop(n);break;case C.MREST:set_scale(n),i+=32,anno_start(n),xygl(i,staff_tb[n.st].y+12,"mrest"),out_XYAB('<text style="font:bold 15px serif"\n x ="X" y="Y" text-anchor="middle">A</text>\n',i,staff_tb[n.st].y+28,n.nmes),anno_stop(n);break;case C.GRACE:set_scale(n),draw_gracenotes(n);break;case C.SPACE:case C.STBRK:break;case C.CUSTOS:set_scale(n),draw_note(n,0);break;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:break;default:error(2,n,"draw_symbols - Cannot draw symbol "+n.type)}}set_scale(e.sym),draw_all_ties(e),set_color(undefined)}function draw_all_sym(){var e,t,n=voice_tb.length;for(t=0;t<n;t++)e=voice_tb[t],e.sym&&e.sym.x!=undefined&&self.draw_symbols(e);draw_all_deco(),set_sscale(-1)}function set_tie_dir(e){var t,n,r,i,s,o,u;for(t=e;t;t=t.next){if(!t.ti1)continue;if(t.multi!=0){i=t.multi>0?C.SL_ABOVE:C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if((u&7)!=C.SL_AUTO)continue;t.notes[n].ti1=u&C.SL_DOTTED|i}continue}s=r=0,o=128;for(n=0;n<=t.nhd;n++)t.notes[n].ti1&&(r++,o<128&&t.notes[n].pit<=o+1&&s++,o=t.notes[n].pit);if(r<=1){i=t.stem<0?C.SL_ABOVE:C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u){(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i);break}}continue}if(s==0){if(r&1){r=(r-1)/2,i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;r==0&&t.notes[n].pit>=22&&(i=C.SL_ABOVE),(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i),r--==0&&(i=C.SL_ABOVE)}continue}r/=2,i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i),--r==0&&(i=C.SL_ABOVE)}continue}o=128;for(n=0;n<=t.nhd;n++)if(t.notes[n].ti1){if(o<128&&t.notes[n].pit<=o+1){r=n;break}o=t.notes[n].pit}i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;r==n&&(i=C.SL_ABOVE),(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i)}}}function set_tie_room(){var e,t,n,r,i,s,o;for(r=0;r<voice_tb.length;r++){e=voice_tb[r],t=e.sym;if(!t)continue;t=t.next;if(!t)continue;set_tie_dir(t);for(;t;t=t.next){if(!t.ti1)continue;if(!(t.notes[0].pit<20&&(t.notes[0].ti1&7)==C.SL_BELOW||t.notes[t.nhd].pit>24&&(t.notes[t.nhd].ti1&7)==C.SL_ABOVE))continue;n=t.next;while(n&&n.type!=C.NOTE)n=n.next;if(n){if(n.st!=t.st)continue;i=n.x-t.x-10}else i=realwidth-t.x-10;i<100?o=9:i<300?o=12:o=16,t.notes[t.nhd].pit>24&&(s=3*(t.notes[t.nhd].pit-18)+o,t.ymx<s&&(t.ymx=s),n&&n.ymx<s&&(n.ymx=s),y_set(t.st,!0,t.x+5,i,s)),t.notes[0].pit<20&&(s=3*(t.notes[0].pit-18)-o,t.ymn>s&&(t.ymn=s),n&&n.ymn>s&&(n.ymn=s),y_set(t.st,!1,t.x+5,i,s))}}}function get_bool(e){return!e||!/^(0|n|f)/i.test(e)}function get_font_scale(e){var t=e.split(/\s+/);if(t.length<=1)return;var n=parseFloat(t[t.length-1]);if(isNaN(n)||t<=0){syntax(1,"Bad scale value in %%font");return}font_scale_tb[t[0]]=n;for(var r in font_tb){if(!font_tb.hasOwnProperty(r))continue;var i=font_tb[r];i.name==t[0]&&(i.swfac=i.size*n)}}function param_set_font(e,t){var n,r,i,s,o,u,a,f,l,c;if(e[e.length-2]=="-"){s=e[e.length-1];if(s<"1"||s>"9")return;e="u"+s+"font"}r=cfmt[e],r&&(n=font_tb[r],n&&(i=n.name+"."+n.size,n.class&&(i+="."+n.class))),s=t.indexOf("class="),s>=0&&(s+=6,o=t.indexOf(" ",s),o>0?c=t.slice(s,o):c=t.slice(s),t=t.replace(new RegExp("class="+c),"").trim()),o=t.split(/\s+/),u=o[0],u=="*"&&n?u=n.name:(u=u.replace("Times-Roman","serif"),u=u.replace("Times","serif"),u=u.replace("Helvetica","sans-serif"),u=u.replace("Courier","monospace")),o.length>1?(f=o[o.length-1],f=="*"&&n&&(f=n.size)):n&&(f=n.size);if(!f)return;a=u+"."+f,c&&(a+="."+c);if(a==i)return;n=font_tb[a],n||(l=font_scale_tb[u],l||(l=1.1),n={name:u,size:Number(f),swfac:f*l},font_tb[a]=n),c&&(n.class=c),cfmt[e]=a}function get_unit(e){var t=parseFloat(e);switch(e.slice(-2)){case"CM":case"cm":t*=CM;break;case"IN":case"in":t*=IN;break;case"PT":case"pt":t*=.75}return t}function set_infoname(e){var t=cfmt.infoname.split("\n"),n=e[0];for(var r=0;r<t.length;r++){var i=t[r];if(i[0]!=n)continue;e.length==1?t.splice(r,1):t[r]=e,cfmt.infoname=t.join("\n");return}cfmt.infoname+="\n"+e}function get_textopt(e){return textopt[e]}function set_pos(e,t){e=e.slice(0,3),e=="ste"&&(e="stm"),self.set_v_param("pos",e+" "+t)}function set_writefields(e){var t,n,r=e.split(/\s+/);if(get_bool(r[1]))for(n=0;n<r[0].length;n++)t=r[0][n],cfmt.writefields.indexOf(t)<0&&(cfmt.writefields+=t);else for(n=0;n<r[0].length;n++)t=r[0][n],cfmt.writefields.indexOf(t)>=0&&(cfmt.writefields=cfmt.writefields.replace(t,""))}function set_v_param(e,t){if(curvoice){self.set_vp([e+"=",t]);return}e=[e+"=",t];var n="*";info.V||(info.V={}),info.V[n]?Array.prototype.push.apply(info.V[n],e):info.V[n]=e}function set_page(){if(!img.chg)return;img.chg=!1,img.lm=cfmt.leftmargin-cfmt.printmargin,img.lm<0&&(img.lm=0),img.rm=cfmt.rightmargin-cfmt.printmargin,img.rm<0&&(img.rm=0),img.width=cfmt.pagewidth-2*cfmt.printmargin,img.width-img.lm-img.rm<100&&(error(0,undefined,"Bad staff width"),img.width=img.lm+img.rm+150),set_posx()}function set_format(e,t,n){var r,i,s,o,u;if(n)fmt_lock[e]=!0;else if(fmt_lock[e])return;if(/.+font(-[\d])?$/.test(e)){t.slice(-4)==" box"&&(o=!0,t=t.slice(0,-4)),param_set_font(e,t);switch(e){case"gchordfont":cfmt.gchordbox=o;break;case"measurefont":cfmt.measurebox=o;break;case"partsfont":cfmt.partsbox=o}return}switch(e){case"aligncomposer":case"barsperstaff":case"infoline":case"measurefirst":case"measurenb":case"rbmax":case"rbmin":case"shiftunison":s=parseInt(t);if(isNaN(s)){syntax(1,"Bad integer value");break}cfmt[e]=s;break;case"microscale":r=parseInt(t);if(isNaN(r)||r<4||r>256||r%1){syntax(1,errs.bad_val,"%%"+e);break}self.set_v_param("uscale",r);break;case"bgcolor":case"dblrepbar":case"titleformat":cfmt[e]=t;break;case"breaklimit":case"lineskipfac":case"maxshrink":case"pagescale":case"parskipfac":case"scale":case"slurheight":case"stemheight":case"stretchlast":r=parseFloat(t);if(isNaN(r)){syntax(1,errs.bad_val,"%%"+e);break}switch(e){case"scale":r/=.75;case"pagescale":e="scale",img.chg=!0}cfmt[e]=r;break;case"bstemdown":case"breakoneoln":case"cancelkey":case"contbarnb":case"custos":case"decoerr":case"dynalign":case"flatbeams":case"gchordbox":case"graceslurs":case"graceword":case"hyphencont":case"keywarn":case"linewarn":case"measurebox":case"partsbox":case"rbdbstop":case"singleline":case"squarebreve":case"straightflags":case"stretchstaff":case"timewarn":case"titlecaps":case"titleleft":cfmt[e]=get_bool(t);break;case"chordnames":s=t.split(","),cfmt.chordnames={};for(u=0;u<s.length;u++)cfmt.chordnames["CDEFGAB"[u]]=s[u];break;case"composerspace":case"indent":case"infospace":case"maxstaffsep":case"maxsysstaffsep":case"musicspace":case"partsspace":case"staffsep":case"subtitlespace":case"sysstaffsep":case"textspace":case"titlespace":case"topspace":case"vocalspace":case"wordsspace":r=get_unit(t),isNaN(r)?syntax(1,errs.bad_val,"%%"+e):cfmt[e]=r;break;case"print-leftmargin":syntax(0,"$1 is deprecated - use %%printmargin instead","%%"+e),e="printmargin";case"printmargin":case"leftmargin":case"pagewidth":case"rightmargin":r=get_unit(t);if(isNaN(r)){syntax(1,errs.bad_val,"%%"+e);break}cfmt[e]=r,img.chg=!0;break;case"concert-score":cfmt.sound!="play"&&(cfmt.sound="concert");break;case"writefields":set_writefields(t);break;case"dynamic":case"gchord":case"gstemdir":case"ornament":case"stemdir":case"vocal":case"volume":set_pos(e,t);break;case"font":get_font_scale(t);break;case"fullsvg":if(parse.state!=0){syntax(1,"Cannot have %%fullsvg inside a tune");break}cfmt[e]=t;break;case"gracespace":s=t.split(/\s+/);for(u=0;u<3;u++)if(isNaN(Number(s[u]))){syntax(1,errs.bad_val,"%%gracespace");break}for(u=0;u<3;u++)cfmt[e]=Number(s[u]);break;case"tuplets":cfmt[e]=t.split(/\s+/),s=cfmt[e][3],s&&posval[s]&&(cfmt[e][3]=posval[s]);break;case"infoname":set_infoname(t);break;case"notespacingfactor":r=parseFloat(t);if(isNaN(r)||r<1||r>2){syntax(1,errs.bad_val,"%%"+e);break}u=5,i=space_tb[u];for(;--u>=0;)i/=r,space_tb[u]=i;u=5,i=space_tb[u];for(;++u<space_tb.length;)i*=r,space_tb[u]=i;break;case"play":cfmt.sound="play";break;case"pos":e=t.split(/\s+/),set_pos(e[0],e[1]);break;case"sounding-score":cfmt.sound!="play"&&(cfmt.sound="sounding");break;case"staffwidth":s=get_unit(t);if(isNaN(s)){syntax(1,errs.bad_val,"%%"+e);break}if(s<100){syntax(1,"%%staffwidth too small");break}s=cfmt.pagewidth-s-cfmt.leftmargin;if(s<2){syntax(1,"%%staffwidth too big");break}cfmt.rightmargin=s,img.chg=!0;break;case"textoption":cfmt[e]=get_textopt(t);break;case"titletrim":s=Number(t),isNaN(s)?cfmt[e]=get_bool(t):cfmt[e]=s;break;case"combinevoices":syntax(1,"%%combinevoices is deprecated - use %%voicecombine instead");break;case"voicemap":self.set_v_param("map",t);break;case"voicescale":self.set_v_param("scale",t);break;default:parse.state==0&&(cfmt[e]=t)}}function font_init(){param_set_font("annotationfont","sans-serif 12"),param_set_font("composerfont","serifItalic 14"),param_set_font("footerfont","serif 16"),param_set_font("gchordfont","sans-serif 12"),param_set_font("headerfont","serif 16"),param_set_font("historyfont","serif 16"),param_set_font("infofont","serifItalic 14"),param_set_font("measurefont","serifItalic 14"),param_set_font("partsfont","serif 15"),param_set_font("repeatfont","serif 13"),param_set_font("subtitlefont","serif 16"),param_set_font("tempofont","serifBold 15"),param_set_font("textfont","serif 16"),param_set_font("titlefont","serif 20"),param_set_font("vocalfont","serifBold 13"),param_set_font("voicefont","serifBold 13"),param_set_font("wordsfont","serif 16")}function style_font(e){var t=e.split("."),n=t[1],r,i;return e=t[0].toLowerCase(),t="",r=e.indexOf("-"),r<0&&(r=e.length),i=e.indexOf("italic"),i>=0&&(t+="italic ",i<r&&(r=i)),i=e.indexOf("oblique"),i>=0&&(t+="oblique ",i<r&&(r=i)),i=e.indexOf("bold"),i>=0&&(t+="bold ",i<r&&(r=i)),r>0&&(e=e.slice(0,r)),"font:"+t+n+"px "+e}function font_class(e){return e.class?"f"+e.fid+cfmt.fullsvg+" "+e.class:"f"+e.fid+cfmt.fullsvg}function style_add_font(e){font_style+="\n.f"+e.fid+cfmt.fullsvg+" {"+style_font(e.name+"."+e.size)+"}"}function use_font(e){defined_font[e.fid]||(defined_font[e.fid]=!0,style_add_font(e))}function get_font(e){e+="font";var t=cfmt[e],n=font_tb[t];return n||(syntax(1,"Unknown font $1",e),n=gene.curfont),n.fid||(n.fid=fid++),use_font(n),n}function cnv_escape(e){var t,n,r="",i,s=0,o;for(;;){i=e.indexOf("\\",s);if(i<0)break;r+=e.slice(s,i),t=e[++i];if(!t)return r+"\\";switch(t){case"0":case"2":if(e[i+1]!="0")break;n=oct_acc[e[i+2]];if(n){r+=n,s=i+3;continue}break;case"u":s=Number("0x"+e.slice(i+1,i+5));if(isNaN(s)||s<32){r+=e[++i]+"̆",s=i+1;continue}o=[s];if(s>=55296&&s<=57343){s=Number("0x"+e.slice(i+7,i+11));if(isNaN(s))break;o.push(s),s=i+11}else s=i+5;r+=String.fromCharCode.apply(null,o);continue;case"t":r+=" ",s=i+1;continue;default:n=abc_utf[e.slice(i,i+2)];if(n){r+=n,s=i+2;continue}switch(t){case"`":r+=e[++i]+"̀",s=i+1;continue;case"'":r+=e[++i]+"́",s=i+1;continue;case"^":r+=e[++i]+"̂",s=i+1;continue;case"~":r+=e[++i]+"̃",s=i+1;continue;case"=":r+=e[++i]+"̄",s=i+1;continue;case"_":r+=e[++i]+"̅",s=i+1;continue;case".":r+=e[++i]+"̇",s=i+1;continue;case'"':r+=e[++i]+"̈",s=i+1;continue;case"o":r+=e[++i]+"̊",s=i+1;continue;case"H":r+=e[++i]+"̋",s=i+1;continue;case"v":r+=e[++i]+"̌",s=i+1;continue;case"c":r+=e[++i]+"̧",s=i+1;continue;case";":r+=e[++i]+"̨",s=i+1;continue}}r+="\\"+t,s=i+1}return r+e.slice(s)}function do_include(e){var t,n;if(!user.read_file){syntax(1,"No read_file support");return}if(include>2){syntax(1,"Too many include levels");return}include++,t=user.read_file(e);if(!t){syntax(1,"Cannot read file '$1'",e);return}n=clone(parse),tosvg(e,t),parse=n,include--}function tosvg(e,t,n,r){function C(){var e,i,s=t.indexOf("K:",n);return s<0?!1:(s=t.indexOf("\n",s),parse.select.test(t.slice(parse.bol,s))?!0:(e=/\n\w*\n/,e.lastIndex=s,i=e.exec(t),i?o=e.lastIndex:o=r,!1))}function k(e,t){var n;return e.indexOf("%")>=0&&(e=e.replace(/([^\\])%.*/,"$1").replace(/\\%/g,"%")),e=e.replace(/\s+$/,""),t&&e.indexOf("\\")>=0?cnv_escape(e):e}function L(){generate(),info.W&&put_words(info.W),put_history(),blk_flush(),parse.state=0,cfmt=g,info=y,char_tb=b,glovar=w,maps=E,mac=S,maci=x,init_tune(),img.chg=!0,set_page()}var i,s,n,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N="\n";abc2svg.modules&&(abc2svg.modules.hooks.length||abc2svg.modules.g_hooks.length)&&set_hooks(),parse.file=t,parse.fname=e,n==undefined&&(n=0),r||(r=t.length);for(;n<r;n=parse.eol+1){o=t.indexOf("\n",n);if(o<0||o>r)o=r;parse.eol=o;for(;;){o--;switch(t[o]){case" ":case" ":continue}break}o++;if(o==n){parse.state==1?(parse.istart=n,syntax(1,"Empty line in tune header - ignored")):parse.state>=2&&(L(),parse.select&&(o=t.indexOf("\nX:",parse.eol),o<0&&(o=r),parse.eol=o));continue}parse.istart=parse.bol=n,parse.iend=o,parse.line.index=0,f=t[n],l=t[n+1];if(f=="%"){if(parse.prefix.indexOf(l)<0)continue;t[n+2]=="a"&&t[n+3]=="b"&&t[n+4]=="c"&&t[n+5]==" "?(n+=6,f=t[n],l=t[n+1]):T=!0}else f=="I"&&l==":"&&(T=!0);if(T){T=!1,n+=2;for(;;){switch(t[n]){case" ":case" ":n++;continue}break}p=t.slice(n,o);if(!p||p[0]=="%")continue;d=p.split(/\s+/,2),d[0]||d.shift();switch(d[0]){case"abcm2ps":case"ss-pref":parse.prefix=d[1];continue;case"abc-include":do_include(d[1]);continue}if(d[0].slice(0,5)=="begin"){v=d[0].substr(5),u="\n"+f+l+"end"+v,i=t.indexOf(u,o);if(i<0){syntax(1,"No $1 after %%$2",u.slice(1),d[0]),parse.eol=r;continue}self.do_begin_end(v,d[1],t.slice(o+1,i).replace(new RegExp("^"+f+l,"gm"),"")),parse.eol=t.indexOf("\n",i+6),parse.eol<0&&(parse.eol=r);continue}switch(d[0]){case"select":if(parse.state!=0){syntax(1,"%%select ignored");continue}a=k(p.slice(7),!1),a[0]=='"'&&(a=a.slice(1,-1));if(!a){delete parse.select;continue}a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)"),parse.select=new RegExp(a,"m");continue;case"tune":syntax(1,"%%tune not treated yet");continue;case"voice":if(parse.state!=0){syntax(1,"%%voice ignored");continue}a=k(p.slice(6),!1);if(!a){parse.cur_tune_opts?parse.cur_tune_opts.voice_opts=null:parse.voice_opts=null;continue}if(a=="end")continue;parse.cur_tune_opts?(parse.cur_tune_opts.voice_opts||(parse.cur_tune_opts.voice_opts={}),h=parse.cur_tune_opts.voice_opts):(parse.voice_opts||(parse.voice_opts={}),h=parse.voice_opts),h[a]=[];for(;;){n=++o;if(t[n]!="%")break;o=t.indexOf("\n",o);if(t[n+1]!=l)continue;n+=2,o<0?p=t.slice(n):p=t.slice(n,o),d=p.match(/\S+/);switch(d[0]){default:h[a].push(k(p,!0));continue;case"score":case"staves":case"tune":case"voice":n-=2}break}parse.eol=n-1;continue}self.do_pscom(k(p,!0));continue}if(l!=":"||!/[A-Za-z+]/.test(f)){c=undefined;if(parse.state<2)continue;parse.line.buffer=k(t.slice(n,o),!0),parse_music_line();continue}n+=2;for(;;){switch(t[n]){case" ":case" ":n++;continue}break}p=k(t.slice(n,o),!0);if(f=="+"){if(!c){syntax(1,"+: without previous info field");continue}N=" ",f=c}switch(f){case"X":if(parse.state!=0){syntax(1,errs.ignored,f);continue}if(parse.select&&!C()){o=t.indexOf("\nX:",parse.eol),o<0&&(o=r),parse.eol=o;continue}g=clone(cfmt),cfmt.pos=clone(cfmt.pos),y=clone(info,1),b=clone(char_tb),w=clone(glovar),E=clone(maps,1),S=clone(mac),x=new Int8Array(maci),info.X=p,parse.state=1;continue;case"T":switch(parse.state){case 0:continue;case 1:info.T==undefined?info.T=p:info.T+="\n"+p;continue}m=new_block("title"),m.text=p;continue;case"K":switch(parse.state){case 0:continue;case 1:info.K=p}do_info(f,p);continue;case"W":if(parse.state==0||cfmt.writefields.indexOf(f)<0)break;info.W==undefined?info.W=p:info.W+=N+p;break;case"m":if(parse.state>=2){syntax(1,errs.ignored,f);continue}if((!cfmt.sound||cfmt.sound!="play")&&cfmt.writefields.indexOf(f)<0)break;d=p.match(/(.*?)[= ]+(.*)/);if(!d||!d[2]){syntax(1,errs.bad_val,"m:");continue}mac[d[1]]=d[2],maci[d[1].charCodeAt(0)]=1;break;case"s":if(parse.state!=3||cfmt.writefields.indexOf(f)<0)break;get_sym(p,N==" ");break;case"w":if(parse.state!=3||cfmt.writefields.indexOf(f)<0)break;get_lyrics(p,N==" ");if(p.slice(-1)=="\\"){N=" ",c=f;continue}break;case"|":if(parse.state<2)continue;parse.line.buffer=k(t.slice(n,o),!0),parse_music_line();continue;default:if("ABCDFGHOSZ".indexOf(f)>=0){if(parse.state>=2){syntax(1,errs.ignored,f);continue}info[f]?info[f]+=N+p:info[f]=p;break}do_info(f,p);continue}N="\n",c=f}if(include)return;parse.state>=2&&L(),parse.state=0}function set_head_shift(e){var t,n,r,i,s,o,u=dx_tb[e.head],a=e.stem,f=e.nhd;if(f==0)return;o=u*.78,e.grace&&(o*=.5),a>=0?(n=1,r=f+1,s=e.notes[0].pit):(o=-o,n=f-1,r=-1,s=e.notes[f].pit);var l=!1,c=0;for(t=n;t!=r;t+=a){i=e.notes[t].pit-s,s=e.notes[t].pit;if(i==0){if(l){var h=e.notes[t].shhd=e.notes[t-a].shhd+o;c<h&&(c=h);continue}if(t+a!=r&&s+a==e.notes[t+a].pit){e.notes[t].shhd=-o,c<-o&&(c=-o);continue}}i<0&&(i=-i),i>3||i>=2&&e.head!=C.SQUARE?l=!1:(l=!l,l&&(e.notes[t].shhd=o,c<o&&(c=o)))}e.xmx=c}function acc_shift(e,t){var n,r,i,s,o,u,a,f=e.length;for(n=f-1;--n>=0;){i=e[n].shhd;if(!i||i>0)continue;i=t-i,o=e[n].pit;for(r=f;--r>=0;){if(!e[r].acc)continue;u=e[r].pit;if(u<o-3)break;if(u>o+3)continue;e[r].shac<i&&(e[r].shac=i)}}for(n=f;--n>=0;){a=e[n].acc;if(!a)continue;i=e[n].shac,i||(i=e[n].shhd,i<0?i=t-i:i=t),o=e[n].pit;for(r=f;--r>n;){if(!e[r].acc)continue;u=e[r].pit;if(u>=o+4)if(u>o+4||a<0||e[r].acc<0)continue;i>e[r].shac-6&&(s=e[r].shac+7,s>i&&(i=s))}e[n].shac=i}}function set_acc_shft(){var e,t,n,r,i,n,s,o;e=tsfirst;while(e){if(e.type!=C.NOTE||e.invis){e=e.ts_next;continue}n=e.st,s=e.time,i=!1;for(t=e;t;t=t.ts_next){if(t.time!=s||t.type!=C.NOTE||t.st!=n)break;if(i)continue;for(r=0;r<=t.nhd;r++)if(t.notes[r].acc){i=!0;break}}if(!i){e=t;continue}o=dx_tb[e.head],n={notes:[]};for(;e!=t;e=e.ts_next)n.notes=n.notes.concat(e.notes);sort_pitch(n),acc_shift(n.notes,o)}}function lkvsym(e,t){e.next=t,e.prev=t.prev,e.prev?e.prev.next=e:e.p_v.sym=e,t.prev=e}function lktsym(e,t){t?(e.ts_next=t,e.ts_prev=t.ts_prev,e.ts_prev&&(e.ts_prev.ts_next=e),t.ts_prev=e):e.ts_next=e.ts_prev=null}function unlksym(e){e.next&&(e.next.prev=e.prev),e.prev?e.prev.next=e.next:e.p_v.sym=e.next,e.ts_next&&(e.seqst&&!e.ts_next.seqst&&(e.ts_next.seqst=!0,e.ts_next.shrink=e.shrink,e.ts_next.space=e.space),e.ts_next.ts_prev=e.ts_prev),e.ts_prev&&(e.ts_prev.ts_next=e.ts_next),tsfirst==e&&(tsfirst=e.ts_next),tsnext==e&&(tsnext=e.ts_next)}function insert_clef(e,t,n){var r=e.p_v,i,s=e.st;e.type==C.BAR&&e.prev&&e.prev.type==C.BAR&&(e=e.prev),r.last_sym=e.prev,r.last_sym||(r.sym=null),r.time=e.time,i=sym_add(r,C.CLEF),i.next=e,e.prev=i,i.clef_type=t,i.clef_line=n,i.st=s,i.clef_small=!0,delete i.second,i.notes=[],i.notes[0]={pit:e.notes[0].pit},i.nhd=0;while(!e.seqst)e=e.ts_prev;return lktsym(i,e),i.ts_prev.type!=C.CLEF&&(i.seqst=!0),i}function set_float(){var e,t,n,r,i,s,o,u;for(r=0;r<voice_tb.length;r++){e=voice_tb[r],n=!1,t=e.st;for(i=e.sym;i;i=i.next){if(!i.floating){while(i&&!i.floating)i=i.next;if(!i)break;n=!1}if(!i.dur){n&&i.st++;continue}if(i.notes[0].pit>=19){n=!1;continue}if(i.notes[i.nhd].pit<=12){n=!0,i.st++;continue}o=127;for(s=i.ts_prev;s;s=s.ts_prev){if(s.st!=t||s.v==i.v)break;s.type==C.NOTE&&s.notes[0].pit<o&&(o=s.notes[0].pit)}if(o==127){n&&i.st++;continue}if(i.notes[i.nhd].pit>o-3){n=!1;continue}u=-127;for(s=i.ts_next;s;s=s.ts_next){if(s.st!=t+1||s.v==i.v)break;s.type==C.NOTE&&s.notes[s.nhd].pit>u&&(u=s.notes[s.nhd].pit)}if(u==-127){n&&i.st++;continue}if(i.notes[0].pit<u+3){n=!0,i.st++;continue}o-=i.notes[i.nhd].pit,u=i.notes[0].pit-u;if(!n){if(o<u+3)continue;n=!0}else if(o<u-3){n=!1;continue}i.st++}}}function set_graceoffs(e){var t,n,r,i,s=cfmt.gracespace[0],o=cfmt.gracespace[1],u=cfmt.gracespace[2],a=e.extra;e.prev&&e.prev.type==C.BAR&&(s-=3),i=s,a.beam_st=!0;for(;;a=a.next){set_head_shift(a),acc_shift(a.notes,7),r=0;for(n=a.nhd;n>=0;n--)a.notes[n].shac>r&&(r=a.notes[n].shac);i+=r,a.x=i,a.nflags<=0&&(a.beam_st=!0,a.beam_end=!0),t=a.next;if(!t){a.beam_end=!0;break}t.nflags<=0&&(a.beam_end=!0),a.beam_end&&(t.beam_st=!0,i+=o/4),a.nflags<=0&&(i+=o/4),a.y>t.y+8&&(i-=1.5),i+=o}return t=e.next,t&&t.type==C.NOTE&&(a.y>=3*(t.notes[t.nhd].pit-18)?u-=1:a.beam_st&&a.y<3*(t.notes[t.nhd].pit-18)-4&&(u+=2)),i+=u,i}function gchord_width(e,t,n){var r,i,s,o,u,a=0,f=0,l=0,c=0;for(u=0;u<e.a_gch.length;u++){i=e.a_gch[u];switch(i.type){default:o=-i.x,o>a&&(a=o),s=i.w+2-o,s>f&&(f=s);break;case"<":s=i.w+t,s>l&&(l=s);break;case">":s=i.w+e.wr,s>c&&(c=s)}}r=e.prev;if(r){if(r.a_gch)for(r=e.ts_prev;;r=r.ts_prev){if(r==e.prev){n<a&&(n=a);break}r.seqst&&(a-=r.shrink)}l!=0&&n<l&&(n=l)}r=e.next;if(r){if(r.a_gch)for(r=e.ts_next;;r=r.ts_next){if(r==e.next){e.wr<f&&(e.wr=f);break}r.seqst&&(f-=8)}c!=0&&e.wr<c&&(e.wr=l)}return n}function set_width(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v;switch(e.type){case C.NOTE:case C.REST:e.wr=o=hw_tb[e.head],e.xmx>0&&(e.wr+=e.xmx+4);for(t=e.prev;t;t=t.prev)if(w_tb[t.type]!=0)break;if(t)switch(t.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:o+=3}for(r=0;r<=e.nhd;r++)i=e.notes[r].shhd,i<0&&o<-i+5&&(o=-i+5),e.notes[r].acc&&(v=e.notes[r].shac+(e.notes[r].micro?5.5:3.5),o<v&&(o=v));if(t)switch(t.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:o-=3}e.a_dd&&(o+=deco_width(e)),e.beam_st&&e.beam_end&&e.stem>0&&e.nflags>0&&e.wr<e.xmx+9&&(e.wr=e.xmx+9);if(e.dots){if(e.wl==undefined)switch(e.head){case C.SQUARE:e.xmx+=4;break;case C.OVALBARS:case C.OVAL:e.xmx+=2;break;case C.EMPTY:e.xmx+=1}e.wr<e.xmx+8&&(e.wr=e.xmx+8),e.dots>=2&&(e.wr+=3.5*(e.dots-1))}e.trem2&&e.beam_end&&o<20&&(o=20),u=o;if(t)switch(t.type){case C.NOTE:t.stem>0&&e.stem<0&&u<7&&(u=7),(e.y>27&&t.y>27||e.y<-3&&t.y<-3)&&u<6&&(u=6),t.ti1&&u<14&&(u=14);break;case C.CLEF:if(t.second||t.clef_small)break;u+=8;break;case C.KEY:u+=4}e.a_gch&&(u=gchord_width(e,o,u)),e.a_ly&&(u=ly_width(e,u)),t&&t.type==C.GRACE?e.wl=o-4.5:e.wl=u;return;case C.SPACE:i=e.width/2,e.wr=i,e.a_gch&&(i=gchord_width(e,i,i)),e.a_dd&&(i+=deco_width(e)),e.wl=i;return;case C.BAR:if(e.norepbra)break;f=e.bar_type;switch(f){case"|":s=7;break;default:s=4+3*f.length;for(n=0;n<f.length;n++)switch(f[n]){case"[":case"]":s+=3;break;case":":s+=2}}e.wl=s,e.next&&e.next.type!=C.METER?e.wr=7:e.wr=5;for(t=e.prev;t;t=t.prev)if(w_tb[t.type]!=0){t.type==C.GRACE&&(e.wl-=8);break}e.a_dd&&(e.wl+=deco_width(e)),e.text&&e.text.length<4&&e.next&&e.next.a_gch&&(set_font("repeat"),e.wr+=strwh(e.text)[0]+2);return;case C.CLEF:if(e.invis){e.wl=e.wr=1;return}e.wl=e.wr=e.clef_small?8:12;return;case C.KEY:e.wl=3,d=4;if(!e.k_a_acc)h=e.k_sf,e.k_old_sf&&(cfmt.cancelkey||h==0)?p=e.k_old_sf:p=0,h*p>=0?(h<0&&(h=-h),p<0&&(p=-p),p>h&&(h=p)):(h-=p,h<0&&(h=-h),d+=3);else{h=p=e.k_a_acc.length,p&&(c=e.k_a_acc[0].acc);for(n=1;n<p;n++)a=e.k_a_acc[n],a.pit>e.k_a_acc[n-1].pit+6||a.pit<e.k_a_acc[n-1].pit-6?h--:a.acc!=c&&(d+=3),c=a.acc}e.wr=5.5*h+d;return;case C.METER:u=0,e.x_meter=[];for(n=0;n<e.a_meter.length;n++){l=e.a_meter[n];switch(l.top[0]){case"C":case"c":case"o":e.x_meter[n]=u+6,u+=12;break;case".":case"|":e.x_meter[n]=e.x_meter[n-1];break;default:s=0,!l.bot||l.top.length>l.bot.length?l=l.top:l=l.bot;for(r=0;r<l.length;r++)switch(l[r]){case"(":u+=4;case")":case"1":s+=4;break;default:s+=12}e.x_meter[n]=u+s/2,u+=s}}e.wl=0,e.wr=u+6;return;case C.MREST:e.wl=6,e.wr=66;return;case C.GRACE:e.wl=set_graceoffs(e),e.wr=0,e.a_ly&&ly_width(e,u);return;case C.STBRK:e.wl=e.xmx,e.next&&e.next.type==C.CLEF?(e.wr=2,delete e.next.clef_small):e.wr=8;return;case C.CUSTOS:e.wl=e.wr=4;return;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:break;default:error(2,e,"set_width - Cannot set width for symbol $1",e.type)}e.wl=e.wr=0}function time2space(e,t){var n,r,i;return smallest_duration>=C.BLEN/2?smallest_duration>=C.BLEN?t/=4:t/=2:!e.next&&t>=C.BLEN&&(t/=2),t>=C.BLEN/4?t<C.BLEN/2?n=5:t<C.BLEN?n=6:t<C.BLEN*2?n=7:t<C.BLEN*4?n=8:n=9:t>=C.BLEN/8?n=4:t>=C.BLEN/16?n=3:t>=C.BLEN/32?n=2:t>=C.BLEN/64?n=1:n=0,r=t-(C.BLEN/16/8<<n),i=space_tb[n],r!=0&&(r<0?i=space_tb[0]*t/(C.BLEN/16/8):(n>=9&&(n=8),i+=(space_tb[n+1]-space_tb[n])*r/t)),i}function set_space(e){var t,n,r=e.ts_prev.time,i=e.time-r;if(i==0){switch(e.type){case C.MREST:return e.wl}return 0}if(e.ts_prev.type==C.MREST)return 71;n=time2space(e,i);while(!e.dur){switch(e.type){case C.BAR:return n*.9-7;case C.CLEF:return n-e.wl-e.wr;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:e=e.ts_next;if(!e)return n;continue}break}e.beam_st||(n*=.9);if(e.type==C.NOTE&&e.nflags>=-1&&e.stem>0){var s=!0;for(t=e.ts_prev;t&&t.time==r;t=t.ts_prev)if(t.type==C.NOTE&&(t.nflags<-1||t.stem>0)){s=!1;break}if(s){for(t=e.ts_next;t&&t.time==e.time;t=t.ts_next)if(t.type==C.NOTE&&(t.nflags<-1||t.stem<0)){s=!1;break}s&&(n*=.9)}}return n}function set_sp_tup(e,t){var n,r,i=e.time,s=t.time+t.dur,o=s-i,u=time2space(e,o/e.tq0)*e.tq0/o;do e=e.ts_next;while(!e.seqst);while(!e.dur)e=e.ts_next;while(!e.seqst)e=e.ts_prev;do t.ts_next?t=t.ts_next:(r=add_end_bar(t),t=r);while(!t.seqst);r=e;for(;;){r.dur&&r.dur*u<r.shrink&&(u=r.shrink/r.dur);if(r==t)break;r=r.ts_next}for(;;){e.seqst&&(n=(e.time-i)*u,i=e.time),e.space=n;if(e==t)break;e=e.ts_next}}function add_end_bar(e){var t={type:C.BAR,bar_type:"|",fname:e.fname,istart:e.istart,iend:e.iend,v:e.v,p_v:e.p_v,st:e.st,dur:0,seqst:!0,invis:!0,time:e.time+e.dur,nhd:0,notes:[{pit:e.notes[0].pit}],wl:0,wr:0,prev:e,ts_prev:e,shrink:e.wr+3};return e.next=e.ts_next=t,t}function set_allsymwidth(){var e,t,n,r,i,s=tsfirst,o=s,u=0,a=[],f=[],l=0;for(;;){e=u;do self.set_width(s),i=s.st,a[i]==undefined&&(a[i]=0),f[i]==undefined&&(f[i]=0),t=a[i]+f[i]+s.wl,t>e&&(e=t),s=s.ts_next;while(s&&!s.seqst);o.shrink=e-u,l||(o.space=o.ts_prev?set_space(o):0),o.shrink==0&&o.space==0&&o.type==C.CLEF&&(delete o.seqst,o.time=o.ts_prev.time);if(!s)break;for(i=0;i<f.length;i++)f[i]=0;u=e;do i=o.st,a[i]=u,o.wr>f[i]&&(f[i]=o.wr),o.tp0&&++l==1&&!n&&(n=o),o.te0&&l--,o=o.ts_next;while(!o.seqst)}s=n;if(!s)return;do{o=s,l=1;do s=s.ts_next,s.tp0&&l++,s.te0&&l--;while(l!=0);set_sp_tup(o,s);do s=s.ts_next;while(s&&!s.tp0)}while(s)}function to_rest(e){e.type=C.REST,delete e.in_tuplet,delete e.sl1,delete e.sl2,delete e.a_dd,delete e.a_gch,e.slur_start=e.slur_end=0}function set_repeat(e){var t,n,r,i,s,o=e.repeat_n,u=e.repeat_k,a=e.st,f=e.v;e.repeat_n=0;if(o<0){o=-o,r=o;for(n=e.prev;n;n=n.prev){if(!n.dur){if(n.type==C.BAR){error(1,n,"Bar in repeat sequence");return}continue}if(--r<=0)break}if(!n){error(1,e,errs.not_enough_n);return}s=e.time-n.time,r=u*o;for(t=e;t;t=t.next){if(!t.dur){if(t.type==C.BAR){error(1,t,"Bar in repeat sequence");return}continue}if(--r<=0)break}if(!t||!t.next){error(1,e,errs.not_enough_n);return}for(t=e.prev;t!=n;t=t.prev)if(t.type==C.NOTE){t.beam_end=!0;break}for(i=u;--i>=0;){r=o,e.dur&&r--,t=e.ts_next;while(r>0)t.st==a&&(unlksym(t),t.v==f&&t.dur&&r--),t=t.ts_next;to_rest(e),e.dur=e.notes[0].dur=s,e.rep_nb=-1,e.beam_st=!0,self.set_width(e),e.seqst&&(e.space=set_space(e)),e.head=C.SQUARE;for(e=t;e;e=e.ts_next)if(e.st==a&&e.v==f&&e.dur)break}return}r=o;for(t=e.prev.prev;t;t=t.prev)if(t.type==C.BAR||t.time==tsfirst.time)if(--r<=0)break;if(!t){error(1,e,errs.not_enough_m);return}s=e.time-t.time,o==1?r=u:r=o;for(t=e;t;t=t.next)if(t.type==C.BAR&&--r<=0)break;if(!t){error(1,e,errs.not_enough_m);return}r=u;if(o==2&&r>1){t=t.next;if(!t){error(1,e,errs.not_enough_m);return}t.repeat_n=o,t.repeat_k=--r}s/=o;if(o==2){n=e;for(t=e.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.invis=!0,n.seqst&&(n.space=set_space(n)),t.bar_mrep=2,t.seqst&&(t.space=set_space(t)),n=t.next;for(t=n.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.invis=!0,self.set_width(n),n.seqst&&(n.space=set_space(n)),t.seqst&&(t.space=set_space(t));return}n=e;for(i=u;--i>=0;){for(t=n.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.beam_st=!0,n.seqst&&(n.space=set_space(n)),t.seqst&&(t.space=set_space(t));if(u==1){n.rep_nb=1;break}n.rep_nb=u-i+1,n=t.next}}function custos_add(e){var t,n,r,i=e;for(;;){if(i.type==C.NOTE)break;i=i.next;if(!i)return}t=e.p_v,t.last_sym=e.prev,t.time=e.time,n=sym_add(t,C.CUSTOS),n.next=e,e.prev=n,lktsym(n,e),n.seqst=!0,n.shrink=e.shrink,n.shrink<12&&(n.shrink=12),n.space=i.space,n.wl=0,n.wr=4,n.nhd=i.nhd,n.notes=[];for(r=0;r<e.notes.length;r++)n.notes[r]={pit:i.notes[r].pit,shhd:0,dur:C.BLEN/4};n.stemless=!0}function set_nl(e){function i(e){cfmt.custos&&voice_tb.length==1&&custos_add(e);for(var t=e.ts_next;t;t=t.ts_next)if(t.seqst){e.nl=!0;break}}function s(e){if(!e.next)return i(e),e;for(e=e.ts_next;e;e=e.ts_next)if(e.seqst){i(e);break}return e}var t,n,r;if(e.eoln&&!cfmt.keywarn&&!cfmt.timewarn)return s(e);switch(e.type){case C.CLEF:case C.BAR:case C.STAVES:break;case C.KEY:if(cfmt.keywarn&&!e.k_none)break;return s(e);case C.METER:if(cfmt.timewarn)break;return s(e);case C.GRACE:e=e.next;if(!e)return e;default:return s(e)}for(;e;e=e.ts_prev){if(!e.seqst)continue;switch(e.type){case C.KEY:case C.CLEF:case C.METER:continue}break}r=0;for(;;e=e.ts_next){if(!e)return e;if(!e.seqst)continue;if(r<0)break;switch(e.type){case C.STAVES:if(e.ts_prev&&e.ts_prev.type==C.BAR)break;while(e.ts_next){if(w_tb[e.ts_next.type]!=0&&e.ts_next.type!=C.CLEF)break;e=e.ts_next}if(!e.ts_next||e.ts_next.type!=C.BAR)continue;e=e.ts_next;case C.BAR:if(r)break;r=1;continue;case C.STBRK:e.stbrk_forced?r=-1:unlksym(e);continue;case C.METER:if(!cfmt.timewarn)break;continue;case C.CLEF:if(r)break;continue;case C.KEY:if(!cfmt.keywarn||e.k_none)break;continue;default:if(!r||e.prev&&e.prev.type==C.GRACE)continue}break}return i(e),e}function get_ck_width(){var e,t,n=voice_tb[0];return self.set_width(n.clef),self.set_width(n.key),self.set_width(n.meter),[n.clef.wl+n.clef.wr+n.key.wl+n.key.wr,n.meter.wl+n.meter.wr]}function get_width(e,t){var n,r,i=0,s=1-cfmt.maxshrink;do{e.seqst&&(n=e.shrink,(r=e.space)<n?i+=n:i+=n*cfmt.maxshrink+r*s,e.x=i);if(e==t)break;e=e.ts_next}while(e);return i}function set_lines(e,t,n,r){var i,s,o,u,a,f,l,c,h,p,d,v;for(;t;t=t.ts_next)if(t.eoln)break;c=get_width(e,t)+r;for(;;){d=Math.ceil(c/n);if(d<=1)return t&&(t=set_nl(t)),t;s=i=e,a=e.x-e.shrink-r,l=a+n,f=a+c/d,a+=c/d*cfmt.breaklimit;for(e=e.ts_next;e!=t;e=e.ts_next){if(!e.x)continue;e.type==C.BAR&&(s=e);if(e.x>=a)break}if(e==t)return t&&(t=set_nl(t)),t;v=!1,o=null;for(;e!=t;e=e.ts_next){u=e.x;if(!u)continue;if(u>l)break;if(e.type!=C.BAR)continue;if(u<f){o=e;continue}if(!o||e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}o&&(e=o,v=!0);if(!v){var m=0,g=s.time;l-=8,e=s,o=null;for(;e!=t;e=e.ts_next){e.beam_st&&m++,e.beam_end&&m>0&&m--,u=e.x;if(!u)continue;if(u+e.wr>=l)break;if(m||e.in_tuplet)continue;if((e.time-g)%(C.BLEN/4)==0){o=e;continue}if(!o||e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}o&&(e=o,v=!0)}if(!v){o=e=s;for(;e!=t;e=e.ts_next){u=e.x;if(!u)continue;if(e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}e=o}if(e.nl){error(0,e,"Line split problem - adjust maxshrink and/or breaklimit"),d=2;for(e=e.ts_next;e!=t;e=e.ts_next){if(!e.x)continue;if(--d<=0)break}}e=set_nl(e);if(!e||t&&e.time>=t.time)break;c-=e.x-i.x,r=0}return e}function cut_tune(e,t){var n,r,i,s,o,n=tsfirst;t!=0&&(s=set_indent(),e-=s,t-=s),s=get_ck_width(),e-=s[0],t+=s[1],cfmt.custos&&voice_tb.length==1&&(e-=12);if(cfmt.barsperstaff){s=cfmt.barsperstaff;for(r=n;r;r=r.ts_next){if(r.type!=C.BAR||!r.bar_num||--s>0)continue;r.eoln=!0,s=cfmt.barsperstaff}}o=t,r=n;for(;n;n=n.ts_next){if(!n.seqst&&!n.eoln)continue;o+=n.shrink;if(o>e)r=set_lines(r,n,e,t);else{if(!n.eoln)continue;delete n.eoln;if(n.dur){for(i=n.ts_next;i;i=i.ts_next)if(i.seqst||i.dur<n.dur)break;i&&!i.seqst?r=set_lines(r,n,e,t):r=set_nl(n)}else r=set_nl(n)}if(!r)break;if(!r.ts_prev){delete r.nl;continue}o=r.shrink,n=r.ts_prev,t=0}}function set_yval(e){switch(e.type){case C.CLEF:if(e.second||e.invis){e.ymx=e.ymn=12;break}e.y=(e.clef_line-1)*6;switch(e.clef_type){default:e.ymx=e.y+28,e.ymn=e.y-14;break;case"c":e.ymx=e.y+13,e.ymn=e.y-11;break;case"b":e.ymx=e.y+7,e.ymn=e.y-12}e.clef_small&&(e.ymx-=2,e.ymn+=2),e.ymx<26&&(e.ymx=26),e.ymn>-1&&(e.ymn=-1),e.clef_octave&&(e.clef_octave>0?e.ymx+=12:e.ymn-=12);break;case C.KEY:e.k_sf>2?e.ymx=34:e.k_sf>0?e.ymx=30:e.ymx=26,e.ymn=-2;break;default:e.ymx=24,e.ymn=0}}function set_auto_clef(e,t,n){var r,i,s,o,u,a;s=12,i=20;for(r=t;r;r=r.ts_next){if(r.type==C.STAVES&&r!=t)break;if(r.st!=e)continue;if(r.type!=C.NOTE){if(r.type==C.CLEF){if(r.clef_type!="a")break;unlksym(r)}continue}r.notes[0].pit<i?i=r.notes[0].pit:r.notes[r.nhd].pit>s&&(s=r.notes[r.nhd].pit)}if(i>=19||i>=13&&n!="b")return"t";if(s<=13||s<=19&&n!="t")return"b";n=="a"&&((s+i)/2>=16?n="t":n="b");var f=n,l=r,c=null;for(r=t;r!=l;r=r.ts_next){if(r.type==C.STAVES&&r!=t)break;if(r.st!=e||r.type!=C.NOTE)continue;o=r.time;if(f=="t"){if(r.notes[0].pit>12||r.notes[r.nhd].pit>20){r.notes[0].pit>20&&(c=r);continue}u=r.ts_prev;if(u&&u.time==o&&u.st==e&&u.type==C.NOTE&&u.notes[0].pit>=19)continue;u=r.ts_next;if(u&&u.st==e&&u.time==o&&u.type==C.NOTE&&u.notes[0].pit>=19)continue}else{if(r.notes[0].pit<12||r.notes[r.nhd].pit<20){r.notes[r.nhd].pit<12&&(c=r);continue}u=r.ts_prev;if(u&&u.time==o&&u.st==e&&u.type==C.NOTE&&u.notes[0].pit<=13)continue;u=r.ts_next;if(u&&u.st==e&&u.time==o&&u.type==C.NOTE&&u.notes[0].pit<=13)continue}if(!c){f=n=f=="t"?"b":"t",c=r;continue}a=r;for(u=r.ts_prev;u!=c;u=u.ts_prev){if(u.st!=e)continue;if(u.type==C.BAR&&u.v==r.v){a=u;break}if(u.type!=C.NOTE)continue;u.beam_st&&!u.p_v.second&&(a=u)}if(a.time==c.time){c=r;continue}c=r,f=f=="t"?"b":"t",u=insert_clef(a,f,f=="t"?2:4),u.clef_auto=!0}return n}function set_clefs(){var e,t,n,r,i,s,o,u,a,f,l=new Array(nstaff),c=cur_sy,h=[];staff_tb=new Array(nstaff);for(n=0;n<=nstaff;n++)l[n]={autoclef:!0},staff_tb[n]={output:"",sc_out:""};for(r=0;r<voice_tb.length;r++){i=voice_tb[r];if(c.voices[r].range<0)continue;n=c.voices[r].st,c.voices[r].second||(i.staffnonote!=undefined&&(c.staves[n].staffnonote=i.staffnonote),i.staffscale&&(c.staves[n].staffscale=i.staffscale),c.voices[r].sep&&(c.staves[n].sep=c.voices[r].sep),c.voices[r].maxsep&&(c.staves[n].maxsep=c.voices[r].maxsep)),!c.voices[r].second&&!i.clef.clef_auto&&(l[n].autoclef=!1)}for(r=0;r<voice_tb.length;r++){i=voice_tb[r];if(c.voices[r].range<0||c.voices[r].second)continue;n=c.voices[r].st,e=i.clef,l[n].autoclef&&(e.clef_type=set_auto_clef(n,tsfirst,e.clef_type),e.clef_line=e.clef_type=="t"?2:4),l[n].clef=staff_tb[n].clef=e}for(n=0;n<=c.nstaff;n++)h[n]=(c.staves[n].stafflines.length-1)*3;for(e=tsfirst;e;e=e.ts_next){e.repeat_n&&set_repeat(e);switch(e.type){case C.STAVES:c=e.sy;for(n=0;n<=nstaff;n++)l[n].autoclef=!0;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0)continue;i=voice_tb[r],n=c.voices[r].st,c.voices[r].second||(i.staffnonote!=undefined&&(c.staves[n].staffnonote=i.staffnonote),i.staffscale&&(c.staves[n].staffscale=i.staffscale),c.voices[r].sep&&(c.staves[n].sep=c.voices[r].sep),c.voices[r].maxsep&&(c.staves[n].maxsep=c.voices[r].maxsep)),t=i.clef,t.clef_auto||(l[n].autoclef=!1)}for(n=0;n<=c.nstaff;n++)h[n]=(c.staves[n].stafflines.length-1)*3;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0||c.voices[r].second)continue;i=voice_tb[r],n=c.voices[r].st,t=i.clef,t.clef_auto?(o=set_auto_clef(n,e,l[n].clef?l[n].clef.clef_type:"a"),u=o=="t"?2:4):(o=t.clef_type,u=t.clef_line);if(!l[n].clef){t.clef_auto&&(t.type!="a"&&(i.clef=clone(i.clef)),i.clef.clef_type=o,i.clef.clef_line=u),staff_tb[n].clef=l[n].clef=i.clef;continue}if(o==l[n].clef.clef_type&&u==l[n].clef.clef_line)continue;s=e.ts_next;while(s&&(s.v!=r||s.st!=n))s=s.ts_next;if(!s)continue;s.type!=C.CLEF&&(s=insert_clef(s,o,u),t.clef_auto&&(s.clef_auto=!0)),l[n].clef=i.clef=s}continue;default:e.mid=h[e.st];continue;case C.CLEF:}e.clef_type=="a"&&(e.clef_type=set_auto_clef(e.st,e.ts_next,l[e.st].clef.clef_type),e.clef_line=e.clef_type=="t"?2:4),i=e.p_v,i.clef=e;if(e.second){unlksym(e);continue}n=e.st;if(l[n].clef){if(e.clef_type==l[n].clef.clef_type&&e.clef_line==l[n].clef.clef_line)continue}else staff_tb[n].clef=e;l[n].clef=e}c=cur_sy;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0)continue;t=voice_tb[r].sym;if(!t||t.notes[0].pit!=127)continue;n=c.voices[r].st;switch(staff_tb[n].clef.clef_type){default:f=22;break;case"c":f=16;break;case"b":f=10}for(e=t;e;e=e.next)e.notes[0].pit=f}}function set_pitch(e){var t,n,r,i,s,o,u,a,f=C.BLEN,l=new Array(nstaff),c=cur_sy;for(i=0;i<=nstaff;i++)t=staff_tb[i].clef,l[i]=delta_tb[t.clef_type]+t.clef_line*2,t.clefpit&&(l[i]+=t.clefpit),cfmt.sound?t.clef_octave&&!t.clef_oct_transp&&(l[i]+=t.clef_octave):t.clef_oct_transp&&(l[i]-=t.clef_octave);for(t=tsfirst;t!=e;t=t.ts_next){i=t.st;switch(t.type){case C.CLEF:l[i]=delta_tb[t.clef_type]+t.clef_line*2,t.clefpit&&(l[i]+=t.clefpit),cfmt.sound?t.clef_octave&&!t.clef_oct_transp&&(l[i]+=t.clef_octave):t.clef_oct_transp&&(l[i]-=t.clef_octave),set_yval(t);break;case C.GRACE:for(r=t.extra;r;r=r.next){s=l[r.st];if(s!=0&&!t.p_v.key.k_drum)for(o=0;o<=r.nhd;o++)a=r.notes[o],a.pit+=s;r.ymn=3*(r.notes[0].pit-18)-2,r.ymx=3*(r.notes[r.nhd].pit-18)+2}set_yval(t);break;case C.KEY:t.k_y_clef=l[i];default:set_yval(t);break;case C.MREST:if(t.invis)break;t.y=12,t.ymx=39,t.ymn=-2;break;case C.REST:if(voice_tb.length==1){t.y=12,t.ymx=24,t.ymn=0;break};case C.NOTE:s=l[i];if(s!=0&&!t.p_v.key.k_drum)for(o=t.nhd;o>=0;o--)t.notes[o].opit=t.notes[o].pit,t.notes[o].pit+=s;t.type==C.NOTE?(t.ymx=3*(t.notes[t.nhd].pit-18)+4,t.ymn=3*(t.notes[0].pit-18)-4):(t.y=((t.notes[0].pit-18)/2|0)*6,t.ymx=t.y+rest_sp[5-t.nflags][0],t.ymn=t.y-rest_sp[5-t.nflags][1]),t.dur<f&&(f=t.dur)}}e||(smallest_duration=f)}function set_stem_dir(){var e,t,n,r,i,s,o,u,a,f,l=[],c=tsfirst,h=cur_sy,p=h.nstaff;while(c){for(r=0;r<=p;r++)l[r]=[];f=[];for(t=c;t;t=t.ts_next){if(t.type==C.BAR)break;if(t.type==C.STAVES){if(t!=c)break;h=c.sy;for(r=p;r<=h.nstaff;r++)l[r]=[];p=h.nstaff;continue}if(t.type!=C.NOTE&&t.type!=C.REST||t.invis)continue;r=t.st;if(r>p){var d="*** fatal set_stem_dir(): bad staff number "+r+" max "+p;throw error(2,null,d),new Error(d)}s=t.v,o=f[s],o||(o={st1:-1,st2:-1},f[s]=o),o.st1<0?o.st1=r:o.st1!=r&&(r>o.st1?r>o.st2&&(o.st2=r):(o.st1>o.st2&&(o.st2=o.st1),o.st1=r)),u=l[r],i=h.voices[s].range;for(n=u.length;--n>=0;){a=u[n];if(a.v==i)break}if(n<0){a={v:i,ymx:0,ymn:24};for(n=0;n<u.length;n++)if(i<u[n].v){u.splice(n,0,a);break}n==u.length&&u.push(a)}if(t.type!=C.NOTE)continue;t.ymx>a.ymx&&(a.ymx=t.ymx),t.ymn<a.ymn&&(a.ymn=t.ymn),t.xstem&&(t.ts_prev.st!=r-1||t.ts_prev.type!=C.NOTE?(error(1,c,"Bad !xstem!"),t.xstem=!1):(t.ts_prev.multi=1,t.multi=1,t.stemless=!0))}for(;c!=t;c=c.ts_next){if(c.multi)continue;switch(c.type){default:continue;case C.REST:if(c.combine!=undefined&&c.combine<0||!c.ts_next||c.ts_next.type!=C.REST||c.ts_next.st!=c.st||c.time!=c.ts_next.time||c.dur!=c.ts_next.dur||c.invis)break;unlksym(c.ts_next);break;case C.NOTE:case C.GRACE:}r=c.st,s=c.v,o=f[s],u=l[r];if(o&&o.st2>=0){r==o.st1?c.multi=-1:r==o.st2&&(c.multi=1);continue}if(u.length<=1){c.floating&&(c.multi=r==voice_tb[s].st?-1:1);continue}i=h.voices[s].range;for(n=u.length;--n>=0;)if(u[n].v==i)break;if(n<0)continue;n==u.length-1?c.multi=-1:(c.multi=1,n!=0&&n+2==u.length&&(u[n].ymn-cfmt.stemheight>u[n+1].ymx&&(c.multi=-1),e=c.ts_next,c.ts_prev&&c.ts_prev.time==c.time&&c.ts_prev.st==c.st&&c.notes[c.nhd].pit==c.ts_prev.notes[0].pit&&c.beam_st&&c.beam_end&&(!e||e.st!=c.st||e.time!=c.time)&&(c.multi=-1)))}while(c&&c.type==C.BAR)c=c.ts_next}}function set_rest_offset(){var e,t,n,r,i,s,o,u,a,f,l,c,h=[],p=cur_sy;for(e=tsfirst;e;e=e.ts_next){if(e.invis)continue;e.type==C.STAVES&&(p=e.sy);if(!e.dur)continue;s=h[e.v],s||(s={},h[e.v]=s),s.s=e,s.st=e.st,s.end_time=e.time+e.dur;if(e.type!=C.REST)continue;a=-127,u=127,i=l=!1;for(n=0;n<=h.length;n++){s=h[n];if(!s||!s.s||s.st!=e.st||n==e.v)continue;if(s.end_time<=e.time)continue;i=!0,t=s.s,p.voices[n].range<p.voices[e.v].range?t.time==e.time?t.ymn<u&&(u=t.ymn,t.dots&&(l=!0)):t.y<u&&(u=t.y):t.time==e.time?t.ymx>a&&(a=t.ymx,t.dots&&(l=!0)):t.y>a&&(a=t.y)}r=e.time+e.dur;for(t=e.ts_next;t;t=t.ts_next){if(t.time>=r)break;if(t.st!=e.st||!t.dur||t.invis)continue;i=!0,p.voices[t.v].range<p.voices[e.v].range?t.time==e.time?t.ymn<u&&(u=t.ymn,t.dots&&(l=!0)):t.y<u&&(u=t.y):t.time==e.time?t.ymx>a&&(a=t.ymx,t.dots&&(l=!0)):t.y>a&&(a=t.y)}if(!i){e.y=12,e.ymx=24,e.ymn=0;continue}u==127&&e.y<12&&(f=12-e.y,e.y+=f,e.ymx+=f,e.ymn+=f),a==-127&&e.y>12&&(f=e.y-12,e.y-=f,e.ymx-=f,e.ymn-=f),f=u-e.ymx;if(f<0){f=Math.ceil(-f/6)*6;if(e.ymn-f>=a){e.y-=f,e.ymx-=f,e.ymn-=f;continue}c=l?15:10,e.notes[0].shhd=c,e.xmx=c;continue}f=a-e.ymn;if(f>0){f=Math.ceil(f/6)*6;if(e.ymx+f<=u){e.y+=f,e.ymx+=f,e.ymn+=f;continue}c=l?15:10,e.notes[0].shhd=c,e.xmx=c;continue}}}function new_sym(e,t,n){var r={type:e,fname:n.fname,v:t.v,p_v:t,st:t.st,time:n.time,next:t.last_sym.next};return r.next&&(r.next.prev=r),t.last_sym.next=r,r.prev=t.last_sym,t.last_sym=r,lktsym(r,n),r.ts_prev.type!=e&&(r.seqst=!0),n.type==e&&r.v!=n.v&&(delete n.seqst,n.shrink=0),r}function init_music_line(){var e,t,n,r,i,s,o,u,a,f=voice_tb.length;for(s=0;s<f;s++){if(cur_sy.voices[s].range<0)continue;e=voice_tb[s],e.second=cur_sy.voices[s].second,e.last_sym=e.sym,o=cur_sy.voices[s].st;while(o<nstaff&&!cur_sy.st_print[o])o++;e.st=o}i=tsfirst;while(i.type==C.CLEF)s=i.v,cur_sy.voices[s].range>=0&&!cur_sy.voices[s].second&&(delete i.clef_small,e=i.p_v,e.last_sym=e.sym=i),i=i.ts_next;for(s=0;s<f;s++){e=voice_tb[s];if(e.sym&&e.sym.type==C.CLEF)continue;if(cur_sy.voices[s].range<0||cur_sy.voices[s].second&&!e.bar_start)continue;o=cur_sy.voices[s].st;if(!staff_tb[o]||!staff_tb[o].clef)continue;t=clone(staff_tb[o].clef),t.v=s,t.p_v=e,t.st=o,t.time=tsfirst.time,t.prev=null,t.next=e.sym,t.next&&(t.next.prev=t),e.sym=t,e.last_sym=t,t.ts_next=i,i?t.ts_prev=i.ts_prev:t.ts_prev=null,t.ts_prev?(t.ts_prev.ts_next=t,delete t.seqst):(tsfirst=t,t.seqst=!0),i&&(i.ts_prev=t,i.type==C.CLEF&&delete i.seqst),delete t.clef_small,t.second=cur_sy.voices[s].second,cur_sy.st_print[o]||(t.invis=!0)}for(s=0;s<f;s++){if(cur_sy.voices[s].range<0||cur_sy.voices[s].second||!cur_sy.st_print[cur_sy.voices[s].st])continue;e=voice_tb[s];if(i&&i.v==s&&i.type==C.KEY){e.last_sym=i,i.k_old_sf=i.k_sf,i=i.ts_next;continue}n=e.key;if(n.k_sf||n.k_a_acc)t=new_sym(C.KEY,e,i),t.k_sf=n.k_sf,t.k_old_sf=n.k_sf,t.k_none=n.k_none,t.k_a_acc=n.k_a_acc,t.istart=n.istart,t.iend=n.iend,n.k_bagpipe&&(t.k_bagpipe=n.k_bagpipe,t.k_bagpipe=="p"&&(t.k_old_sf=3))}if(insert_meter&1){for(s=0;s<f;s++){e=voice_tb[s],n=e.meter;if(cur_sy.voices[s].range<0||cur_sy.voices[s].second||!cur_sy.st_print[cur_sy.voices[s].st]||n.a_meter.length==0)continue;if(i&&i.v==s&&i.type==C.METER){e.last_sym=i,i=i.ts_next;continue}t=new_sym(C.METER,e,i),t.istart=n.istart,t.iend=n.iend,t.wmeasure=n.wmeasure,t.a_meter=n.a_meter}insert_meter&=-2}for(s=0;s<f;s++){e=voice_tb[s],n=e.bar_start,e.bar_start=null;if(i&&i.v==s&&i.type==C.BAR){e.last_sym=i,i=i.ts_next;continue}if(!n)continue;if(cur_sy.voices[s].range<0||!cur_sy.st_print[cur_sy.voices[s].st])continue;n.next=e.last_sym.next,n.next&&(n.next.prev=n),e.last_sym.next=n,n.prev=e.last_sym,e.last_sym=n,lktsym(n,i),n.time=tsfirst.time,n.ts_prev.type!=n.type&&(n.seqst=!0),i&&i.type==n.type&&n.v!=i.v&&delete i.seqst}self.set_pitch(i);for(t=i;t;t=t.ts_next)if(t.seqst){for(t=t.ts_next;t;t=t.ts_next)if(t.seqst)break;break}while(i){if(i.seqst){do i=i.ts_next;while(i&&!i.seqst);break}i=i.ts_next}t=tsfirst;for(;;){n=t,a=0;do{self.set_width(t),u=t.wl;for(r=t.prev;r;r=r.prev)if(w_tb[r.type]!=0){u+=r.wr;break}u>a&&(a=u),t=t.ts_next}while(t!=i&&!t.seqst);n.shrink=a,n.space=0;if(t==i)break}}function set_words(e){var t,n,r,i,s=!0,o=127;for(t=e.sym;t;t=t.next)if(t.type==C.NOTE){o=t.notes[0].pit;break}for(t=e.sym;t;t=t.next){switch(t.type){case C.MREST:s=!0;break;case C.BAR:t.bar_type=bar_cnv(t.bar_type),t.beam_on||(s=!0),!t.next&&t.prev&&t.prev.head==C.OVALBARS&&(t.prev.head=C.SQUARE);break;case C.NOTE:case C.REST:if(t.trem2)break;r=t.nflags,t.ntrem&&(r+=t.ntrem),t.type==C.REST&&t.beam_end&&(t.beam_end=!1,s=!0);if(s||r<=0)i&&(i.beam_end=!0,i=null),r<=0?(t.beam_st=!0,t.beam_end=!0):t.type==C.NOTE&&(t.beam_st=!0,s=!1);t.beam_end&&(s=!0),t.type==C.NOTE&&(i=t)}if(t.type==C.NOTE){t.nhd!=0&&sort_pitch(t),o=t.notes[0].pit;for(n=t.prev;n;n=n.prev){if(n.type!=C.REST)break;n.notes[0].pit=o}}else t.notes||(t.notes=[],t.notes[0]={},t.nhd=0),t.notes[0].pit=o}i&&(i.beam_end=!0)}function set_rb(e){var t,n,r,i=e.sym;while(i){if(i.type!=C.BAR||!i.rbstart||i.norepbra){i=i.next;continue}n=cfmt.rbmax;if(i.text&&i.text[0]=="1"){r=0,t=null;for(i=i.next;i;i=i.next){if(i.type!=C.BAR)continue;r++;if(i.rbstop){r<=cfmt.rbmax&&(n=r,t=null);break}r==cfmt.rbmin&&(t=i)}t&&(t.rbstop=1,n=cfmt.rbmin)}while(i){if(i.rbstart!=2){i=i.next;if(!i)break;if(i.rbstart!=2){i=i.next;if(!i)break;if(i.rbstart!=2)break}}r=0,t=null;for(i=i.next;i;i=i.next){if(i.type!=C.BAR)continue;r++;if(i.rbstop)break;i.next?r==n&&(i.rbstop=1):i.rbstop=2}}}}function set_global(){var e,t,n,r,i;i=cur_sy,t=i.nstaff;for(;;){i=i.next;if(!i)break;i.nstaff>t&&(t=i.nstaff)}nstaff=t,r=voice_tb.length;for(n=0;n<r;n++)e=voice_tb[n],set_words(e),set_rb(e);set_float(),set_clefs(),self.set_pitch(null)}function set_indent(e){var t,n,r,i,s,o,u,a,f=voice_tb.length,l=0;for(n=0;n<f;n++){i=voice_tb[n];if(cur_sy.voices[n].range<0)continue;t=cur_sy.voices[n].st,s=(e||i.new_name)&&i.nm?i.nm:i.snm;if(!s)continue;a||(a=get_font("voice"),set_font(a)),o=0;for(;;){u=s.indexOf("\\n",o),u<0?r=strwh(s.slice(o)):r=strwh(s.slice(o,u)),r=r[0],r>l&&(l=r);if(u<0)break;o=u+1}}a&&(l+=4*cwid(" ")*a.swfac),r=.5;for(t=0;t<=cur_sy.nstaff;t++){if(cur_sy.staves[t].flags&(OPEN_BRACE2|OPEN_BRACKET2)){r=12;break}cur_sy.staves[t].flags&(OPEN_BRACE|OPEN_BRACKET)&&(r=6)}return l+=r,e&&(l+=cfmt.indent),l}function set_beams(e){var t,n,r,i,s,o,u,a,f,l,c,h,p=-1;for(t=e;t;t=t.next){if(t.type!=C.NOTE){if(t.type!=C.GRACE)continue;r=t.extra;if(r.stem==2){s=t;continue}!t.stem&&(t.stem=t.multi)==0&&(t.stem=1);for(;r;r=r.next)r.stem=t.stem,r.multi=t.multi;continue}if(!t.stem&&(t.stem=t.multi)==0){l=t.mid/3+18;if(i)t.stem=p;else if(t.beam_st&&!t.beam_end){i=!0,c=t.notes[t.nhd].pit,h=t.notes[0].pit;for(r=t.next;r;r=r.next){if(r.type!=C.NOTE)continue;if(r.stem||r.multi){t.stem=r.stem||r.multi;break}r.notes[r.nhd].pit>c&&(c=r.notes[r.nhd].pit),r.notes[0].pit<h&&(h=r.notes[0].pit);if(r.beam_end)break}r.beam_end&&((c+h)/2<l?t.stem=1:(c+h)/2>l?t.stem=-1:cfmt.bstemdown&&(t.stem=-1)),t.stem||(t.stem=p)}else{a=(t.notes[t.nhd].pit+t.notes[0].pit)/2;if(a==l){a=0;for(f=0;f<=t.nhd;f++)a+=t.notes[f].pit;a/=t.nhd+1}a<l?t.stem=1:a>l?t.stem=-1:cfmt.bstemdown?t.stem=-1:t.stem=p}}else t.beam_st&&!t.beam_end&&(i=!0);t.beam_end&&(i=!1),p=t.stem;if(s){for(r=s.extra;r;r=r.next)r.stem=-p;s.stem=-p,s=null}}}function same_head(e,t){var n,r,i,s,o,u,a,f,l,c,h;if(e.shiftunison&&e.shiftunison>=3)return!1;if((i=e.dur)>=C.BLEN)return!1;if((s=t.dur)>=C.BLEN)return!1;if(e.stemless&&t.stemless)return!1;if(e.dots!=t.dots)if(e.shiftunison&&e.shiftunison&1||e.dots*t.dots!=0)return!1;if(e.stem*t.stem>0)return!1;n=r=0;if(e.notes[0].pit>t.notes[0].pit){if(e.stem<0)return!1;while(t.notes[r].pit!=e.notes[0].pit)if(++r>t.nhd)return!1}else if(e.notes[0].pit<t.notes[0].pit){if(t.stem<0)return!1;while(t.notes[0].pit!=e.notes[n].pit)if(++n>e.nhd)return!1}if(t.notes[r].acc!=e.notes[n].acc)return!1;u=n,f=r,c=e.notes[n].shhd,h=t.notes[r].shhd;do{n++,r++;if(n>e.nhd)break;if(r>t.nhd)break;if(t.notes[r].acc!=e.notes[n].acc)return!1;c<e.notes[n].shhd&&(c=e.notes[n].shhd),h<t.notes[r].shhd&&(h=t.notes[r].shhd)}while(t.notes[r].pit==e.notes[n].pit);if(n<=e.nhd){if(r<=t.nhd)return!1;if(t.stem>0)return!1}else if(r<=t.nhd&&e.stem>0)return!1;a=n,l=r,o=0;if(i!=s){i<s&&(i=s,s=e.dur);if(i<C.BLEN/2)t.dots?o=2:e.dots&&(o=1);else{if(!(s<C.BLEN/4))return!1;if(e.shiftunison&&e.shiftunison&2)return!1;o=t.dur>=C.BLEN/2?2:1}}o==0&&(o=e.p_v.scale<t.p_v.scale?2:1);if(o==1){for(r=f;r<l;r++)t.notes[r].invis=!0,delete t.notes[r].acc;for(r=0;r<=t.nhd;r++)t.notes[r].shhd+=c}else{for(n=u;n<a;n++)e.notes[n].invis=!0,delete e.notes[n].acc;for(n=0;n<=e.nhd;n++)e.notes[n].shhd+=h}return!0}function unison_acc(e,t,n,r){var i,s;if(!t.notes[r].acc){s=w_note[t.head]*2+t.xmx+e.notes[n].shac+2,e.notes[n].micro&&(s+=2),t.dots&&(s+=6);for(i=0;i<=e.nhd;i++)e.notes[i].shhd+=s,e.notes[i].shac-=s;e.xmx+=s}else{s=w_note[e.head]*2+e.xmx+t.notes[r].shac+2,t.notes[r].micro&&(s+=2),e.dots&&(s+=6);for(i=0;i<=t.nhd;i++)t.notes[i].shhd+=s,t.notes[i].shac-=s;t.xmx+=s}}function set_left(e){var t,n,r,i,s=w_note[e.head],o=s,u=[];for(n=0;n<MAXPIT;n++)u.push(-100);if(e.nflags>-2){e.stem>0?(o=-o,n=e.notes[0].pit*2,r=(Math.ceil((e.ymx-2)/3)+18)*2):(n=(Math.ceil((e.ymn+2)/3)+18)*2,r=e.notes[e.nhd].pit*2),n<0&&(n=0),r>=MAXPIT&&(r=MAXPIT-1);while(n<=r)u[n++]=o}i=e.notes[e.stem>0?0:e.nhd].shhd;for(t=0;t<=e.nhd;t++)o=-e.notes[t].shhd+s+i,n=e.notes[t].pit*2,n<0?n=0:n>=MAXPIT-1&&(n=MAXPIT-2),o>u[n]&&(u[n]=o),e.head!=C.SQUARE&&(o-=1),o>u[n-1]&&(u[n-1]=o),o>u[n+1]&&(u[n+1]=o);return u}function set_right(e){var t,n,r,i,s,o=w_note[e.head],u=o,a=e.nflags>0&&e.beam_st&&e.beam_end,f=[];for(n=0;n<MAXPIT;n++)f.push(-100);if(e.nflags>-2){e.stem<0?(u=-u,n=(Math.ceil((e.ymn+2)/3)+18)*2,r=e.notes[e.nhd].pit*2,i=n+4):(n=e.notes[0].pit*2,r=(Math.ceil((e.ymx-2)/3)+18)*2),n<0&&(n=0),r>MAXPIT&&(r=MAXPIT);while(n<r)f[n++]=u}if(a)if(e.stem>0){e.xmx==0?n=e.notes[e.nhd].pit*2:n=e.notes[0].pit*2,n+=4,n<0&&(n=0);for(;n<MAXPIT&&n<=r-4;n++)f[n]=11}else{n=i,n<0&&(n=0);for(;n<MAXPIT&&n<=e.notes[0].pit*2-4;n++)f[n]=3.5}s=e.notes[e.stem>0?0:e.nhd].shhd;for(t=0;t<=e.nhd;t++)u=e.notes[t].shhd+o-s,n=e.notes[t].pit*2,n<0?n=0:n>=MAXPIT-1&&(n=MAXPIT-2),u>f[n]&&(f[n]=u),e.head!=C.SQUARE&&(u-=1),u>f[n-1]&&(f[n-1]=u),u>f[n+1]&&(f[n+1]=u);return f}function set_overlap(){function x(){t=n,n=e,c=h,E=m,S=g,d=p}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S;for(e=tsfirst;e;e=e.ts_next){if(e.type!=C.NOTE||e.invis)continue;if(e.xstem&&e.ts_prev.stem<0)for(u=0;u<=e.nhd;u++)e.notes[u].shhd-=7,e.notes[u].shac+=16;n=e;for(;;){n=n.ts_next;if(!n)break;if(n.time!=e.time){n=null;break}if(n.type==C.NOTE&&!n.invis&&n.st==e.st)break}if(!n)continue;t=e,cur_sy.voices[t.v].range<cur_sy.voices[n.v].range?n.dot_low=!0:t.dot_low=!0;if(t.ymn>n.ymx||t.ymx<n.ymn)continue;if(same_head(t,n))continue;g=set_right(t),y=set_left(n),r=t.ts_prev;if(r&&r.time==t.time&&r.st==t.st&&r.type==C.NOTE&&!r.invis){w=set_right(r);for(i=0;i<MAXPIT;i++)w[i]>g[i]&&(g[i]=w[i])}else r=null;c=-10;for(i=0;i<MAXPIT;i++)y[i]+g[i]>c&&(c=y[i]+g[i]);if(c<-3)if(!t.dots||!n.dots||!n.dot_low||t.stem>0||n.stem<0||t.notes[t.nhd].pit+2!=n.notes[0].pit||n.notes[0].pit&1)continue;b=set_right(n),m=set_left(t);if(r){w=set_left(r);for(i=0;i<MAXPIT;i++)w[i]>m[i]&&(m[i]=w[i])}h=p=d=-100;for(i=0;i<MAXPIT;i++)m[i]+b[i]>h&&(h=m[i]+b[i]),b[i]>d&&(d=b[i]),g[i]>p&&(p=g[i]);f=0,s=t.nhd,o=n.nhd;for(;;){l=t.notes[s].pit-n.notes[o].pit;switch(l){case 0:if(t.notes[s].acc!=n.notes[o].acc){f=-1;break}n.notes[o].acc&&(n.notes[o].acc=0),t.dots&&n.dots&&t.notes[s].pit&1&&(f=1);break;case-1:t.dots&&n.dots&&(t.notes[s].pit&1?(t.dot_low=!1,n.dot_low=!1):(t.dot_low=!0,n.dot_low=!0));break;case-2:if(t.dots&&n.dots&&!(t.notes[s].pit&1)){t.dot_low=!1,n.dot_low=!1;break}}if(f<0)break;if(l>=0&&--s<0)break;if(l<=0&&--o<0)break}if(f<0){unison_acc(t,n,s,o);continue}a=0,t.dots?n.dots&&(f||(a=1)):n.dots&&h+p<c+d&&(a=1),E=y,S=b,!r&&h+p<c+d&&x(),c+=3,c<0&&(c=0),u=t.stem>=0?0:t.nhd,c+=t.notes[u].shhd,u=n.stem>=0?0:n.nhd,c-=n.notes[u].shhd;if(t.dots){v=7.7+t.xmx+3.5*t.dots-3.5+3;if(!a){h=-100;for(s=0;s<=t.nhd;s++)i=t.notes[s].pit,i&1||(t.dot_low?i--:i++),i*=2,i<1?i=1:i>=MAXPIT-1&&(i=MAXPIT-2),E[i]>h&&(h=E[i]),E[i-1]+1>h&&(h=E[i-1]+1),E[i+1]+1>h&&(h=E[i+1]+1);v+h+2>c&&(c=v+h+2)}else if(v<c+d+n.xmx){h=0;for(s=0;s<=t.nhd;s++)i=t.notes[s].pit,i&1||(t.dot_low?i--:i++),i*=2,i<1?i=1:i>=MAXPIT-1&&(i=MAXPIT-2),S[i]>h&&(h=S[i]),S[i-1]+1>h&&(h=S[i-1]=1),S[i+1]+1>h&&(h=S[i+1]+1);h>4.5&&7.7+t.xmx+2<c+h+n.xmx&&(n.xmx=h+3-7.7)}}for(u=n.nhd;u>=0;u--)n.notes[u].shhd+=c;n.xmx+=c,a&&(t.xmx=n.xmx)}}function set_stems(){var e,t,n,r,i,s,o,u,a,f;for(e=tsfirst;e;e=e.ts_next){if(e.type!=C.NOTE){if(e.type!=C.GRACE)continue;a=f=e.mid;for(n=e.extra;n;n=n.next)r=GSTEM,n.nflags>1&&(r+=1.2*(n.nflags-1)),s=3*(n.notes[0].pit-18),o=3*(n.notes[n.nhd].pit-18),e.stem>=0?(n.y=s,n.ys=o+r,o=Math.round(n.ys)):(n.y=o,n.ys=s-r,s=Math.round(n.ys)),o+=2,s-=2,s<a?a=s:o>f&&(f=o),n.ymx=o,n.ymn=s;e.ymx=f,e.ymn=a;continue}set_head_shift(e),u=e.nflags;if(e.beam_st&&!e.beam_end){e.feathered_beam&&(u=++e.nflags);for(t=e.next;;t=t.next)if(t.type==C.NOTE){e.feathered_beam&&t.nflags++;if(t.beam_end)break}t.nflags>u&&(u=t.nflags)}else if(!e.beam_st&&e.beam_end){for(t=e.prev;;t=t.prev)if(t.beam_st)break;t.nflags>u&&(u=t.nflags)}r=cfmt.stemheight;switch(u){case 2:r+=2;break;case 3:r+=5;break;case 4:r+=10;break;case 5:r+=16}(i=e.p_v.scale)!=1&&(r*=(i+1)*.5),s=3*(e.notes[0].pit-18),e.nhd>0?(r-=2,o=3*(e.notes[e.nhd].pit-18)):o=s,e.ntrem&&(r+=2*e.ntrem),e.stemless?(e.stem>=0?(e.y=s,e.ys=o):(e.ys=s,e.y=o),u==-4&&(s-=6),e.ymx=o+4,e.ymn=s-4):e.stem>=0?(u>=2&&(r-=1),e.notes[e.nhd].pit>26&&(u<=0||!e.beam_st||!e.beam_end)&&(r-=2,e.notes[e.nhd].pit>28&&(r-=2)),e.y=s,e.notes[0].ti1&&(s-=3),e.ymn=s-4,e.ys=o+r,e.ys<e.mid&&(e.ys=e.mid),e.ymx=e.ys+2.5|0):(e.notes[0].pit<18&&(u<=0||!e.beam_st||!e.beam_end)&&(r-=2,e.notes[0].pit<16&&(r-=2)),e.ys=s-r,e.ys>e.mid&&(e.ys=e.mid),e.ymn=e.ys-2.5|0,e.y=o,e.notes[e.nhd].ti1&&(o+=3),e.ymx=o+4)}}function check_bar(e){var t,n,r,i,s=e.p_v;while(e.type==C.CLEF||e.type==C.KEY||e.type==C.METER){e.type==C.METER&&e.time>s.sym.time&&(insert_meter|=1),e=e.prev;if(!e)return}if(e.type!=C.BAR)return;e.text!=undefined&&(s.bar_start=clone(e),s.bar_start.bar_type="",delete e.text,delete e.a_gch),t=e.bar_type;if(t==":")return;if(t.slice(-1)!=":")return;s.bar_start||(s.bar_start=clone(e));if(t[0]!=":"){if(t=="||:")return s.bar_start.bar_type="[|:",e.bar_type="||",!0;s.bar_start.bar_type=t,e.prev&&e.prev.type==C.BAR?unlksym(e):e.bar_type="|";return}if(t=="||:")return s.bar_start.bar_type="[|:",e.bar_type="||",!0;n=0;while(t[n]==":")n++;if(n<t.length){e.bar_type=t.slice(0,n)+"|]",n=t.length-1;while(t[n]==":")n--;s.bar_start.bar_type="[|"+t.slice(n+1)}else n=t.length/2|0,e.bar_type=t.slice(0,n)+"|]",s.bar_start.bar_type="[|"+t.slice(n);return!0}function sym_staff_move(e){for(var t=tsfirst;t;t=t.ts_next){if(t.nl)break;t.st==e&&t.type!=C.CLEF&&(t.st++,t.invis=!0)}}function block_gen(e){switch(e.subtype){case"leftmargin":case"rightmargin":case"pagescale":case"pagewidth":case"scale":case"staffwidth":svg_flush(),self.set_format(e.subtype,e.param);break;case"ml":svg_flush(),user.img_out(e.text);break;case"newpage":blk_flush(),block.newpage=!0,blk_out();break;case"sep":set_page(),vskip(e.sk1),output+='<path class="stroke"\n d="M',out_sxsy(e.x," ",0),output+="h"+e.l.toFixed(2)+'"/>\n',vskip(e.sk2);break;case"text":write_text(e.text,e.opt);break;case"title":write_title(e.text,!0);break;case"vskip":vskip(e.sk);break;default:error(2,e,"Block $1 not treated",e.subtype)}}function set_piece(){function c(e){var t=staff_tb[e],n=l.staves[e];t||(t=staff_tb[e]={}),t.y=0,t.stafflines=n.stafflines,t.staffscale=n.staffscale,t.ann_top=t.ann_bot=0}function h(){var e,t,n,r=l.staves.length;for(e=0;e<r;e++){if(!(l.staves[e].flags&(OPEN_BRACE|OPEN_BRACE2)))continue;n=0,t=e;while(e<r){n|=a[e]?1:2;if(l.staves[e].flags&(CLOSE_BRACE|CLOSE_BRACE2))break;e++}if(n==3)while(t<=e)a[t]=!0,f[t++]=!0}}function p(){var e,t,n,r,i;for(e=0;e<=nstaff;e++){t=staff_tb[e];if(!f[e]){t.botbar=t.topbar=0;continue}r=t.stafflines.length,t.topbar=6*(r-1);for(n=0;n<r-1;n++)if(t.stafflines[n]!=".")break;t.botline=t.botbar=n*6,n>=r-2&&(t.stafflines[n]!="."?(t.botbar-=6,t.topbar+=6):(t.botbar-=12,t.topbar+=12))}}var e,t,n,r,i,s,o,u,a=[],f=[],l=cur_sy;nstaff=s=l.nstaff;for(r=0;r<=s;r++)c(r);for(e=tsfirst;e;e=e.ts_next){if(e.nl)break;e.ts_next||(t=e);switch(e.type){case C.STAVES:h(),l.st_print=new Uint8Array(a),l=e.sy,s=l.nstaff;if(nstaff<s){for(r=nstaff+1;r<=s;r++)c(r);nstaff=s}a=[];continue;case C.BLOCK:blocks.push(e),unlksym(e),t&&(t=e.ts_prev);continue}r=e.st;if(a[r])continue;switch(e.type){case C.CLEF:r>nstaff&&(staff_tb[r].clef=e,unlksym(e));break;case C.BAR:if(!l.staves[r].staffnonote||l.staves[r].staffnonote<=1)break;case C.GRACE:f[r]=a[r]=!0;break;case C.NOTE:case C.REST:case C.SPACE:case C.MREST:l.staves[r].staffnonote>1?f[r]=a[r]=!0:!e.invis&&(l.staves[r].staffnonote!=0||e.type==C.NOTE)&&(f[r]=a[r]=!0)}}tsnext=e,h(),l.st_print=new Uint8Array(a),p();for(r=0;r<nstaff;r++)f[r]||sym_staff_move(r);f[nstaff]||(staff_tb[nstaff].topbar=0),init_music_line(),gene.st_print=new Uint8Array(f);if(tsnext){e=tsnext,delete e.nl,t=e.ts_prev,t.ts_next=null,o=voice_tb.length;for(i=0;i<o;i++){n=voice_tb[i];if(n.sym&&n.sym.time<=tsnext.time){for(e=tsnext.ts_prev;e;e=e.ts_prev)if(e.v==i){n.s_next=e.next,e.next=null,check_bar(e)&&(u=e.wl,self.set_width(e),e.shrink+=e.wl-u);break}if(e)continue}n.s_next=n.sym,n.sym=null}}t.type!=C.BAR&&(e=add_end_bar(t),e.space=set_space(e),e.space<e.shrink&&t.type!=C.KEY&&(e.space=e.shrink))}function set_sym_glue(e){var t,n,r,i,s,o=0,u=0,a=0,f=0,l=0;for(t=tsfirst;t;t=t.ts_next)t.type==C.GRACE&&!i&&(i=t),t.seqst&&(o+=t.shrink,t.space?t.space<t.shrink?(l+=t.shrink,u+=t.shrink):u+=t.space:f+=t.shrink);if(u==0){realwidth=0;return}r=!tsnext||tsnext.type==C.BLOCK||blocks.length;if(o>=e||u==l){o>e&&error(1,t,"Line too much shrunk $1 $2 $3",o.toFixed(2),u.toFixed(2),e.toFixed(2)),a=0;for(t=tsfirst;t;t=t.ts_next)t.seqst&&(a+=t.shrink),t.x=a;spf_last=0}else if(r&&u+f>e*(1-cfmt.stretchlast)||!r&&(u+f>e||cfmt.stretchstaff)){for(var c=4;--c>=0;){s=(e-f-l)/(u-l),u=0,l=0,a=0;for(t=tsfirst;t;t=t.ts_next)t.seqst&&(t.space?t.space*s<=t.shrink?(l+=t.shrink,u+=t.shrink,a+=t.shrink):(u+=t.space,a+=t.space*s):a+=t.shrink),t.x=a;if(Math.abs(a-e)<.1)break}spf_last=s}else{s=(e-f-l)/u,spf_last<s&&(s=spf_last);for(t=tsfirst;t;t=t.ts_next)t.seqst&&(a+=t.space*s<=t.shrink?t.shrink:t.space*s),t.x=a}realwidth=a;for(t=i;t;t=t.ts_next){if(t.type!=C.GRACE)continue;t.gr_shift?a=t.prev.x+t.prev.wr:a=t.x-t.wl;for(n=t.extra;n;n=n.next)n.x+=a}}function set_sym_line(){var e,t,n,r=voice_tb.length;for(n=0;n<r;n++)e=voice_tb[n],t=e.s_next,e.sym=t,t&&(t.prev=null)}function set_posx(){posx=img.lm/cfmt.scale}function gen_init(){var e=tsfirst,t=e.time;for(;e;e=e.ts_next){if(e.time!=t){set_page();return}switch(e.type){case C.NOTE:case C.REST:case C.MREST:set_page();return;default:continue;case C.STAVES:cur_sy=e.sy;break;case C.BLOCK:block_gen(e)}unlksym(e),e.p_v.s_next==e&&(e.p_v.s_next=e.next)}tsfirst=null}function output_music(){var e,t,n,r;gen_init();if(!tsfirst)return;set_global(),voice_tb.length>1&&self.set_stem_dir();for(e=0;e<voice_tb.length;e++)set_beams(voice_tb[e].sym);self.set_stems(),voice_tb.length>1&&(set_rest_offset(),set_overlap()),set_acc_shft(),set_allsymwidth(),n=set_indent(!0),cfmt.singleline?(e=get_ck_width(),t=n+e[0]+e[1]+get_width(tsfirst,null),img.width=t*cfmt.scale+img.lm+img.rm+2):(t=get_lwidth(),cut_tune(t,n)),spf_last=1.2;for(;;){set_piece(),self.set_sym_glue(t-n);if(realwidth!=0){n!=0&&(posx+=n),draw_sym_near(),r=set_staff(),delayed_update(),draw_systems(n),draw_all_sym(),vskip(r),n!=0&&(posx-=n,insert_meter&=-3);while(blocks.length!=0)block_gen(blocks.shift())}tsfirst=tsnext,svg_flush();if(!tsnext)break;gen_init();if(!tsfirst)break;tsfirst.ts_prev=null,set_sym_line(),t=get_lwidth(),n=set_indent()}}function reset_gen(){insert_meter=cfmt.writefields.indexOf("M")>=0?3:2}function set_ref(e){e.fname=parse.fname,e.istart=parse.istart,e.iend=parse.iend}function new_clef(e){var t={type:C.CLEF,clef_line:2,clef_type:"t",v:curvoice.v,p_v:curvoice,time:curvoice.time,dur:0},n=1;set_ref(t);switch(e[0]){case'"':n=e.indexOf('"',1),t.clef_name=e.slice(1,n),n++;break;case"a":if(e[1]=="u"){t.clef_type="a",t.clef_auto=!0,n=4;break}n=4;case"C":t.clef_type="c",t.clef_line=3;break;case"b":n=4;case"F":t.clef_type="b",t.clef_line=4;break;case"n":n=4,t.invis=!0;break;case"t":if(e[1]=="e"){t.clef_type="c",t.clef_line=4;break}n=6;case"G":break;case"p":n=4;case"P":t.clef_type="p",t.clef_line=3,curvoice.key.k_sf=0,curvoice.ckey.k_drum=!0;break;default:syntax(1,"Unknown clef '$1'",e);return}e[n]>="1"&&e[n]<="9"&&(t.clef_line=Number(e[n]),n++);if(e[n+1]!="8")return t;switch(e[n]){case"^":t.clef_oct_transp=!0;case"+":t.clef_octave=7;break;case"_":t.clef_oct_transp=!0;case"-":t.clef_octave=-7}return t}function get_transp(e,t){var n,r,i,s,o=[];if(e[0]=="0")return 0;if("123456789-+".indexOf(e[0])>=0){r=parseInt(e)*3;if(isNaN(r)||r<-108||r>108){syntax(1,"Bad transpose value");return}switch(e.slice(-1)){default:return r;case"#":r++;break;case"b":r+=2}return r>0?r:r-3}if(t=="instr"){i=e.indexOf("/");if(!cfmt.sound){if(i<0)return 0;e=e.replace("/","")}else i<0?e="c"+e:e=e.replace(/.*\//,"c")}i=new scanBuf,i.buffer=e;for(n=0;n<2;n++){s=i.buffer[i.index]?parse_acc_pit(i):null;if(!s){syntax(1,"Bad transpose value");return}s.pit+=124,r=(s.pit/7|0)*12+note_pit[s.pit%7],s.acc&&s.acc!=3&&(r+=s.acc),o[n]=r}r=(o[1]-o[0])*3;if(s)switch(s.acc){default:return r;case 2:case 1:r++;break;case-1:case-2:r+=2}return r>0?r:r-3}function set_linebreak(e){var t,n;for(t=0;t<128;t++)char_tb[t]=="\n"&&(char_tb[t]=nil);e=e.split(/\s+/);for(t=0;t<e.length;t++){n=e[t];switch(n){case"!":case"$":case"*":case";":case"?":case"@":break;case"<none>":continue;case"<EOL>":n="\n";break;default:syntax(1,"Bad value '$1' in %%linebreak - ignored",n);continue}char_tb[n.charCodeAt(0)]="\n"}}function set_user(e){var t,n,r,i=e.match(/(.*?)[= ]*([!"].*[!"])/);if(!i){syntax(1,'Lack of starting ! or " in U: / %%user');return}n=i[1],r=i[2];if(r.slice(-1)!=r[0]){syntax(1,"Lack of ending $1 in U:/%%user",r[0]);return}n[0]=="\\"&&(n[1]=="t"?n=" ":n[1]||(n=" ")),t=n.charCodeAt(0);if(t>=128){syntax(1,errs.not_ascii);return}switch(char_tb[t][0]){case"0":case"d":case"i":case" ":break;case'"':case"!":if(char_tb[t].length>1)break;default:syntax(1,"Bad user character '$1'",n);return}switch(r){case"!beambreak!":r=" ";break;case"!ignore!":r="i";break;case"!nil!":case"!none!":r="d"}char_tb[t]=r}function get_st_lines(e){var t,n;if(!e)return;if(/^[\]\[|.-]+$/.test(e))return e.replace(/\]/g,"[");t=parseInt(e);switch(t){case 0:return"...";case 1:return"..|";case 2:return".||";case 3:return".|||"}if(isNaN(t)||t<0||t>16)return;n="|";while(--t>0)n+="|";return n}function new_block(e){var t={type:C.BLOCK,subtype:e,dur:0};parse.state==2&&goto_tune();var n=curvoice;return curvoice=voice_tb[par_sy.top_voice],sym_link(t),curvoice=n,t}function set_vp(e){var t,n,r,i,s;for(;;){n=e.shift();if(!n)break;if(n[n.length-1]=="="&&e.length==0){syntax(1,errs.bad_val,n);break}switch(n){case"clef=":t=e.shift();break;case"clefpitch=":n=e.shift();if(n){i=ntb.indexOf(n[0]);if(i>=0){switch(n[1]){case"'":i+=7;break;case",":i-=7,n[2]==","&&(i-=7)}s=4-i;break}}syntax(1,errs.bad_val,n);break;case"octave=":case"uscale=":i=parseInt(e.shift()),isNaN(i)?syntax(1,errs.bad_val,n):curvoice[n.slice(0,-1)]=i;break;case"cue=":curvoice.scale=e.shift()=="on"?.7:1;break;case"instrument=":curvoice.transp=get_transp(e.shift(),"instr");break;case"map=":curvoice.map=e.shift();break;case"name=":case"nm=":curvoice.nm=e.shift(),curvoice.nm[0]=='"'&&(curvoice.nm=curvoice.nm.slice(1,-1)),curvoice.new_name=!0;break;case"stem=":case"pos=":n=="pos="?n=e.shift().split(" "):n=["stm",e.shift()],i=posval[n[1]];if(i==undefined){syntax(1,errs.bad_val,n[0]);break}r||(r={}),r[n[0]]=i;break;case"scale=":i=parseFloat(e.shift()),isNaN(i)||i<.6||i>1.5?syntax(1,errs.bad_val,"%%voicescale"):curvoice.scale=i;break;case"score=":if(cfmt.sound)break;n=e.shift(),n.indexOf("/")<0&&(n+="/c"),curvoice.transp=get_transp(n);break;case"shift=":curvoice.shift=get_transp(e.shift());break;case"sound=":case"transpose=":if(!cfmt.sound)break;curvoice.transp=get_transp(e.shift());break;case"subname=":case"sname=":case"snm=":curvoice.snm=e.shift(),curvoice.snm[0]=='"'&&(curvoice.snm=curvoice.snm.slice(1,-1));break;case"stafflines=":i=get_st_lines(e.shift()),i==undefined?syntax(1,"Bad %%stafflines value"):curvoice.st!=undefined?par_sy.staves[curvoice.st].stafflines=i:curvoice.stafflines=i;break;case"staffnonote=":i=parseInt(e.shift()),isNaN(i)?syntax(1,"Bad %%staffnonote value"):curvoice.staffnonote=i;break;case"staffscale=":i=parseFloat(e.shift()),isNaN(i)||i<.3||i>2?syntax(1,"Bad %%staffscale value"):curvoice.staffscale=i;break;default:switch(n.slice(0,4)){case"treb":case"bass":case"alto":case"teno":case"perc":t=n;break;default:"GFC".indexOf(n[0])>=0?t=n:n.slice(-1)=="="&&e.shift()}}}if(r){curvoice.pos=clone(curvoice.pos);for(n in r)r.hasOwnProperty(n)&&(curvoice.pos[n]=r[n])}t&&(t=new_clef(t),t&&(s&&(t.clefpit=s),get_clef(t)))}function set_kv_parm(e){curvoice.init||(curvoice.init=!0,info.V&&(info.V["*"]&&(e=info.V["*"].concat(e)),info.V[curvoice.id]&&(e=info.V[curvoice.id].concat(e)))),e.length!=0&&self.set_vp(e)}function memo_kv_parm(e,t){if(t.length==0)return;info.V||(info.V={}),info.V[e]?Array.prototype.push.apply(info.V[e],t):info.V[e]=t}function new_key(e){var t,n,r,i,s,o=0,u={type:C.KEY,k_delta:0,dur:0};set_ref(u),t=1;switch(e[0]){case"A":u.k_sf=3;break;case"B":u.k_sf=5;break;case"C":u.k_sf=0;break;case"D":u.k_sf=2;break;case"E":u.k_sf=4;break;case"F":u.k_sf=-1;break;case"G":u.k_sf=1;break;case"H":switch(e[1]){case"P":case"p":u.k_bagpipe=e[1],u.k_sf=e[1]=="P"?0:2,t++;break;default:syntax(1,"Unknown bagpipe-like key")}break;case"P":syntax(1,"K:P is deprecated"),u.k_drum=!0,r=!0;break;case"n":e.indexOf("none")==0&&(u.k_sf=0,u.k_none=!0,t=4);default:r=!0}if(!r){switch(e[t]){case"#":u.k_sf+=7,t++;break;case"b":u.k_sf-=7,t++}e=e.slice(t).trim();switch(e.slice(0,3).toLowerCase()){default:if(e[0]!="m"||e[1]!=" "&&e[1]!=" "&&e[1]!="\n"){r=!0;break};case"aeo":case"m":case"min":u.k_sf-=3,o=5;break;case"dor":u.k_sf-=2,o=1;break;case"ion":case"maj":break;case"loc":u.k_sf-=5,o=6;break;case"lyd":u.k_sf+=1,o=3;break;case"mix":u.k_sf-=1,o=4;break;case"phr":u.k_sf-=4,o=2}r||(e=e.replace(/\w+\s*/,"")),e.indexOf("exp ")==0&&(e=e.replace(/\w+\s*/,""),e||syntax(1,"No accidental after 'exp'"),u.k_exp=!0),i=e[0];if(i=="^"||i=="_"||i=="="){u.k_a_acc=[],s=new scanBuf,s.buffer=e;do{var a=parse_acc_pit(s);if(!a)return[u,null];u.k_a_acc.push(a),i=e[s.index];while(i==" ")i=e[++s.index]}while(i=="^"||i=="_"||i=="=");e=e.slice(s.index)}else u.k_exp&&e.indexOf("none")==0&&(u.k_sf=0,e=e.replace(/\w+\s*/,""))}return u.k_delta=cgd2cde[(u.k_sf+7)%7],u.k_mode=o,[u,info_split(e,0)]}function new_meter(e){var t={type:C.METER,dur:0,a_meter:[]},n={},r,i,s=0,o,u=0,a,f,l=e,c;set_ref(t);if(l.indexOf("none")==0)u=4,f=1;else{f=0;while(u<e.length){if(l[u]=="=")break;switch(l[u]){case"C":n.top=l[u++],s||(s=4,o=4);break;case"c":case"o":n.top=l[u++];if(!s){l[-1]=="c"?(s=2,o=4):(s=3,o=4);switch(l[u]){case"|":o/=2;break;case".":s*=3,o*=2}}break;case".":case"|":n.top=l[u++];break;case"(":l[u+1]=="("&&(c=!0,n.top=l[u++],t.a_meter.push(n),n={}),a=u+1;while(a<e.length){if(l[a]==")"||l[a]=="/")break;a++}if(l[a]==")"&&l[a+1]=="/"){u++;continue};case")":c=l[u]=="(",n.top=l[u++],t.a_meter.push(n),n={};continue;default:if(l[u]<="0"||l[u]>"9"){syntax(1,"Bad char '$1' in M:",l[u]);return}o=2,n.top=l[u++];for(;;){while(l[u]>="0"&&l[u]<="9")n.top+=l[u++];if(l[u]==")"){if(l[u+1]!="/")break;u++}if(l[u]=="/"){u++;if(l[u]<="0"||l[u]>"9"){syntax(1,"Bad char '$1' in M:",l[u]);return}n.bot=l[u++];while(l[u]>="0"&&l[u]<="9")n.bot+=l[u++];break}if(l[u]!=" "&&l[u]!="+")break;if(u>=e.length||l[u+1]=="(")break;n.top+=l[u++]}s=parseInt(n.top)}c||(n.bot&&(o=parseInt(n.bot)),f+=s*C.BLEN/o),t.a_meter.push(n),n={};while(l[u]==" ")u++;l[u]=="+"&&(n.top=l[u++],t.a_meter.push(n),n={})}}if(l[u]=="="){r=l.substring(++u).match(/^(\d+)\/(\d+)$/);if(!r){syntax(1,"Bad duration '$1' in M:",l.substring(u));return}f=C.BLEN*r[1]/r[2]}t.wmeasure=f;if(parse.state!=3){info.M=e,glovar.meter=t;if(parse.state>=1){glovar.ulen||(f<=1||f>=C.BLEN*3/4?glovar.ulen=C.BLEN/8:glovar.ulen=C.BLEN/16);for(i=0;i<voice_tb.length;i++)voice_tb[i].meter=t,voice_tb[i].wmeasure=f}}else curvoice.wmeasure=f,is_voice_sig()?(curvoice.meter=t,reset_gen()):sym_link(t)}function new_tempo(e){var t=0,n,r,i,s,o={type:C.TEMPO,dur:0};set_ref(o),cfmt.writefields.indexOf("Q")<0&&(o.del=!0);if(e[0]=='"'){t=e.indexOf('"',1);if(t<0){syntax(1,"Unterminated string in Q:");return}o.tempo_str1=e.slice(1,t),t++;while(e[t]==" ")t++}s=new scanBuf,s.buffer=e,s.index=t;for(;;){r=e[s.index];if(r==undefined||r<="0"||r>"9")break;i=parse_dur(s),o.tempo_notes||(o.tempo_notes=[]),o.tempo_notes.push(C.BLEN*i[0]/i[1]);for(;;){r=e[s.index];if(r!=" ")break;s.index++}}if(r=="="){r=e[++s.index];while(r==" ")r=e[++s.index];t=s.index,r=="c"&&e[t+1]=="a"&&e[t+2]=="."&&e[t+3]==" "&&(o.tempo_ca="ca. ",s.index+=4),e[s.index+1]!="/"?o.tempo=s.get_int():(i=parse_dur(s),o.new_beat=C.BLEN*i[0]/i[1]),r=e[s.index];while(r==" ")r=e[++s.index]}if(r=='"'){s.index++,t=e.indexOf('"',s.index+1);if(t<0){syntax(1,"Unterminated string in Q:");return}o.tempo_str2=e.slice(s.index,t)}if(parse.state!=3){if(parse.state==1){info.Q=e,glovar.tempo=o;return}goto_tune()}curvoice.v==par_sy.top_voice&&(sym_link(o),glovar.tempo&&curvoice.time==0&&(glovar.tempo.del=!0))}function do_info(e,t){var n,r,i,s,o;switch(e){case"I":self.do_pscom(t);break;case"L":parse.state==2&&goto_tune(),s=t.match(/^1\/(\d+)(=(\d+)\/(\d+))?$/);if(s){r=Number(s[1]);if(!r||(r&r-1)!=0)break;r=C.BLEN/r;if(s[2]){i=Number(s[4]);if(!i||(i&i-1)!=0){i=0;break}i=Number(s[3])/i*C.BLEN}else i=r}else t=="auto"&&(r=i=-1);if(!i){syntax(1,"Bad L: value");break}parse.state<2?glovar.ulen=r:(curvoice.ulen=r,curvoice.dur_fact=i/r);break;case"M":new_meter(t);break;case"U":set_user(t);break;case"P":if(parse.state==0)break;if(parse.state==1){info.P=t;break}parse.state==2&&goto_tune();if(cfmt.writefields.indexOf(e)<0)break;n={type:C.PART,text:t,dur:0};var u=voice_tb[par_sy.top_voice];if(curvoice.v!=u.v){if(curvoice.time!=u.time)break;if(u.last_sym&&u.last_sym.type==C.PART)break;var a=curvoice;curvoice=u,sym_link(n),curvoice=a}else sym_link(n);break;case"Q":if(parse.state==0)break;new_tempo(t);break;case"V":get_voice(t);break;case"K":if(parse.state==0)break;get_key(t);break;case"N":case"R":info[e]?info[e]+="\n"+t:info[e]=t;break;case"r":if(!user.keep_remark||parse.state!=3)break;n={type:C.REMARK,text:t,dur:0},sym_link(n);break;default:syntax(0,"'$1:' line ignored",e)}}function adjust_dur(e){var t,n,r,i,s;t=curvoice.last_sym;if(!t)return;if(t.type==C.MREST||t.type==C.BAR)return;while(t.type!=C.BAR&&t.prev)t=t.prev;n=t.time,r=curvoice.time-n;if(n==0){while(t&&!t.dur)t=t.next;t&&t.type==C.REST&&t.invis&&(n+=t.dur*curvoice.wmeasure/r,t.prev?t.prev.next=t.next:curvoice.sym=t.next,t.next&&(t.next.prev=t.prev),t=t.next)}if(curvoice.wmeasure==r)return;for(;t;t=t.next){t.time=n;if(!t.dur||t.grace)continue;t.dur=t.dur*curvoice.wmeasure/r,t.dur_orig=t.dur_orig*curvoice.wmeasure/r,n+=t.dur;if(t.type!=C.NOTE&&t.type!=C.REST)continue;for(i=0;i<=t.nhd;i++)t.notes[i].dur=t.notes[i].dur*curvoice.wmeasure/r;s=identify_note(t,t.dur_orig),t.head=s[0],t.dots=s[1],t.nflags=s[2],t.nflags<=-2?t.stemless=!0:delete t.stemless}curvoice.time=e.time=n}function new_bar(){var e,t,n,r=parse.line,i={type:C.BAR,fname:parse.fname,istart:parse.bol+r.index,dur:0,multi:0};vover&&vover.bar&&get_vover("|"),glovar.new_nbar&&(i.bar_num=glovar.new_nbar,glovar.new_nbar=0),n=r.char();for(;;){t=r.next_char();switch(t){case"|":case"[":case"]":case":":n+=t;continue}break}n[0]==":"&&(n.length==1?(n="|",i.bar_dotted=!0):i.rbstop=2),a_gch&&self.gch_build(i),a_dcn&&(deco_cnv(a_dcn,i),a_dcn=null);switch(n.slice(-1)){case"[":if(/[0-9" ]/.test(t))break;n=n.slice(0,-1),r.index--,t="[";break;case":":i.rbstop=2}if(t>"0"&&t<="9"){n.slice(-1)=="["&&(n=n.slice(0,-1)),i.text=t;for(;;){t=r.next_char();if("0123456789,.-".indexOf(t)<0)break;i.text+=t}i.rbstop=2,i.rbstart=2}else if(t=='"'&&n.slice(-1)=="["){n=n.slice(0,-1),i.text="";for(;;){t=r.next_char();if(!t){syntax(1,"No end of repeat string");return}if(t=='"'){r.index++;break}t=="\\"&&(i.text+=t,t=r.next_char()),i.text+=t}i.text=cnv_escape(i.text),i.rbstop=2,i.rbstart=2}n[0]=="]"&&(i.rbstop=2,n.length!=1?n=n.slice(1):i.invis=!0),i.iend=parse.bol+r.index,i.rbstart&&curvoice.norepbra&&!curvoice.second&&(i.norepbra=!0),curvoice.ulen<0&&adjust_dur(i),e=curvoice.last_sym;if(e&&e.type==C.SPACE)e.time--;else if(e&&e.type==C.BAR){if(n=="["&&!e.text&&(curvoice.st==0||par_sy.staves[curvoice.st-1].flags&STOP_BAR||i.norepbra)){i.text&&(e.text=i.text),i.a_gch&&(e.a_gch=i.a_gch),i.norepbra&&(e.norepbra=i.norepbra),i.rbstart&&(e.rbstart=i.rbstart),i.rbstop&&(e.rbstop=i.rbstop);return}if(n=="|:"){if(e.bar_type==":|"){e.bar_type="::",e.rbstop=2;return}if(e.bar_type=="||"){e.bar_type="||:",e.rbstop=2;return}}}switch(n){case"[":i.rbstop=2;case"[]":case"[|]":i.invis=!0,n="[]";break;case":|:":case":||:":n="::";break;case"||":if(!cfmt.rbdbstop)break;case"[|":case"|]":i.rbstop=2}i.bar_type=n,curvoice.lyric_restart||(curvoice.lyric_restart=i),curvoice.sym_restart||(curvoice.sym_restart=i),e&&e.type==C.KEY&&(!e.prev||e.prev.type!=C.BAR)?(curvoice.last_sym=e.prev,e.prev||(curvoice.sym=e.prev),sym_link(i),i.next=e,e.prev=i,curvoice.last_sym=e):sym_link(i),i.st=curvoice.st,i.rbstart&&!curvoice.norepbra&&curvoice.st>0&&!(par_sy.staves[curvoice.st-1].flags&STOP_BAR)&&(e={type:C.BAR,fname:i.fname,istart:i.istart,iend:i.iend,bar_type:"[",multi:0,invis:!0,text:i.text,rbstart:2},sym_link(e),e.st=curvoice.st,delete i.text,i.rbstart=0)}function parse_staves(e){var t,n,r=[],i=!1,s=0,o=0,u=0,a=0,f=0,l=0;while(l<e.length){switch(e[l]){case" ":case" ":break;case"[":if(a||o+u>=2){syntax(1,errs.misplaced,"["),i=!0;break}s|=o+u==0?OPEN_BRACKET:OPEN_BRACKET2,u++,f<<=8,f|=OPEN_BRACKET;break;case"{":if(a||o||u>=2){syntax(1,errs.misplaced,"{"),i=!0;break}s|=u?OPEN_BRACE2:OPEN_BRACE,o++,f<<=8,f|=OPEN_BRACE;break;case"(":if(a){syntax(1,errs.misplaced,"("),i=!0;break}s|=OPEN_PARENTH,a++,f<<=8,f|=OPEN_PARENTH;break;case"*":o&&!a&&!(s&(OPEN_BRACE|OPEN_BRACE2))&&(s|=FL_VOICE);break;case"+":s|=MASTER_VOICE;break;default:if(!/\w/.test(e[l])){syntax(1,"Bad voice ID in %%staves"),i=!0;break}n="";while(l<e.length){if(" ()[]{}|*".indexOf(e[l])>=0)break;n+=e[l++]}for(;l<e.length;l++){switch(e[l]){case" ":case" ":continue;case"]":if(!(f&OPEN_BRACKET)){syntax(1,errs.misplaced,"]"),i=!0;break}u--,s|=o+u==0?CLOSE_BRACKET:CLOSE_BRACKET2,f>>=8;continue;case"}":if(!(f&OPEN_BRACE)){syntax(1,errs.misplaced,"}"),i=!0;break}o--,s|=u?CLOSE_BRACE2:CLOSE_BRACE,s&=~FL_VOICE,f>>=8;continue;case")":if(!(f&OPEN_PARENTH)){syntax(1,errs.misplaced,")"),i=!0;break}a--,s|=CLOSE_PARENTH,f>>=8;continue;case"|":s|=STOP_BAR;continue}break}r.push([n,s]),s=0;continue}l++}f!=0&&(syntax(1,"'}', ')' or ']' missing in %%staves"),i=!0);if(i||r.length==0)return;return r}function info_split(e){if(!e)return[];var t=e.match(/(".+?"|.+?)(\s+|=|$)/g);if(!t)return syntax(1,"Unterminated string"),[];for(var n=0;n<t.length;n++)t[n]=t[n].trim();return t}function identify_note(e,t){var n,r,i,r=0,s=t;s%12!=0&&syntax(1,"Invalid note duration $1",s),s/=12,s==0&&syntax(1,"Note too short");for(i=5;s!=0;s>>=1,i--)if(s&1)break;s>>=1;switch(s){case 0:break;case 1:r=1;break;case 3:r=2;break;case 7:r=3;break;default:syntax(1,"Invalid note duration $1",t),i+=(11-s)/4|0,r=4}i-=r;if(i>=0)n=C.FULL;else switch(i){default:syntax(1,"Note too long"),i=-4;case-4:n=C.SQUARE;break;case-3:n=cfmt.squarebreve?C.SQUARE:C.OVALBARS;break;case-2:n=C.OVAL;break;case-1:n=C.EMPTY}return[n,r,i]}function parse_dur(e){var t,n,r;return reg_dur.lastIndex=e.index,t=reg_dur.exec(e.buffer),t[0]?(n=t[1]||1,r=t[3]||1,t[3]||(r*=1<<t[2].length),e.index=reg_dur.lastIndex,[n,r]):[1,1]}function parse_acc_pit(e){var t,n,r,i,s,o,u=e.char();switch(u){case"^":u=e.next_char(),u=="^"?(n=2,u=e.next_char()):n=1;break;case"=":n=3,u=e.next_char();break;case"_":u=e.next_char(),u=="_"?(n=-2,u=e.next_char()):n=-1}if(n&&n!=3&&u>="1"&&u<="9"||u=="/")o=parse_dur(e),r=o[0],i=o[1],i==1?i=curvoice?curvoice.uscale:1:i*=2,u=e.char();s=ntb.indexOf(u)+16,u=e.next_char();if(s<16){syntax(1,"'$1' is not a note",e.buffer[e.index-1]);return}while(u=="'")s+=7,u=e.next_char();while(u==",")s-=7,u=e.next_char();return t={pit:s,shhd:0,shac:0,ti1:0},n&&(t.acc=n,r&&(t.micro_n=r,t.micro_d=i)),t}function note2abc(e){var t,n="abcdefg"[(e.pit+77)%7];e.acc&&(n=["__","_","","^","^^","="][e.acc+2]+n);for(t=e.pit;t>=30;t-=7)n+="'";for(t=e.pit;t<23;t+=7)n+=",";return n}function set_map(e){var t=maps[curvoice.map],n=note2abc(e);if(!t[n]){n="octave,"+n.replace(/[',]/g,"");if(!t[n]){n="key,"+"abcdefg"[(e.pit+77-curvoice.ckey.k_delta)%7];if(!t[n]){n="all";if(!t[n])return}}}e.map=t[n],e.map[1]&&(e.pit=e.map[1].pit,e.acc=e.map[1].acc)}function parse_basic_note(e,t){var n,r=parse_acc_pit(e);if(!r)return;return e.char()=="0"&&(parse.stemless=!0,e.index++),n=parse_dur(e),r.dur=t*n[0]/n[1],r}function parse_vpos(){var e,t=parse.line,n=0;t.buffer[t.index-1]=="."&&!a_dcn&&(n=C.SL_DOTTED);switch(t.next_char()){case"'":return t.index++,n+C.SL_ABOVE;case",":return t.index++,n+C.SL_BELOW}return n+C.SL_AUTO}function note_transp(e){var t,n,r,i,s,o,u,a,f,l,c=e.nhd,h=curvoice.okey.k_sf,p=curvoice.ckey.k_sf-h,d=cgd2cde[(p+28)%7],v=curvoice.vtransp;v<0&&d!=0&&(d-=7),d+=(v/3/12|0)*7;for(t=0;t<=c;t++){l=e.notes[t],r=l.pit,l.pit+=d,u=cde2fcg[(r+5+112)%7],s=l.acc;if(!s)if(!curvoice.okey.a_acc)h>0?u<h-1&&(s=1):h<0&&u>=h+6&&(s=-1);else for(n=0;n<curvoice.okey.a_acc.length;n++){o=curvoice.okey.a_acc[n];if((r+16*7-o.pit)%7==0){s=o.acc;break}}a=u+p,s&&s!=3&&(a+=s*7),u=(((a+1+21)/7|0)+2-3+160)%5,s=acc2[u];if(!l.acc)if(curvoice.ckey.k_none){if(s==3||acc_same_pitch(l.pit))continue}else{if(!curvoice.ckey.a_acc)continue;f=cgd2cde[(a+112)%7];for(n=0;n<curvoice.ckey.a_acc.length;n++)if((f+16*7-curvoice.ckey.a_acc[n].pits)%7==0)break;if(n<curvoice.ckey.a_acc.length)continue}u=l.acc,i=l.micro_d;if(i&&u!=s){r=l.micro_n;switch(s){case 3:r>i/2?(r-=i/2,l.micro_n=r,s=u):s=-u;break;case 2:r>i/2?(l.pit+=1,r-=i/2):r+=i/2,s=u,l.micro_n=r;break;case-2:r>=i/2?(l.pit-=1,r-=i/2):r+=i/2,s=u,l.micro_n=r}}l.acc=s}}function sort_pitch(e){e.notes=e.notes.sort(function(e,t){return e.pit-t.pit})}function new_note(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v=0,m=parse.line,g=a_dcn;a_dcn=null,parse.stemless=!1,r={type:C.NOTE,fname:parse.fname,stem:0,multi:0,nhd:0,xmx:0},r.istart=parse.bol+m.index,curvoice.color&&(r.color=curvoice.color),e?r.grace=!0:(a_gch&&self.gch_build(r),parse.repeat_n&&(r.repeat_n=parse.repeat_n,r.repeat_k=parse.repeat_k,parse.repeat_n=0)),s=m.char();switch(s){case"X":r.invis=!0;case"Z":r.type=C.MREST,s=m.next_char(),r.nmes=s>"0"&&s<="9"?m.get_int():1,r.dur=curvoice.wmeasure*r.nmes;if(curvoice.second){curvoice.time+=r.dur;return}r.nmes==1&&(r.type=C.REST,r.dur_orig=r.dur,r.notes=[{pit:18,dur:r.dur}]);break;case"y":r.type=C.SPACE,r.invis=!0,r.dur=0,s=m.next_char(),s>="0"&&s<="9"?r.width=m.get_int():r.width=10;break;case"x":r.invis=!0;case"z":r.type=C.REST,m.index++,c=parse_dur(m),r.dur_orig=(curvoice.ulen<0?15120:curvoice.ulen)*c[0]/c[1],r.dur=r.dur_orig*curvoice.dur_fact,r.notes=[{pit:18,dur:r.dur_orig}];break;case"[":i=!0,s=m.next_char();default:curvoice.uscale&&(r.uscale=curvoice.uscale),r.notes=[];for(;;){if(i)for(;;){if(!s)break;a=s.charCodeAt(0);if(a>=128){syntax(1,errs.not_ascii);return}u=char_tb[a];switch(u[0]){case"(":v<<=4,v+=parse_vpos(),s=m.char();continue;case"!":a_dcn||(a_dcn=[]);if(u.length>1)a_dcn.push(u.slice(1,-1));else{o="";for(;;){s=m.next_char();if(!s){syntax(1,"No end of decoration");return}if(s=="!")break;o+=s}a_dcn.push(o)}s=m.next_char();continue}break}n=parse_basic_note(m,r.grace?C.BLEN/4:curvoice.ulen<0?15120:curvoice.ulen);if(!n)return;curvoice.octave&&(n.pit+=curvoice.octave*7),curvoice.ottava&&(n.pit+=curvoice.ottava),v&&(n.sl1=v,r.sl1?r.sl1++:r.sl1=1,v=0),a_dcn&&(n.a_dcn=a_dcn,a_dcn=null),r.notes.push(n);if(!i)break;s=m.char();for(;;){switch(s){case")":n.sl2?n.sl2++:n.sl2=1,r.sl2?r.sl2++:r.sl2=1,s=m.next_char();continue;case"-":n.ti1=parse_vpos(),r.ti1=!0,s=m.char();continue;case".":s=m.next_char();if(s!="-"){syntax(1,"Misplaced dot");break}continue}break}if(s=="]"){m.index++,c=parse_dur(m),r.nhd=r.notes.length-1;for(a=0;a<=r.nhd;a++)n=r.notes[a],n.dur=n.dur*c[0]/c[1];break}}r.dur_orig=r.notes[0].dur,r.dur=r.notes[0].dur*curvoice.dur_fact}if(r.grace&&r.type!=C.NOTE){syntax(1,"Not a note in grace note sequence");return}if(r.notes){if(!r.grace){switch(curvoice.pos.stm){case C.SL_ABOVE:r.stem=1;break;case C.SL_BELOW:r.stem=-1;break;case C.SL_HIDDEN:r.stemless=!0}r.dur*=t,p=curvoice.brk_rhythm;if(p){curvoice.brk_rhythm=0,l=curvoice.last_note;if(p>0){f=p*2-1,r.dur=r.dur*f/p,r.dur_orig=r.dur_orig*f/p;for(a=0;a<=r.nhd;a++)r.notes[a].dur=r.notes[a].dur*f/p;l.dur/=p,l.dur_orig/=p;for(a=0;a<=l.nhd;a++)l.notes[a].dur/=p}else{p=-p,f=p*2-1,r.dur/=p,r.dur_orig/=p;for(a=0;a<=r.nhd;a++)r.notes[a].dur/=p;l.dur=l.dur*f/p,l.dur_orig=l.dur_orig*f/p;for(a=0;a<=l.nhd;a++)l.notes[a].dur=l.notes[a].dur*f/p}curvoice.time=l.time+l.dur,h=identify_note(l,l.dur_orig),l.head=h[0],l.dots=h[1],l.nflags=h[2],l.nflags<=-2?l.stemless=!0:delete l.stemless;for(l=l.next;l;l=l.next)l.time=curvoice.time}}else{var y=curvoice.ckey.k_bagpipe?8:4;for(a=0;a<=r.nhd;a++)r.notes[a].dur/=y;r.dur/=y,r.dur_orig/=y,e.stem&&(r.stem=e.stem)}r.type==C.NOTE?(h=identify_note(r,r.dur_orig),r.head=h[0],r.dots=h[1],r.nflags=h[2],r.nflags<=-2&&(r.stemless=!0)):(d=r.dur_orig,d==curvoice.wmeasure&&(d<C.BLEN*2?d=C.BLEN:d<C.BLEN*4?d=C.BLEN*2:d=C.BLEN*4),h=identify_note(r,d),r.head=h[0],r.dots=h[1],r.nflags=h[2]),curvoice.last_note=r}sym_link(r);if(r.type==C.NOTE){curvoice.vtransp&&note_transp(r);if(curvoice.map&&maps[curvoice.map])for(a=0;a<=r.nhd;a++)set_map(r.notes[a])}return cfmt.shiftunison&&(r.shiftunison=cfmt.shiftunison),e||(curvoice.lyric_restart||(curvoice.lyric_restart=r),curvoice.sym_restart||(curvoice.sym_restart=r)),g&&deco_cnv(g,r,r.prev),parse.stemless&&(r.stemless=!0),r.iend=parse.bol+m.index,r}function parse_music_line(){function h(e){var t,n,r;for(t=1,n=c.index+1;t<e.length;t++,n++){if(e[t]==c.buffer[n])continue;if(e[t]!="n")return;r=ntb.indexOf(c.buffer[n]);if(r<0)return;while(c.buffer[n+1]=="'")r+=7,n++;while(c.buffer[n+1]==",")r-=7,n++}return c.index=n,r}function p(e,t){var n,r,s="",o=e.length;for(i=0;i<o;i++){n=e[i];if(n>="h"&&n<="z"){r=t+n.charCodeAt(0)-"n".charCodeAt(0),n="";while(r<0)r+=7,n+=",";while(r>14)r-=7,n+="'";s+=ntb[r]+n}else s+=n}return s}function d(e,t){var n,r=c,i=parse.istart;parse.line=c=new scanBuf,parse.istart+=r.index,c.buffer=t?p(e,t):e,v(!0),parse.line=c=r,parse.istart=i}function v(i){var s,p,v,m,g,y,b,w,E;for(;;){s=c.char();if(!s)break;if(s==".")switch(c.buffer[c.index+1]){case"(":case"-":case"|":s=c.next_char()}p=s.charCodeAt(0);if(p>=128){syntax(1,errs.not_ascii),c.index++;break}if(!i&&maci[p]){w=0;for(m in mac){if(!mac.hasOwnProperty(m)||m[0]!=s)continue;if(m.indexOf("n")<0){if(c.buffer.indexOf(m,c.index)!=c.index)continue;c.index+=m.length}else{w=h(m);if(!w)continue}d(mac[m],w),w=1;break}if(w)continue}v=char_tb[p];switch(v[0]){case" ":g=curvoice.last_note,g&&(g.beam_end=!0,e&&(e.gr_shift=!0));break;case"\n":if(cfmt.barsperstaff)break;par_sy.voices[curvoice.v].range==0&&curvoice.last_sym&&(curvoice.last_sym.eoln=!0);break;case"&":if(e){syntax(1,errs.bad_char,s);break}s=c.next_char();if(s==")"){get_vover(")");break}get_vover("&");continue;case"(":s=c.next_char();if(s>"0"&&s<="9"){var S=c.get_int(),x=qplet_tb[S],T=S,s=c.char();if(s==":"){s=c.next_char(),s>"0"&&s<="9"&&(x=c.get_int(),s=c.char());if(s==":"){s=c.next_char();if(!(s>"0"&&s<="9")){syntax(1,"Invalid 'r' in tuplet");continue}T=c.get_int(),s=c.char()}}if(x==0||x==undefined)x=curvoice.wmeasure%9==0?3:2;u=o[++a],u||(o[a]=u={}),u.p=S,u.q=x,u.r=T,u.f=cfmt.tuplets,u.fact=f*x/S,f=u.fact;continue}if(s=="&"){if(e){syntax(1,errs.bad_char,s);break}get_vover("(");break}l<<=4,c.index--,l+=parse_vpos();continue;case")":if(curvoice.ignore)break;g=curvoice.last_sym;if(g)switch(g.type){case C.NOTE:case C.REST:case C.SPACE:break;default:g=null}if(!g){syntax(1,errs.bad_char,s);break}g.slur_end?g.slur_end++:g.slur_end=1;break;case"!":a_dcn||(a_dcn=[]);if(v.length>1)y=v.slice(1,-1);else{y="",b=c.index;for(;;){s=c.next_char();if(!s)break;if(s=="!")break;y+=s}if(!s){c.index=b,syntax(1,"No end of decoration");break}}ottava[y]&&set_ottava(y),a_dcn.push(y);break;case'"':parse_gchord(v);break;case"-":var N=0;if(!curvoice.last_note||curvoice.last_note.type!=C.NOTE){syntax(1,"No note before '-'");break}N=parse_vpos(),g=curvoice.last_note;for(b=0;b<=g.nhd;b++)g.notes[b].ti1?g.nhd==0&&syntax(1,"Too many ties"):g.notes[b].ti1=N;g.ti1=!0,e&&(e.ti1=!0);continue;case"[":var k=c.buffer[c.index+1];if('|[]: "'.indexOf(k)>=0||k>="1"&&k<="9"){if(e){syntax(1,errs.bar_grace);break}new_bar();continue}if(c.buffer[c.index+2]==":"){b=c.buffer.indexOf("]",c.index+1);if(b<0){syntax(1,"Lack of ']'");break}E=c.buffer.slice(c.index+3,b).trim(),parse.istart=parse.bol+c.index,parse.iend=parse.bol+ ++b,c.index=0,do_info(k,E),c.index=b;continue};case"n":g=self.new_note(e,f);if(!g)continue;g.type==C.NOTE&&l&&(g.slur_start=l,l=0);if(e){a>=0&&(g.in_tuplet=!0);continue}a>=0&&g.notes&&(g.in_tuplet=!0,a>0?(o[0].p&&(g.tp0=o[0].p,g.tq0=o[0].q,g.tf=o[0].f,o[0].p=0),o[0].r--,u.p&&(g.tp1=u.p,g.tq1=u.q,g.tf=u.f,u.p=0)):u.p&&(g.tp0=u.p,g.tq0=u.q,g.tf=u.f,u.p=0),u.r--,u.r==0&&(a--==0?(g.tp0?g.tp0=!1:g.te0=!0,f=1,curvoice.time=Math.round(curvoice.time),g.dur=curvoice.time-g.time):(g.tp1?g.tp1=!1:g.te1=!0,u=o[0],u.r==0?(a--,g.te0=!0,f=1,curvoice.time=Math.round(curvoice.time),g.dur=curvoice.time-g.time):f=u.fact)));continue;case"<":if(!curvoice.last_note){syntax(1,"No note before '<'");break}if(e){syntax(1,"Cannot have a broken rhythm in grace notes");break}w=s=="<"?1:-1;while(s=="<"||s==">")w*=2,s=c.next_char();curvoice.brk_rhythm=w;continue;case"i":break;case"{":if(e){syntax(1,"'{' in grace note");break}t=curvoice.last_note,curvoice.last_note=null,n=a_dcn,a_dcn=undefined,e={type:C.GRACE,fname:parse.fname,istart:parse.bol+c.index,dur:0,multi:0};switch(curvoice.pos.gst){case C.SL_ABOVE:e.stem=1;break;case C.SL_BELOW:e.stem=-1;break;case C.SL_HIDDEN:e.stem=2}sym_link(e),s=c.next_char();if(s=="/"){e.sappo=!0;break}continue;case"|":if(e){syntax(1,errs.bar_grace);break}s=c.buffer[c.index-1],new_bar(),s=="."&&(curvoice.last_sym.bar_dotted=!0);continue;case"}":g=curvoice.last_note;if(!e||!g){syntax(1,errs.bad_char,s);break}a_dcn&&syntax(1,"Decoration ignored"),g.gr_end=!0,e.extra=e.next,e.extra.prev=null,e.next=null,curvoice.last_sym=e,e=null;if(!g.prev&&!curvoice.ckey.k_bagpipe){for(b=0;b<=g.nhd;b++)g.notes[b].dur*=2;g.dur*=2,g.dur_orig*=2;var L=identify_note(g,g.dur_orig);g.head=L[0],g.dots=L[1],g.nflags=L[2]}curvoice.last_note=t,a_dcn=n;break;case"\\":s=c.buffer[c.index+1];if(!s){r=!0;break};default:syntax(1,errs.bad_char,s)}c.index++}}var e,t,n,r,s,o=[],u,a=-1,f=1,l=0,c=parse.line;if(parse.state!=3){if(parse.state!=2)return;goto_tune()}v();if(a>=0){syntax(1,"No end of tuplet");for(s=curvoice.last_note;s;s=s.prev){s.tp1&&(s.tp1=0);if(s.tp0){s.tp0=0;break}}}e&&(syntax(1,"No end of grace note sequence"),curvoice.last_sym=e.prev,curvoice.last_note=t,e.prev&&(e.prev.next=null)),cfmt.breakoneoln&&curvoice.last_note&&(curvoice.last_note.beam_end=!0);if(r||cfmt.barsperstaff)return;char_tb["\n".charCodeAt(0)]=="\n"&&par_sy.voices[curvoice.v].range==0&&curvoice.last_sym&&(curvoice.last_sym.eoln=!0)}function cwid(e){var t=e.charCodeAt(0);if(t>=128){if(t>=768&&t<880)return 0;t=97}return cw_tb[t]}function strwh(e){var t=gene.curfont,n=t.swfac,r=t.size,i=0,s,o,u,a=e.length;for(s=0;s<a;s++){u=e[s];switch(u){case"$":u=e[s+1];if(u=="0")t=gene.deffont;else{if(!(u>="1"&&u<="9")){u="$";break}t=get_font("u"+u)}s++,n=t.swfac,t.size>r&&(r=t.size);continue;case"&":o=e.indexOf(";",s),o>0&&o-s<10&&(s=o,u="a")}i+=cwid(u)*n}return gene.curfont=t,[i,r]}function set_font(e){typeof e=="string"&&(e=get_font(e)),gene.curfont=gene.deffont=e}function out_str(e){var t,n=gene.curfont,r=n;output+=e.replace(/<|>|&.*?;|&| |\$./g,function(e){switch(e[0]){case"<":return"&lt;";case">":return"&gt;";case"&":if(e=="&")return"&amp;";return e;case" ":return"  ";case"$":if(e[1]=="0")t=gene.deffont,use_font(t);else{if(!(e[1]>="1"&&e[1]<="9"))return e;t=get_font("u"+e[1])}e="";if(t==r)return e;r!=n&&(e="</tspan>"),r=t;if(r==n)return e;return e+'<tspan\n class="'+font_class(t)+'">'}}),r!=n&&(output+="</tspan>",gene.curfont=r)}function xy_str(e,t,n,r,i){var s=strwh(n)[1];t+=s*.2,output+='<text class="'+font_class(gene.curfont)+'" x="',out_sxsy(e,'" y="',t);switch(r){case"c":output+='" text-anchor="middle">';break;case"j":output+='" textLength="'+i.toFixed(2)+'">';break;case"r":output+='" text-anchor="end">';break;default:output+='">'}out_str(n),output+="</text>\n"}function xy_str_b(e,t,n){var r=strwh(n);output+='<rect class="stroke" x="',out_sxsy(e-2,'" y="',t+r[1]+1),output+='" width="'+(r[0]+4).toFixed(2)+'" height="'+(r[1]+3).toFixed(2)+'"/>\n',xy_str(e,t,n)}function trim_title(e,t){var n;if(cfmt.titletrim){n=e.lastIndexOf(", ");if(n<0||e[n+2]<"A"||e[n+2]>"Z")n=0;else if(cfmt.titletrim==1){if(n<e.length-7||e.indexOf(" ",n+3)>=0)n=0}else n<e.length-cfmt.titletrim-2&&(n=0)}return!t&&cfmt.writefields.indexOf("X")>=0&&(e=info.X+". "+e),n&&(e=e.slice(n+2).trim()+" "+e.slice(0,n)),cfmt.titlecaps?e.toUpperCase():e}function get_lwidth(){return(img.width-img.lm-img.rm-2)/cfmt.scale}function write_title(e,t){var n,r;if(!e)return;set_page(),e=trim_title(e,t),t?(set_font("subtitle"),r=cfmt.subtitlespace):(set_font("title"),r=cfmt.titlespace),vskip(strwh(e)[1]+r),cfmt.titleleft?xy_str(0,0,e):xy_str(get_lwidth()/2,0,e,"c")}function put_inf2r(e,t,n,r,i){if(!n){if(!r)return;n=r,r=null}r?xy_str(e,t,n+" ("+r+")",i):xy_str(e,t,n,i)}function str_skip(e){vskip(strwh(e)[1]*cfmt.lineskipfac)}function write_text(e,t){if(t=="s")return;set_font("text"),set_page();var n=get_lwidth(),r=gene.curfont.size,i=r*cfmt.lineskipfac,s=r*cfmt.parskipfac,o=block.started?function(){}:blk_out,u=block.started?svg_flush:blk_flush,a,f,l,c,h,p,d,v;o();switch(t){default:switch(t){case"c":l=n/2;break;case"r":l=n;break;default:l=0}f=0;for(;;){a=e.indexOf("\n",f);if(a<0){v=e.slice(f),str_skip(v),xy_str(l,0,v,t);break}if(a==f){vskip(s),u(),use_font(gene.curfont);while(e[a+1]=="\n")vskip(i),a++;if(a==e.length)break;o()}else v=e.slice(f,a),str_skip(v),xy_str(l,0,v,t);f=a+1}vskip(s),u();break;case"f":case"j":f=0;for(;;){a=e.indexOf("\n\n",f),a<0?c=e.slice(f):c=e.slice(f,a),c=c.split(/\s+/),h=p=0;for(f=0;f<c.length;f++)d=strwh(c[f]+" ")[0],h+=d,h>=n&&(v=c.slice(p,f).join(" "),str_skip(v),xy_str(0,0,v,t,n),p=f,h=d);h!=0&&(v=c.slice(p).join(" "),str_skip(v),xy_str(0,0,v)),vskip(s),u();if(a<0)break;while(e[a+2]=="\n")vskip(i),a++;if(a==e.length)break;o(),use_font(gene.curfont),f=a+2}}}function put_words(e){function f(e,t,n){var r=0,i,s;e[r]=="$"&&e[r+1]>="0"&&e[r+1]<="9"&&(r+=2),s=0,i=r;if(e[r]>="0"&&e[r]<="9"||e[r+1]=="."){while(r<e.length){r++;if(e[r]==" "||e[r-1]==":"||e[r-1]==".")break}s=r;while(e[r]==" ")r++}return s!=0&&xy_str(t,0,e.slice(i,s),"r"),r<e.length&&xy_str(t+5,0,e.slice(r),"l"),r>=e.length&&s==0}var t,n,r,i,s,o,u,a;blk_out(),set_font("words");var l=get_lwidth()/2,c=(l-45)/(cwid("a")*gene.curfont.swfac);i=0,e=e.split("\n"),s=e.length;for(n=0;n<s;n++){t=e[n];if(t.length>c){i=0;break}t?a=!0:a&&(i++,a=!1)}if(i>0){n=i=(i+1)/2|0,a=!1;for(u=0;u<s;u++){t=e[u],r=0;while(t[r]==" ")r++;if(r==t.length){if(a&&--n<=0)break;a=!1}else a=!0}o=u+1}else o=u=s;vskip(cfmt.wordsspace);for(n=0;n<u||o<s;n++)n<u&&e[n].length==0&&(blk_out(),use_font(gene.curfont)),vskip(cfmt.lineskipfac*gene.curfont.size),n<u&&f(e[n],45,0),o<s&&(f(e[o],20+l,1)&&--i==0&&(n<u?i++:o<e.length-1&&(l*=.6)),o++)}function put_history(){var e,t,n,r,i,s,o,u,a=cfmt.infoname.split("\n"),f=a.length;for(e=0;e<f;e++){n=a[e][0];if(cfmt.writefields.indexOf(n)<0)continue;r=info[n];if(!r)continue;i||(i=!0,set_font("history"),vskip(cfmt.textspace),s=gene.curfont.size*cfmt.lineskipfac),u=a[e].slice(2),u[0]=='"'&&(u=u.slice(1,-1)),vskip(s),xy_str(0,0,u),o=strwh(u)[0],r=r.split("\n"),xy_str(o,0,r[0]);for(t=1;t<r.length;t++)vskip(s),xy_str(o,0,r[t]);vskip(s*.3),blk_out(),use_font(gene.curfont)}}function write_headform(e){var t,n,r,i,s,o,u,a={},f=clone(info_font_init),l={A:cfmt.infospace,C:cfmt.composerspace,O:cfmt.composerspace,R:cfmt.infospace},c={},h="",p=cfmt.titleformat,d=0,v=0;for(;;){while(p[v]==" ")v++;if(v>=p.length)break;t=p[v++];if(t<"A"||t>"Z"){if(t=="+"){if(h.length==0||h.slice(-1)=="+")continue;h=h.slice(0,-1)+"+"}else t==","&&(h.slice(-1)=="+"&&(h=h.slice(0,-1)+"l"),h+="\n");continue}if(!a[t]){if(!info[t])continue;a[t]=info[t].split("\n"),c[t]=1}else c[t]++;h+=t;switch(p[v]){case"-":h+="l",v++;break;case"0":h+="c",v++;break;case"1":h+="r",v++;break;default:h+="c"}}h.slice(-1)=="+"&&(h=h.slice(0,-1)+"l"),h+="\n";var m={l:cfmt.titlespace,c:cfmt.titlespace,r:cfmt.titlespace},g={l:0,c:e*.5,r:e},y={},b;p=h,v=0;for(;;){y.l=y.c=y.r=o=0,d=v;for(;;){t=p[d++];if(t=="\n")break;i=p[d++];if(i=="+")i=p[d+1];else if(y[i]!=0)continue;b=a[t];if(!b)continue;r=f[t],r||(r="history"),n=get_font(r),u=n.size*1.1,l[t]&&(u+=l[t]),o<u&&(o=u),y[i]=u}m.l+=o-y.l,m.c+=o-y.c,m.r+=o-y.r;for(;;){t=p[v++];if(t=="\n")break;i=p[v++];if(a[t].length==0)continue;b=a[t].shift(),i=="+"&&(c[t]--,t=p[v++],i=p[v++],a[t].length>0&&(b?b+=" "+a[t].shift():b=" "+a[t].shift())),r=f[t],r||(r="history"),n=get_font(r),u=n.size*1.1,l[t]&&(u+=l[t]),set_font(n),s=g[i],o=m[i]+u;if(t=="Q"){if(!glovar.tempo.del){if(i!="l"){var w=tempo_width(glovar.tempo);i=="c"&&(w*=.5),s-=w}write_tempo(glovar.tempo,s,-o)}}else b&&xy_str(s,-o,b,i);t=="T"&&(r=f.T="subtitle",l.T=cfmt.subtitlespace);if(c[t]<=1){t=="T"&&(n=get_font(r),u=n.size*1.1,l[t]&&(u+=l[t]),set_font(n));while(a[t].length>0)o+=u,b=a[t].shift(),xy_str(s,-o,b,i)}c[t]--,m[i]=o}m.c>m.l&&(m.l=m.c),m.r>m.l&&(m.l=m.r);if(v>=h.length)break;m.c=m.r=m.l}vskip(m.l)}function write_heading(){var e,t,n,r,i,s,o,u,a=get_lwidth();blk_out(),vskip(cfmt.topspace);if(cfmt.titleformat){write_headform(a),vskip(cfmt.musicspace);return}if(info.T&&cfmt.writefields.indexOf("T")>=0){e=0;for(;;){t=info.T.indexOf("\n",e);if(t<0){write_title(info.T.substring(e),e!=0);break}write_title(info.T.slice(e,t),e!=0),e=t+1}}set_font("composer"),o=u=0,parse.ckey.k_bagpipe&&!cfmt.infoline&&cfmt.writefields.indexOf("R")>=0&&(s=info.R),s&&(xy_str(0,-cfmt.composerspace,s),o=cfmt.composerspace),n=info.A,cfmt.writefields.indexOf("C")>=0&&(r=info.C),cfmt.writefields.indexOf("O")>=0&&(i=info.O);if(r||i||cfmt.infoline){var f,l;vskip(cfmt.composerspace),cfmt.aligncomposer<0?(f=0,l=" "):cfmt.aligncomposer==0?(f=a*.5,l="c"):(f=a,l="r"),u=o;if(r||i){cfmt.aligncomposer>=0&&o!=u&&vskip(o-u),e=0;for(;;){vskip(gene.curfont.size),r?t=r.indexOf("\n",e):t=-1;if(t<0){put_inf2r(f,0,r?r.substring(e):null,i,l);break}xy_str(f,0,r.slice(e,t),l),o+=gene.curfont.size,e=t+1}u>o&&vskip(u-o)}s=s?null:info.R,(s||n)&&cfmt.infoline&&(set_font("info"),vskip(gene.curfont.size+cfmt.infospace),put_inf2r(a,0,s,n,"r"),o+=gene.curfont.size+cfmt.infospace)}else u=cfmt.composerspace;info.P&&cfmt.writefields.indexOf("P")>=0&&(set_font("parts"),o=cfmt.partsspace+gene.curfont.size-o,o>0&&(u+=o),u>.01&&vskip(u),xy_str(0,0,info.P),u=0),vskip(u+cfmt.musicspace)}function m_gl(e){return e.replace(/[Cco]\||[co]\.|./g,function(e){return mgls[e]})}function def_use(e){var t,n,r;if(defined_glyph[e])return;defined_glyph[e]=!0,r=glyphs[e];if(!r){error(1,null,"Unknown glyph: '$1'",e);return}n=0;for(;;){t=r.indexOf('xlink:href="#',n);if(t<0)break;t+=13,n=r.indexOf('"',t),def_use(r.slice(t,n))}defs+="\n"+r}function defs_add(e){var t,n,r,i,s,o=0;e=e.replace(/<!--.*?-->/g,"");for(;;){s=e.indexOf("<",o);if(s<0)break;t=e.indexOf('id="',s);if(t<0)break;t+=4,n=e.indexOf('"',t);if(n<0)break;r=e.slice(t,n),o=e.indexOf(">",n);if(o<0)break;if(e[o-1]=="/")o++;else{t=e.indexOf(" ",s);if(t<0)break;i=e.slice(s+1,t),o=e.indexOf("</"+i+">",o);if(o<0)break;o+=3+i.length}e.substr(s,7)=="<filter"?fulldefs+="\n"+e.slice(s,o):glyphs[r]=e.slice(s,o)}}function set_g(){stv_g.started&&(stv_g.started=!1,output+="</g>\n");if(stv_g.scale==1&&!stv_g.color)return;output+="<g ",stv_g.scale!=1&&(stv_g.st>=0?output+=staff_tb[stv_g.st].scale_str:output+=voice_tb[stv_g.v].scale_str),stv_g.color&&(stv_g.scale!=1&&(output+=" "),output+='style="color:'+stv_g.color+'"'),output+=">\n",stv_g.started=!0}function set_color(e){if(e==stv_g.color)return undefined;var t=stv_g.color;return stv_g.color=e,set_g(),t}function set_sscale(e){var t,n;e!=stv_g.st&&stv_g.scale!=1&&(stv_g.scale=0),t=e>=0?staff_tb[e].staffscale:1,e>=0&&t!=1?n=staff_tb[e].y:n=posy;if(t==stv_g.scale&&n==stv_g.dy)return;stv_g.scale=t,stv_g.dy=n,stv_g.st=e,set_g()}function set_scale(e){var t=e.p_v.scale;if(t==1){set_sscale(e.st);return}if(t==stv_g.scale&&stv_g.dy==posy)return;stv_g.scale=t,stv_g.dy=posy,stv_g.st=-1,stv_g.v=e.v,set_g()}function set_dscale(e,t){output&&(stv_g.st<0?staff_tb[0].output+=output:stv_g.scale==1?staff_tb[stv_g.st].output+=output:staff_tb[stv_g.st].sc_out+=output,output=""),e<0?stv_g.scale=1:stv_g.scale=t?1:staff_tb[e].staffscale,stv_g.st=e,stv_g.dy=0}function delayed_update(){var e,t,n;for(e=0;e<=nstaff;e++){staff_tb[e].sc_out&&(output+='<g transform="translate(0,'+(posy-staff_tb[e].y).toFixed(2)+") scale("+staff_tb[e].staffscale.toFixed(2)+')">\n'+staff_tb[e].sc_out+"</g>\n",staff_tb[e].sc_out="");if(!staff_tb[e].output)continue;output+='<g transform="translate(0,'+(-staff_tb[e].y).toFixed(2)+')">\n'+staff_tb[e].output+"</g>\n",staff_tb[e].output=""}}function anno_out(e,t,n){if(e.istart==undefined)return;var r=e.type,i=e.ymx-e.ymn+4,s=e.wl||2,o=e.wr||2;e.grace&&(r=C.GRACE),n(t||anno_type[r],e.istart,e.iend,e.x-s-2,staff_tb[e.st].y+e.ymn+i-2,s+o+4,i,e)}function a_start(e,t){anno_out(e,t,user.anno_start)}function a_stop(e,t){anno_out(e,t,user.anno_stop)}function empty_function(){}function out_XYAB(e,t,n,r,i){t=sx(t),n=sy(n),output+=e.replace(/X|Y|A|B|F|G/g,function(e){switch(e){case"X":return t.toFixed(2);case"Y":return n.toFixed(2);case"A":return r;case"B":return i;case"F":return r.toFixed(2);default:return i.toFixed(2)}})}function g_open(e,t,n,r,i){out_XYAB('<g transform="translate(X,Y',e,t),n&&(output+=") rotate("+n.toFixed(2)),r&&(i?output+=") scale("+r.toFixed(2)+", "+i.toFixed(2):output+=") scale("+r.toFixed(2)),output+=')">\n',stv_g.g++}function g_close(){stv_g.g--,output+="</g>\n"}function sx(e){return stv_g.g?e:(e+posx)/stv_g.scale}function sy(e){return stv_g.g?-e:stv_g.scale==1?posy-e:stv_g.st<0?(posy-e)/stv_g.scale:stv_g.dy-e}function out_sxsy(e,t,n){e=sx(e),n=sy(n),output+=e.toFixed(2)+t+n.toFixed(2)}function xypath(e,t,n){out_XYAB('<path class="A" d="mX Y\n',e,t,n?"fill":"stroke")}function xygl(e,t,n){var r=tgls[n];if(r&&!glyphs[n]){e+=r.x*stv_g.scale,t-=r.y,r.sc?out_XYAB('<text transform="translate(X,Y) scale(F)">B</text>\n',e,t,r.sc,r.c):out_XYAB('<text x="X" y="Y">A</text>\n',e,t,r.c);return}if(!glyphs[n]){error(1,null,"no definition of $1",n);return}def_use(n),out_XYAB('<use x="X" y="Y" xlink:href="#A"/>\n',e,t,n)}function out_acciac(e,t,n,r,i){i?(e-=1,t+=4):(e-=5,t-=4),out_XYAB('<path class="stroke" d="mX YlF G"/>\n',e,t,n,-r)}function out_bar(e,t,n,r){if(r){var i=(5*r).toFixed(2);r='stroke-dasharray="'+i+","+i+'" '}else r="";output+='<path class="stroke" stroke-width="1" '+r+'d="m'+(e+posx).toFixed(2)+" "+(posy-t).toFixed(2)+"v"+(-n).toFixed(2)+'"/>\n'}function out_bnum(e,t,n){out_XYAB('<text style="font:italic 12px serif"\n x="X" y="Y" text-anchor="middle">A</text>\n',e,t,n.toString())}function out_brace(e,t,n){e+=posx-6,t=posy-t,n/=24,output+='<text transform="translate('+e.toFixed(2)+","+t.toFixed(2)+") scale(2.5,"+n.toFixed(2)+')">'+tgls.brace.c+"</text>\n"}function out_bracket(e,t,n){e+=posx-5,t=posy-t-3,n+=2,output+='<path class="fill"\n d="m'+e.toFixed(2)+" "+t.toFixed(2)+"\n c10.5 1 12 -4.5 12 -3.5c0 1 -3.5 5.5 -8.5 5.5\n v"+n.toFixed(2)+'\n c5 0 8.5 4.5 8.5 5.5c0 1 -1.5 -4.5 -12 -3.5"/>\n'}function out_hyph(e,t,n){var r,i,s=25+(n/20|0)*3;n>15?r=(n-15)/s|0:r=0,e+=(n-s*r-5)/2,out_XYAB('<path class="stroke" stroke-width="1.2"\n stroke-dasharray="5,A"\n d="mX YhB"/>\n',e,t+6,Math.round((s-5)/stv_g.scale),s*r+5)}function out_stem(e,t,n,r,i,s){var o=r?GSTEM_XOFF:3.5,u=-n;n<0&&(o=-o),e+=o*stv_g.scale,stv_g.st<0&&(u/=stv_g.scale),out_XYAB('<path class="stroke" d="mX YvF"/>\n',e,t,u);if(!i)return;output+='<path class="fill"\n d="',t+=n;if(n>0)if(!s)if(!r)if(i==1)out_XYAB("MX Yc0.6 5.6 9.6 9 5.6 18.4\n 1.6 -6 -1.3 -11.6 -5.6 -12.8\n",e,t);else while(--i>=0)out_XYAB("MX Yc0.9 3.7 9.1 6.4 6 12.4\n 1 -5.4 -4.2 -8.4 -6 -8.4\n",e,t),t-=5.4;else if(i==1)out_XYAB("MX Yc0.6 3.4 5.6 3.8 3 10\n 1.2 -4.4 -1.4 -7 -3 -7\n",e,t);else while(--i>=0)out_XYAB("MX Yc1 3.2 5.6 2.8 3.2 8\n 1.4 -4.8 -2.4 -5.4 -3.2 -5.2\n",e,t),t-=3.5;else if(!r){t+=1;while(--i>=0)out_XYAB("MX Yl7 3.2 0 3.2 -7 -3.2z\n",e,t),t-=5.4}else while(--i>=0)out_XYAB("MX Yl3 1.5 0 2 -3 -1.5z\n",e,t),t-=3;else if(!s)if(!r)if(i==1)out_XYAB("MX Yc0.6 -5.6 9.6 -9 5.6 -18.4\n 1.6 6 -1.3 11.6 -5.6 12.8\n",e,t);else while(--i>=0)out_XYAB("MX Yc0.9 -3.7 9.1 -6.4 6 -12.4\n 1 5.4 -4.2 8.4 -6 8.4\n",e,t),t+=5.4;else if(i==1)out_XYAB("MX Yc0.6 -3.4 5.6 -3.8 3 -10\n 1.2 4.4 -1.4 7 -3 7\n",e,t);else while(--i>=0)out_XYAB("MX Yc1 -3.2 5.6 -2.8 3.2 -8\n 1.4 4.8 -2.4 5.4 -3.2 5.2\n",e,t),t+=3.5;else if(!r){t+=1;while(--i>=0)out_XYAB("MX Yl7 -3.2 0 -3.2 -7 3.2z\n",e,t),t+=5.4}output+='"/>\n'}function out_thbar(e,t,n){e+=posx+1.5,t=posy-t,output+='<path class="stroke" stroke-width="3" d="m'+e.toFixed(2)+" "+t.toFixed(2)+"v"+(-n).toFixed(2)+'"/>\n'}function out_trem(e,t,n){out_XYAB('<path class="fill" d="mX Y\n ',e-4.5,t);for(;;){output+="l9 -3v3l-9 3z";if(--n<=0)break;output+="m0 5.4"}output+='"/>\n'}function out_tubr(e,t,n,r,i){var s=i?-3:3;t+=s,n/=stv_g.scale,output+='<path class="stroke" d="m',out_sxsy(e," ",t),output+="v"+s.toFixed(2)+"l"+n.toFixed(2)+" "+(-r).toFixed(2)+"v"+(-s).toFixed(2)+'"/>\n'}function out_tubrn(e,t,n,r,i,s){var o=s.length*10,u=i?-3:3;out_XYAB('<text style="font:italic 12px serif"\n x="X" y="Y" text-anchor="middle">A</text>\n',e+n/2,t+r/2,s),n/=stv_g.scale,i||(t+=6),output+='<path class="stroke" d="m',out_sxsy(e," ",t),output+="v"+u.toFixed(2)+"m"+n.toFixed(2)+" "+(-r).toFixed(2)+"v"+(-u).toFixed(2)+'"/>\n'+'<path class="stroke" stroke-dasharray="'+((n-o)/2).toFixed(2)+" "+o.toFixed(2)+'" d="m',out_sxsy(e," ",t-u),output+="l"+n.toFixed(2)+" "+(-r).toFixed(2)+'"/>\n'}function out_wln(e,t,n){out_XYAB('<path class="stroke" stroke-width="0.8" d="mX YhF"/>\n',e,t+3,n)}function out_deco_str(e,t,n,r){var i,s,o=deco_str_style[n];if(!o){xygl(e,t,n);return}e+=o.dx,t+=o.dy,o.def||(style+="\n."+n+" {"+o.style+"}",o.def=!0),out_XYAB('<text x="X" y="Y" class="A"B>',e,t,n,o.anchor||""),set_font("annotation"),out_str(r),output+="</text>\n"}function out_arp(e,t,n){g_open(e,t,270),e=0,n=Math.ceil(n/6);while(--n>=0)xygl(e,6,"ltr"),e+=6;g_close()}function out_cresc(e,t,n,r){e+=n,n=-n,out_XYAB('<path class="stroke"\n d="mX YlA ',e,t+5,n),r.nost?output+="-2.2m0 -3.6l"+(-n).toFixed(2)+' -2.2"/>\n':output+="-4l"+(-n).toFixed(2)+' -4"/>\n'}function out_dim(e,t,n,r){out_XYAB('<path class="stroke"\n d="mX YlA ',e,t+5,n),r.noen?output+="-2.2m0 -3.6l"+(-n).toFixed(2)+' -2.2"/>\n':output+="-4l"+(-n).toFixed(2)+' -4"/>\n'}function out_ltr(e,t,n){t+=4,n=Math.ceil(n/6);while(--n>=0)xygl(e,t,"ltr"),e+=6}function out_8va(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">8<tspan dy="-4" style="font-size:10px">va</tspan></text>\n',e-8,t),e+=12,n-=12),t+=6,out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv6"/>\n',e+n,t)}function out_8vb(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">8<tspan dy="-4" style="font-size:10px">vb</tspan></text>\n',e-8,t),e+=4,n-=4),out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv-6"/>\n',e+n,t)}function out_15ma(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">15<tspan dy="-4" style="font-size:10px">ma</tspan></text>\n',e-10,t),e+=20,n-=20),t+=6,out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv6"/>\n',e+n,t)}function out_15mb(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">15<tspan dy="-4" style="font-size:10px">mb</tspan></text>\n',e-10,t),e+=7,n-=7),out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv-6"/>\n',e+n,t)}function out_deco_val(e,t,n,r,i){deco_val_tb[n]?deco_val_tb[n](e,t,r,i):error(1,null,"No function for decoration '$1'",n)}function out_glisq(e,t,n){var r=n.start,i=r.x,s=r.y+staff_tb[r.st].y,o=Math.atan2(s-t,e-i),u=o/Math.PI*180,a=(e-i)/Math.cos(o);g_open(i,s,u),i=r.s.dots?13+r.s.xmx:8,a=(a-i-6)/6|0,a<1&&(a=1);while(--a>=0)xygl(i,0,"ltr"),i+=6;g_close()}function out_gliss(e,t,n){var r=n.start,i=r.x,s=r.y+staff_tb[r.st].y,o=-Math.atan2(t-s,e-i),u=o/Math.PI*180,a=(e-i)/Math.cos(o);g_open(i,s,u),i=r.s.dots?13+r.s.xmx:8,a-=i+8,xypath(i,0),output+="l"+a.toFixed(2)+' 0" stroke-width="1"/>\n',g_close()}function out_deco_long(e,t,n){var r=n.dd.glyph;deco_l_tb[r]?deco_l_tb[r](e,t,n):error(1,null,"No function for decoration '$1'",r)}function vskip(e){posy+=e}function svg_flush(){if(multicol||!output||!user.img_out||posy==0)return;var e='<svg xmlns="http://www.w3.org/2000/svg" version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n color="black" class="music" stroke-width=".7"',t="";cfmt.bgcolor&&(e+=' style="background-color: '+cfmt.bgcolor+'"'),posy*=cfmt.scale,user.imagesize?e+="\n"+user.imagesize+' viewBox="0 0 '+img.width.toFixed(0)+" "+posy.toFixed(0)+'">\n':e+='\n width="'+img.width.toFixed(0)+'px" height="'+posy.toFixed(0)+'px">\n';if(style||font_style||musicfont)e+='<style type="text/css">'+style+font_style,musicfont&&(musicfont.indexOf("(")>0?e+='\n.music {font:24px music; fill:currentColor}\n@font-face {\n font-family:"music";\n src:'+musicfont+"}":e+="\n.music {font:24px "+musicfont+"; fill:currentColor}"),e+="\n</style>\n";defs+=fulldefs,defs&&(e+="<defs>"+defs+"\n</defs>\n"),cfmt.scale!=1&&(e+='<g class="g" transform="scale('+cfmt.scale.toFixed(2)+')">\n',t="</g>\n"),psvg&&psvg.ps_flush(!0),user.img_out(e+output+t+"</svg>"),output="",font_style="",cfmt.fullsvg?(defined_glyph={},defined_font={}):(musicfont="",style="",fulldefs=""),defs="",posy=0}function blk_out(){if(multicol||!user.img_out)return;blk_flush(),user.page_format&&!block.started&&(block.started=!0,block.newpage?(block.newpage=!1,user.img_out('<div class="nobrk newpage">')):user.img_out('<div class="nobrk">'))}function blk_flush(){svg_flush(),block.started&&(block.started=!1,user.img_out("</div>"))}function voice_filter(){var e,t,n;for(e in parse.voice_opts){if(!parse.voice_opts.hasOwnProperty(e))continue;t=new RegExp(e);if(t.test(curvoice.id)||t.test(curvoice.nm))for(n in parse.voice_opts[e])parse.voice_opts[e].hasOwnProperty(n)&&self.do_pscom(parse.voice_opts[e][n])}}function sym_link(e){e.fname||set_ref(e),curvoice.ignore||(parse.last_sym=e,e.prev=curvoice.last_sym,curvoice.last_sym?curvoice.last_sym.next=e:curvoice.sym=e,curvoice.last_sym=e),e.v=curvoice.v,e.p_v=curvoice,e.st=curvoice.cst,e.time=curvoice.time,e.dur&&!e.grace&&(curvoice.time+=e.dur),e.pos=curvoice.pos,curvoice.second&&(e.second=!0),curvoice.floating&&(e.floating=!0)}function sym_add(e,t){var n={type:t,dur:0},r,i=curvoice;return curvoice=e,sym_link(n),curvoice=i,r=n.prev,r||(r=n.next),r&&(n.fname=r.fname,n.istart=r.istart,n.iend=r.iend),n}function mrest_expand(e){var t,n,r,i=e.nmes,s=e.dur/i,o=e.a_dd;e.type=C.REST,e.dur=s,e.head=C.FULL,e.nflags=-2,r=e.next,t=e.p_v,t.last_sym=e,t.time=e.time+s,t.cst=e.st,n=e;while(--i>0)n=sym_add(t,C.BAR),n.bar_type="|",n=sym_add(t,C.REST),e.invis&&(n.invis=!0),n.dur=s,n.head=C.FULL,n.nflags=-2,t.time+=s;n.next=r,r&&(r.prev=n),n.a_dd=o}function sort_all(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d=voice_tb.length,v=[],m=[],g=-1;for(r=0;r<d;r++)v.push(voice_tb[r].sym);var y=1,b=cur_sy;for(;;){if(b&&y){p=b,b=null,a=-1,m=[];for(r=0;r<d;r++){if(!p.voices[r]){p.voices[r]={range:-1};continue}u=p.voices[r].range;if(u<0)continue;m[u]=r,a++}}o=i=1e6;for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r];if(!e||e.time>i)continue;s=w_tb[e.type],e.time<i?(i=e.time,o=s):s<o&&(o=s),e.type==C.MREST&&(e.nmes==1?mrest_expand(e):a>0&&(g=i))}if(o>127)break;if(i==g){l=0;for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r];if(!e||e.time!=i||w_tb[e.type]!=o)continue;if(e.type!=C.MREST){g=-1;break}if(l==0)l=e.nmes;else if(l!=e.nmes){g=-1;break}}if(g<0)for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r],e&&e.type==C.MREST&&mrest_expand(e)}}for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r];if(!e||e.time!=i||w_tb[e.type]!=o)continue;if(e.type==C.STAVES){b=e.sy;for(c=0;c<d;c++)if(m[c]==undefined)break;for(h=0;h<d;h++){if(!b.voices[h])continue;u=b.voices[h].range;if(u<0||p.voices[h].range>=0)continue;m[c++]=h}}y&&(y=0,e.seqst=!0),e.ts_prev=f,f?f.ts_next=e:tsfirst=e,f=e,v[r]=e.next}y=o}}function voice_adj(){function i(e){var t,n,r,i,s,o,u,i=e.dur,a=1;for(t=e;t;t=t.next){if(t.beam_end||!t.next)break;a++}if(a<=1){delete e.feathered_beam;return}n=t,s=i/2,u=i/(a-1),r=e.time;if(e.feathered_beam>0)for(t=e,o=a-1;t!=n;t=t.next,o--)i=(u*o|0)+s,t.dur=i,t.time=r,r+=i;else for(t=e,o=0;t!=n;t=t.next,o++)i=(u*o|0)+s,t.dur=i,t.time=r,r+=i;t.dur=t.time+t.dur-r,t.time=r}var e,t,n,r;t=glovar.tempo,t&&staves_found<=0&&(r=par_sy.top_voice,e=voice_tb[r],e.sym&&e.sym.type!=C.TEMPO&&(t=clone(t),t.v=r,t.p_v=e,t.st=e.st,t.time=0,t.next=e.sym,t.next&&(t.next.prev=t),e.sym=t));for(r=0;r<voice_tb.length;r++){e=voice_tb[r],e.ignore&&(e.ignore=!1);for(t=e.sym;t;t=t.next)if(t.time>=staves_found)break;for(;t;t=t.next){switch(t.type){case C.GRACE:t.next&&t.next.type==C.BAR&&t.time--;if(!cfmt.graceword)continue;for(n=t.next;n;n=n.next){switch(n.type){case C.SPACE:continue;case C.NOTE:if(!n.a_ly)break;t.a_ly=n.a_ly,n.a_ly=null}break}continue}t.feathered_beam&&i(t)}}}function dupl_voice(){var e,t,n,r,i,s,o,u,a=voice_tb.length;for(o=0;o<a;o++){e=voice_tb[o],t=e.clone;if(!t)continue;e.clone=null;for(n=e.sym;n;n=n.next)if(n.time>=staves_found)break;t.clef=clone(e.clef),curvoice=t;for(;n;n=n.next){if(n.type==C.STAVES)continue;r=clone(n);if(n.notes){r.notes=[];for(u=0;u<=n.nhd;u++)r.notes.push(clone(n.notes[u]))}sym_link(r),t.second?r.second=!0:delete r.second,t.floating?r.floating=!0:delete r.floating,delete r.a_ly,i=r.extra;if(!i)continue;s=clone(i),r.extra=s,r=s,r.v=t.v,r.p_v=t,r.st=t.st;for(i=i.next;i;i=i.next){s=clone(i);if(i.notes){s.notes=[];for(u=0;u<=i.nhd;u++)s.notes.push(clone(i.notes[u]))}r.next=s,s.prev=r,r=s,r.v=t.v,r.p_v=t,r.st=t.st}}}}function new_syst(e){var t,n,r={voices:[],staves:[],top_voice:0};if(e){cur_sy=par_sy=r;return}for(n=0;n<voice_tb.length;n++){t=par_sy.voices[n].st;var i=par_sy.staves[t],s=voice_tb[n];s.staffnonote!=undefined&&(i.staffnonote=s.staffnonote),s.staffscale&&(i.staffscale=s.staffscale),r.voices[n]=clone(par_sy.voices[n]),r.voices[n].range=-1,delete r.voices[n].second}for(t=0;t<par_sy.staves.length;t++)r.staves[t]=clone(par_sy.staves[t]),r.staves[t].flags=0;par_sy.next=r,par_sy=r}function set_bar_num(){var e,t,n,r,i,s,o=cur_sy.top_voice,u=voice_tb[o].meter.wmeasure,a=gene.nbar;for(e=tsfirst;;e=e.ts_next){if(!e)return;switch(e.type){case C.METER:u=e.wmeasure;case C.CLEF:case C.KEY:case C.STBRK:continue;case C.BAR:if(e.bar_num){gene.nbar=e.bar_num;break}e.text&&!cfmt.contbarnb&&(e.text[0]=="1"?a=gene.nbar:(gene.nbar=a,e.bar_num=gene.nbar))}break}r=e.time+u;if(e.time==0)for(t=e.ts_next;t;t=t.ts_next)if(t.type==C.BAR&&t.time){t.time<r&&(e=t,r=e.time+u);break}i=gene.nbar;for(;e;e=e.ts_next)switch(e.type){case C.METER:u=e.wmeasure,e.time<r&&(r=e.time+u);break;case C.MREST:i+=e.nmes-1;while(e.ts_next&&e.ts_next.type!=C.BAR)e=e.ts_next;break;case C.BAR:e.bar_num&&(i=e.bar_num);if(e.time<r){e.text&&e.text[0]=="1"&&(a=i,s=r-e.time);break}n=e.time,t=e;do{if(t.dur)break;if(t.type==C.BAR&&t.text)break;t=t.next}while(t&&t.time==n);i++;if(t&&t.type==C.BAR&&t.text)if(t.text[0]=="1")s=0,a=i;else{cfmt.contbarnb||(i=a);if(s){cfmt.contbarnb&&i--,r=n+s;break}}e.bar_num=i,r=n+u;while(e.ts_next&&!e.ts_next.seqst)e=e.ts_next}cfmt.measurenb<0&&(gene.nbar=i)}function get_map(e){if(!e)return;var t,n,r,i,s,o,u=info_split(e,2);if(u.length<3){syntax(1,"Not enough parameters in %%map");return}o=u[1];if(o.indexOf("octave,")==0||o.indexOf("key,")==0)o=o.replace(/[,']+$/m,"").toLowerCase(),o[0]=="k"&&(o=o.replace(/[_=^]+/,""));else if(o[0]=="*"||o.indexOf("all")==0)o="all";else{s=new scanBuf,s.buffer=u[1],n=parse_acc_pit(s);if(!n){syntax(1,"Bad note in %%map");return}o=note2abc(n)}r=maps[u[0]],r||(maps[u[0]]=r={}),i=r[o],i||(r[o]=i=[]);if(!u[2])return;t=2;if(u[2].indexOf("=")<0){u[2][0]!="*"&&(s=new scanBuf,s.buffer=u[2],i[1]=parse_acc_pit(s));if(!u[3])return;t++,u[3].indexOf("=")<0&&(i[0]=u[3].split(","),t++)}for(;t<u.length;t++)switch(u[t]){case"heads=":i[0]=u[++t].split(",");break;case"print=":if(cfmt.sound=="play")break;s=new scanBuf,s.buffer=u[++t],i[1]=parse_acc_pit(s);break;case"color=":i[2]=u[++t]}}function set_transp(){var e,t,n;if(curvoice.ckey.k_bagpipe||curvoice.ckey.k_drum)return;cfmt.transp&&curvoice.transp&&syntax(0,"Mix of old and new transposition syntaxes"),t=(cfmt.transp||0)+(curvoice.transp||0)+(curvoice.shift||0),n=curvoice.vtransp||0;if(t==n)return;curvoice.vtransp=t,e=curvoice.last_sym;if(!e){curvoice.key=clone(curvoice.okey),key_transp(curvoice.key),curvoice.ckey=clone(curvoice.key),curvoice.key.k_none&&(curvoice.key.k_sf=0);return}for(;;){if(e.type==C.KEY)break;if(!e.prev){e=curvoice.key;break}e=e.prev}key_transp(e),curvoice.ckey=clone(e),curvoice.key.k_none&&(e.k_sf=0)}function set_ottava(e){if(cfmt.sound)return;switch(e){case"15ma(":curvoice.ottava=-14;break;case"8va(":curvoice.ottava=-7;break;case"8vb(":curvoice.ottava=7;break;case"15mb(":curvoice.ottava=14;break;case"15ma)":case"8va)":case"8vb)":case"15mb)":curvoice.ottava=0}}function do_pscom(e){var t,n,r,i,s,o,u,a,f=!1;e.slice(-5)==" lock"&&(f=!0,e=e.slice(0,-5).trim()),i=e.match(/(\w|-)+/);if(!i)return;i=i[0],s=e.replace(i,"").trim();switch(i){case"center":if(parse.state>=2){r=new_block("text"),r.text=cnv_escape(s),r.opt="c";return}write_text(cnv_escape(s),"c");return;case"clef":parse.state>=2&&(parse.state==2&&goto_tune(),r=new_clef(s),r&&get_clef(r));return;case"deco":deco_add(s);return;case"linebreak":set_linebreak(s);return;case"map":get_map(s);return;case"maxsysstaffsep":if(parse.state==3){par_sy.voices[curvoice.v].maxsep=get_unit(s);return}break;case"multicol":generate();switch(s){case"start":blk_out(),multicol={posy:posy,maxy:posy,lmarg:cfmt.leftmargin,rmarg:cfmt.rightmargin,state:parse.state};break;case"new":if(!multicol){syntax(1,"%%multicol new without start");break}posy>multicol.maxy&&(multicol.maxy=posy),cfmt.leftmargin=multicol.lmarg,cfmt.rightmargin=multicol.rmarg,img.chg=!0,set_page(),posy=multicol.posy;break;case"end":if(!multicol){syntax(1,"%%multicol end without start");break}posy<multicol.maxy&&(posy=multicol.maxy),cfmt.leftmargin=multicol.lmarg,cfmt.rightmargin=multicol.rmarg,multicol=undefined,blk_flush(),img.chg=!0,set_page();break;default:syntax(1,"Unknown keyword '$1' in %%multicol",s)}return;case"musicfont":musicfont=s;return;case"ottava":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}o=parseInt(s);if(isNaN(o)||o<-2||o>2){syntax(1,errs.bad_val,"%%ottava");return}switch(curvoice.ottava){case 14:a="15mb)";break;case 7:a="8vb)";break;case-7:a="8va)";break;case-14:a="15ma)"}a&&(a_dcn||(a_dcn=[]),a_dcn.push(a),set_ottava(a));switch(o){case-2:a="15mb(";break;case-1:a="8vb(";break;case 0:return;case 1:a="8va(";break;case 2:a="15ma("}a_dcn||(a_dcn=[]),a_dcn.push(a),set_ottava(a);return;case"repbra":parse.state>=2&&(parse.state==2&&goto_tune(),curvoice.norepbra=!get_bool(s));return;case"repeat":if(parse.state!=3)return;if(!curvoice.last_sym){syntax(1,"%%repeat cannot start a tune");return}if(!s.length)o=1,u=1;else{a=s.split(/\s+/),o=parseInt(a[0]),u=parseInt(a[1]);if(isNaN(o)||o<1||curvoice.last_sym.type==C.BAR&&o>2){syntax(1,"Incorrect 1st value in %%repeat");return}if(isNaN(u))u=1;else if(u<1){syntax(1,"Incorrect 2nd value in %%repeat");return}}parse.repeat_n=curvoice.last_sym.type==C.BAR?o:-o,parse.repeat_k=u;return;case"sep":var l,c,h,p;set_page(),p=img.width-img.lm-img.rm,t=l=c=0,s&&(h=s.split(/\s+/),t=get_unit(h[0]),h[1]&&(l=get_unit(h[1]),h[2]&&(c=get_unit(h[2])))),t<1&&(t=14),l<1&&(l=t),c<1&&(c=90);if(parse.state>=2){r=new_block(i),r.x=(p-c)/2/cfmt.scale,r.l=c/cfmt.scale,r.sk1=t,r.sk2=l;return}blk_out(),vskip(t),output+='<path class="stroke"\n d="M',out_sxsy((p-c)/2/cfmt.scale," ",0),output+="h"+(c/cfmt.scale).toFixed(2)+'"/>\n',vskip(l),blk_flush();return;case"setbarnb":n=parseInt(s),isNaN(n)?syntax(1,"Bad %%setbarnb value"):parse.state>=2?glovar.new_nbar=n:cfmt.measurefirst=n;return;case"staff":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}n=parseInt(s);if(isNaN(n)){syntax(1,"Bad %%staff value '$1'",s);return}var d;s[0]=="+"||s[0]=="-"?d=curvoice.cst+n:d=n-1;if(d<0||d>nstaff){syntax(1,"Bad %%staff number $1 (cur $2, max $3)",d,curvoice.cst,nstaff);return}delete curvoice.floating,curvoice.cst=d;return;case"staffbreak":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}r={type:C.STBRK,dur:0},s[0]>="0"&&s[0]<="9"?(r.xmx=get_unit(s),s.slice(-1)=="f"&&(r.stbrk_forced=!0)):(r.xmx=14,s[0]=="f"&&(r.stbrk_forced=!0)),sym_link(r);return;case"stafflines":case"staffscale":case"staffnonote":self.set_v_param(i,s);return;case"staves":case"score":if(parse.state==0)return;get_staves(i,s);return;case"sysstaffsep":if(parse.state==3){par_sy.voices[curvoice.v].sep=get_unit(s);return}break;case"text":if(parse.state>=2){r=new_block(i),r.text=cnv_escape(s),r.opt=cfmt.textoption;return}write_text(cnv_escape(s),cfmt.textoption);return;case"transpose":if(cfmt.sound)return;switch(parse.state){case 0:cfmt.transp=0;case 1:case 2:cfmt.transp=(cfmt.transp||0)+get_transp(s);return}for(r=curvoice.last_sym;r;r=r.prev){switch(r.type){case C.NOTE:r=clone(curvoice.okey),r.k_old_sf=curvoice.ckey.k_sf,sym_link(r);break;case C.KEY:break;default:continue}break}do_info("V",curvoice.id+" shift="+s);return;case"tune":return;case"user":set_user(s);return;case"voicecolor":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}curvoice.color=s;return;case"vskip":n=get_unit(s);if(n<0){syntax(1,"%%vskip cannot be negative");return}if(parse.state>=2){r=new_block(i),r.sk=n;return}vskip(n);return;case"newpage":case"leftmargin":case"rightmargin":case"pagescale":case"pagewidth":case"printmargin":case"scale":case"staffwidth":if(parse.state==3){r=new_block(i),r.param=s;return}if(i=="newpage"){blk_flush(),block.newpage=!0;return}}self.set_format(i,s,f)}function do_begin_end(e,t,n){var r,i,s,o;switch(e){case"js":js_inject(n);break;case"ml":parse.state>=2?(o=new_block(e),o.text=n):(svg_flush(),user.img_out(n));break;case"svg":i=0;for(;;){r=n.indexOf('<style type="text/css">\n',i);if(r<0)break;i=n.indexOf("</style>",r);if(i<0){syntax(1,"No </style> in %%beginsvg sequence");break}style+=n.slice(r+23,i).replace(/\s+$/,"")}i=0;for(;;){r=n.indexOf("<defs>\n",i);if(r<0)break;i=n.indexOf("</defs>",r);if(i<0){syntax(1,"No </defs> in %%beginsvg sequence");break}defs_add(n.slice(r+6,i))}break;case"text":s=get_textopt(t),s||(s=cfmt.textoption);if(parse.state>=2){o=new_block(e),o.text=cnv_escape(n),o.opt=s;break}write_text(cnv_escape(n),s)}}function generate(){var e,t;vover&&(syntax(1,"No end of voice overlay"),get_vover(vover.bar?"|":")"));if(voice_tb.length==0)return;voice_adj(),dupl_voice(),sort_all();if(!tsfirst)return;self.set_bar_num();if(!tsfirst)return;user.get_abcmodel&&user.get_abcmodel(tsfirst,voice_tb,anno_type,info),user.img_out&&self.output_music();for(e=0;e<voice_tb.length;e++)t=voice_tb[e],t.time=0,t.sym=t.last_sym=null,t.st=cur_sy.voices[e].st,t.second=cur_sy.voices[e].second,delete t.have_ly,t.hy_st=0,delete t.bar_start,delete t.slur_st,delete t.s_tie,delete t.s_rtie;staves_found=0}function key_transp(e){var t=curvoice.vtransp/3|0,n=(t&-2)+(t&1)*7+e.k_sf;switch((curvoice.vtransp+210)%3){case 1:n=(n+4+48)%12-4;break;case 2:n=(n+7+48)%12-7;break;default:n=(n+5+48)%12-5}e.k_sf=n,e.k_delta=cgd2cde[(n+7)%7]}function set_k_acc(e){var t,n,r,i,s,o=[],u=[],a=[],f=[];if(e.k_sf>0)for(i=0;i<e.k_sf;i++)o[i]=1,u[i]=[26,23,27,24,21,25,22][i];else for(i=0;i<-e.k_sf;i++)o[i]=-1,u[i]=[22,25,21,24,20,23,26][i];r=e.k_a_acc.length;for(t=0;t<r;t++){s=e.k_a_acc[t];for(n=0;n<i;n++)if(u[n]==s.pit){o[n]=s.acc,s.micro_n&&(a[n]=s.micro_n,f[n]=s.micro_d);break}n==i&&(o[n]=s.acc,u[n]=s.pit,s.micro_n&&(a[n]=s.micro_n,f[n]=s.micro_d),i++)}for(t=0;t<i;t++)s=e.k_a_acc[t],s||(s=e.k_a_acc[t]={}),s.acc=o[t],s.pit=u[t],a[t]?(s.micro_n=a[t],s.micro_d=f[t]):(delete s.micro_n,delete s.micro_d)}function acc_same_pitch(e){var t,n,r=curvoice.last_sym.prev;if(!r)return;n=r.time;for(;r;r=r.prev)switch(r.type){case C.BAR:if(r.time<n)return;for(;;){r=r.prev;if(!r)return;if(r.type==C.NOTE){if(r.time+r.dur==n)break;return}if(r.time<n)return}for(t=0;t<=r.nhd;t++)if(r.notes[t].pit==e&&r.notes[t].ti1)return r.notes[t].acc;return;case C.NOTE:for(t=0;t<=r.nhd;t++)if(r.notes[t].pit==e)return r.notes[t].acc}return}function get_staves(e,t){var n,r,i,s,o,u,a,f,l,c=parse_staves(t);if(!c)return;voice_tb.length!=0&&(voice_adj(),dupl_voice());var h=0,p=!0;for(u=0;u<voice_tb.length;u++)r=voice_tb[u],r.time>h&&(h=r.time),r.sym&&(p=!1);if(p||h==0&&staves_found<0)for(u=0;u<par_sy.voices.length;u++)par_sy.voices[u].range=-1;else{for(u=0;u<par_sy.voices.length;u++)if(par_sy.voices[u].range>=0){curvoice=voice_tb[u];break}curvoice.time=h,n={type:C.STAVES,dur:0},sym_link(n),par_sy.nstaff=nstaff,new_syst(),n.sy=par_sy}staves_found=h;for(u=0;u<voice_tb.length;u++)r=voice_tb[u],delete r.second,delete r.ignore,delete r.floating;l=0;for(s=0;s<c.length;s++){a=c[s][0],r=new_voice(a),r.time=h,u=r.v,s==0&&(par_sy.top_voice=r.v);if(par_sy.voices[u].range>=0){i=clone(r),par_sy.voices[voice_tb.length]=clone(par_sy.voices[u]),u=voice_tb.length,i.v=u,i.sym=i.last_sym=null,i.time=h,voice_tb.push(i),delete i.clone;while(r.clone)r=r.clone;r.clone=i,r=i}c[s][0]=r,par_sy.voices[u].range=l++}if(e[1]=="t")for(s=0;s<c.length;s++){o=c[s][1];if(!(o&(OPEN_BRACE|OPEN_BRACE2)))continue;if((o&(OPEN_BRACE|CLOSE_BRACE))==(OPEN_BRACE|CLOSE_BRACE)||(o&(OPEN_BRACE2|CLOSE_BRACE2))==(OPEN_BRACE2|CLOSE_BRACE2))continue;if(c[s+1][1]!=0)continue;if(o&OPEN_PARENTH||c[s+2][1]&OPEN_PARENTH)continue;c[s+2][1]&(CLOSE_BRACE|CLOSE_BRACE2)?c[s+1][1]|=FL_VOICE:c[s+2][1]==0&&c[s+3][1]&(CLOSE_BRACE|CLOSE_BRACE2)&&(c[s][1]|=OPEN_PARENTH,c[s+1][1]|=CLOSE_PARENTH,c[s+2][1]|=OPEN_PARENTH,c[s+3][1]|=CLOSE_PARENTH)}f=-1;for(s=0;s<c.length;s++){o=c[s][1],(o&(OPEN_PARENTH|CLOSE_PARENTH))==(OPEN_PARENTH|CLOSE_PARENTH)&&(o&=~(OPEN_PARENTH|CLOSE_PARENTH),c[s][1]=o),r=c[s][0],o&FL_VOICE?(r.floating=!0,r.second=!0):(f++,par_sy.staves[f]||(par_sy.staves[f]={stafflines:"|||||",staffscale:1}),par_sy.staves[f].flags=0),u=r.v,r.st=r.cst=par_sy.voices[u].st=f,par_sy.staves[f].flags|=o;if(o&OPEN_PARENTH){i=r;while(s<c.length-1){r=c[++s][0],u=r.v,c[s][1]&MASTER_VOICE?(i.second=!0,i=r):r.second=!0,r.st=r.cst=par_sy.voices[u].st=f;if(c[s][1]&CLOSE_PARENTH)break}par_sy.staves[f].flags|=c[s][1]}}f<0&&(f=0),par_sy.nstaff=nstaff=f;if(e[1]=="c")for(f=0;f<nstaff;f++)par_sy.staves[f].flags^=STOP_BAR;for(u=0;u<voice_tb.length;u++){r=voice_tb[u];if(par_sy.voices[u].range<0){r.ignore=!0;continue}par_sy.voices[u].second=r.second,f=r.st,f>0&&!r.norepbra&&!(par_sy.staves[f-1].flags&STOP_BAR)&&(r.norepbra=!0)}curvoice=parse.state>=2?voice_tb[par_sy.top_voice]:null}function get_vover(e){function l(e){var t,n;for(t=0;t<voice_tb.length;t++){n=voice_tb[t];if(n.id==e)return n}return n=clone(curvoice),n.v=voice_tb.length,n.id=e,n.sym=n.last_sym=null,delete n.nm,delete n.snm,delete n.new_name,delete n.lyric_restart,delete n.lyric_cont,delete n.ly_a_h,delete n.sym_restart,delete n.sym_cont,delete n.have_ly,voice_tb.push(n),n}var t,n,r,i,s,o,u,a,f=parse.line;if(curvoice.ignore)return;if(e=="|"||e==")"){if(!curvoice.last_note){syntax(1,errs.nonote_vo);return}curvoice.last_note.beam_end=!0;if(!vover){syntax(1,"Erroneous end of voice overlay");return}curvoice.time!=vover.p_voice.time&&(syntax(1,"Wrong duration in voice overlay"),curvoice.time>vover.p_voice.time&&(vover.p_voice.time=curvoice.time)),curvoice=vover.p_voice,vover=null;return}if(e=="("){if(vover){syntax(1,"Voice overlay already started");return}vover={p_voice:curvoice,time:curvoice.time};return}if(!curvoice.last_note){syntax(1,errs.nonote_vo);return}curvoice.last_note.beam_end=!0,t=curvoice.voice_down;if(!t){t=l(curvoice.id+"o"),curvoice.voice_down=t,t.time=0,t.second=!0,u=t.v,par_sy.voices[u]={st:curvoice.st,second:!0};var c=curvoice.clone!=undefined?1:0;r=par_sy.voices[curvoice.v].range;for(o=0;o<par_sy.voices.length;o++)par_sy.voices[o].range>r&&(par_sy.voices[o].range+=c+1);par_sy.voices[u].range=r+1,c&&(n=l(t.id+"c"),n.second=!0,a=n.v,par_sy.voices[a]={second:!0,range:r+2},t.clone=n)}t.ulen=curvoice.ulen,t.dur_fact=curvoice.dur_fact,curvoice.uscale&&(t.uscale=curvoice.uscale);if(!vover){vover={bar:!0,p_voice:curvoice},s=t.time;for(i=curvoice.last_sym;;i=i.prev)if(i.type==C.BAR||i.time<=s)break;vover.time=i.time}else curvoice!=vover.p_voice&&curvoice.time!=vover.p_voice.time&&(syntax(1,"Wrong duration in voice overlay"),curvoice.time>vover.p_voice.time&&(vover.p_voice.time=curvoice.time));t.time=vover.time,curvoice=t}function is_voice_sig(){var e;if(!curvoice.sym)return!0;if(curvoice.time!=0)return!1;for(e=curvoice.last_sym;e;e=e.prev)if(w_tb[e.type]!=0)return!1;return!0}function get_clef(e){var t,n;if(is_voice_sig()){curvoice.clef=e;return}for(t=curvoice.last_sym;t&&t.prev&&t.time==curvoice.time;t=t.prev)if(w_tb[t.type]!=0)break;if(t&&t.prev&&t.time==curvoice.time&&(t.type==C.KEY&&!t.k_none||t.type==C.BAR)){for(n=t;n.prev;n=n.prev){switch(n.prev.type){case C.KEY:case C.BAR:continue}break}t=curvoice.last_sym,curvoice.last_sym=n.prev,sym_link(e),e.next=n,n.prev=e,curvoice.last_sym=t}else sym_link(e);e.clef_small=!0}function get_key(e){var t,n,r,i,s=new_key(e),o=s[0];s=s[1],o.k_sf&&!o.k_exp&&o.k_a_acc&&set_k_acc(o);switch(parse.state){case 1:o.k_sf==undefined&&!o.k_a_acc&&(o.k_sf=0,o.k_none=!0);for(t=0;t<voice_tb.length;t++)n=voice_tb[t],n.key=clone(o),n.okey=clone(o),n.ckey=clone(o);parse.ckey=o,s.length!=0&&memo_kv_parm("*",s),glovar.ulen||(glovar.ulen=C.BLEN/8),parse.state=2,set_page(),write_heading(),reset_gen(),gene.nbar=cfmt.measurefirst;return;case 2:goto_tune(!0)}s.length!=0&&set_kv_parm(s),!curvoice.ckey.k_bagpipe&&!curvoice.ckey.k_drum&&(i=(cfmt.transp||0)+(curvoice.transp||0)+(curvoice.shift||0));if(o.k_sf==undefined){if(!o.k_a_acc&&!i)return;o.k_sf=curvoice.okey.k_sf}curvoice.okey=clone(o),i&&(curvoice.vtransp=i,key_transp(o)),o.k_old_sf=curvoice.ckey.k_sf,curvoice.ckey=o;if(is_voice_sig()){curvoice.key=clone(o),o.k_none&&(curvoice.key.k_sf=0);return}r=curvoice.last_sym,r&&r.type==C.METER?(curvoice.last_sym=r.prev,curvoice.last_sym||(curvoice.sym=null),sym_link(o),o.next=r,r.prev=o,curvoice.last_sym=r):sym_link(o)}function new_voice(e){var t,n,r,i=voice_tb.length;if(i==1&&voice_tb[0].default){delete voice_tb[0].default;if(voice_tb[0].time==0)return t=voice_tb[0],t.id=e,cfmt.transp&&parse.state>=2&&(r=curvoice,curvoice=t,set_transp(),curvoice=r),t}for(n=0;n<i;n++){t=voice_tb[n];if(t.id==e)return t}return t={v:n,id:e,time:0,"new":!0,pos:{dyn:0,gch:0,gst:0,orn:0,stm:0,voc:0,vol:0},scale:1,ulen:glovar.ulen,dur_fact:1,key:clone(parse.ckey),ckey:clone(parse.ckey),okey:clone(parse.ckey),meter:clone(glovar.meter),wmeasure:glovar.meter.wmeasure,clef:{type:C.CLEF,clef_auto:!0,clef_type:"a",time:0},hy_st:0},voice_tb.push(t),par_sy.voices[n]={range:-1},t}function init_tune(){nstaff=-1,voice_tb=[],curvoice=null,new_syst(!0),staves_found=-1,gene={},a_de=[],od={}}function do_cloning(e){var t,n,r=parse.file,i=parse.eol+1,s=i;for(;;){n=r.indexOf("\n",s);if(n<0){n=0;break}if(/%.*|\n.*|.:.|\[.:/.test(r.slice(n+1,n+4)))break;s=n+1}include++,tosvg(parse.fname,r,i,n);for(t=0;t<e.length;t++)get_voice(e[t]),tosvg(parse.fname,r,i,n);include--}function get_voice(e){var t,n,r,i,s=info_split(e,1),o=s.shift();if(!o)return;o.indexOf(",")>0&&(i=o.split(","),o=i.shift());if(parse.state<2){s.length!=0&&memo_kv_parm(o,s),o!="*"&&parse.state==1&&new_voice(o);return}if(o=="*"){syntax(1,"Cannot have V:* in tune body");return}curvoice=new_voice(o),set_kv_parm(s),parse.state==2&&goto_tune(),set_transp(),t=curvoice.v,curvoice.new&&(delete curvoice.new,staves_found<0&&(curvoice.st=curvoice.cst=++nstaff,par_sy.nstaff=nstaff,par_sy.voices[t].st=nstaff,par_sy.voices[t].range=t,par_sy.staves[nstaff]={stafflines:curvoice.stafflines||"|||||",staffscale:1}),par_sy.voices[t].range<0&&staves_found>=0&&(curvoice.ignore=!0)),!curvoice.filtered&&!curvoice.ignore&&parse.voice_opts&&(curvoice.filtered=!0,voice_filter()),i&&do_cloning(i)}function goto_tune(e){var t,n,r={type:C.STAVES,dur:0,sy:par_sy};parse.state=3,voice_tb.length==0?(get_voice("1"),curvoice.clef.istart=curvoice.key.istart,curvoice.clef.iend=curvoice.key.iend,curvoice.default=!0):curvoice||(curvoice=voice_tb[staves_found<0?0:par_sy.top_voice]),!curvoice.init&&!e&&(set_kv_parm([]),set_transp());for(t=0;t<voice_tb.length;t++)n=voice_tb[t],n.ulen=glovar.ulen,n.ckey.k_bagpipe&&!n.pos.stm&&(n.pos=clone(n.pos),n.pos.stm=C.SL_BELOW);if(staves_found<0){nstaff=voice_tb.length-1;for(t=0;t<=nstaff;t++)n=voice_tb[t],delete n.new,n.st=n.cst=par_sy.voices[t].st=par_sy.voices[t].range=t,par_sy.staves[t]={stafflines:n.stafflines||"|||||",staffscale:1};par_sy.nstaff=nstaff}n=curvoice,curvoice=voice_tb[par_sy.top_voice],sym_link(r),curvoice=n}function get_sym(e,t){var n,r,i,s,o;if(curvoice.ignore)return;if(t){n=curvoice.sym_cont;if(!n){syntax(1,"+: symbol line without music");return}}else{curvoice.sym_restart?(curvoice.sym_start=n=curvoice.sym_restart,curvoice.sym_restart=null):n=curvoice.sym_start,n||(n=curvoice.sym);if(!n){syntax(1,"s: without music");return}}i=0;for(;;){while(e[i]==" "||e[i]==" ")i++;r=e[i];if(!r)break;switch(r){case"|":while(n&&n.type!=C.BAR)n=n.next;if(!n){syntax(1,"Not enough measure bars for symbol line");return}n=n.next,i++;continue;case"!":case'"':s=++i,i=e.indexOf(r,s);if(i<0){syntax(1,r=="!"?"No end of decoration":"No end of guitar chord"),i=e.length;continue}o=e.slice(s-1,i+1);break;case"*":break;default:o=r.charCodeAt(0);if(o<128){o=char_tb[o];if(o.length>1&&(o[0]=="!"||o[0]=='"')){r=o[0];break}}syntax(1,errs.bad_char,r)}while(n&&(n.type!=C.NOTE||n.grace))n=n.next;if(!n){syntax(1,"Too many elements in symbol line");return}switch(r){default:break;case"!":deco_cnv([o.slice(1,-1)],n,n.prev);break;case'"':a_gch=n.a_gch,parse_gchord(o),a_gch&&self.gch_build(n)}n=n.next,i++}curvoice.lyric_cont=n}function get_lyrics(e,t){var n,r,i,s,o,u;if(curvoice.ignore)return;curvoice.pos.voc!=C.SL_HIDDEN&&(curvoice.have_ly=!0);if(t){n=curvoice.lyric_cont;if(!n){syntax(1,"+: lyric without music");return}}else{set_font("vocal"),curvoice.lyric_restart?(curvoice.lyric_start=n=curvoice.lyric_restart,curvoice.lyric_restart=null,curvoice.lyric_line=0):(curvoice.lyric_line++,n=curvoice.lyric_start),n||(n=curvoice.sym);if(!n){syntax(1,"w: without music");return}}i=e,s=0;for(;;){while(i[s]==" "||i[s]==" ")s++;if(!i[s])break;o=parse.istart+s+2;switch(i[s]){case"|":while(n&&n.type!=C.BAR)n=n.next;if(!n){syntax(1,"Not enough measure bars for lyric line");return}n=n.next,s++;continue;case"-":r="-\n";break;case"_":r="_\n";break;case"*":r="";break;default:if(i[s]=="\\"&&s==i.length-1){curvoice.lyric_cont=n;return}r="";for(;;){if(!i[s])break;switch(i[s]){case"_":case"*":case"|":s--;case" ":case" ":break;case"~":r+=" ",s++;continue;case"-":r+="\n";break;case"\\":r+=i[++s],s++;continue;default:r+=i[s++];continue}break}}while(n&&(n.type!=C.NOTE||n.grace))n=n.next;if(!n){syntax(1,"Too many words in lyric line");return}r&&n.pos.voc!=C.SL_HIDDEN&&(r.match(/^\$\d/)&&(r[1]=="0"?set_font("vocal"):set_font("u"+r[1]),r=r.slice(2)),u={t:r,font:gene.curfont,w:strwh(r)[0],istart:o,iend:o+r.length},n.a_ly||(n.a_ly=[]),n.a_ly[curvoice.lyric_line]=u),n=n.next,s++}curvoice.lyric_cont=n}function ly_width(e,t){var n,r,i,s,o,u,a,f,l,c,h,p=e.a_ly;s=0;for(a=0;a<p.length;a++){n=p[a];if(!n)continue;h=n.t;if(h=="-\n"||h=="_\n"){n.shift=0;continue}u=n.w,i=n.font.swfac,o=u+2*cwid(" ")*i,e.type==C.GRACE?c=e.wl:h[0]>="0"&&h[0]<="9"&&h.length>2||h[1]==":"||h[0]=="("||h[0]==")"?(h[0]=="("?r=cwid("(")*i:(f=h.indexOf(" "),set_font(n.font),f>0?r=strwh(h.slice(0,f))[0]:r=u),c=(u-r+2*cwid(" ")*i)*.4,c>20&&(c=20),c+=r,n.t[0]>="0"&&n.t[0]<="9"&&c>s&&(s=c)):(c=o*.4,c>20&&(c=20)),n.shift=c,t<c&&(t=c),o-=c,c=2*cwid(" ")*i;for(l=e.next;l;l=l.next){switch(l.type){case C.NOTE:case C.REST:if(!l.a_ly||!l.a_ly[a]||l.a_ly[a].w==0)o-=9;else{if(l.a_ly[a].t!="-\n"&&l.a_ly[a].t!="_\n")break;o-=c}if(o<=0)break;continue;case C.CLEF:case C.METER:case C.KEY:o-=10;continue;default:o-=5}break}o>e.wr&&(e.wr=o)}if(s>0)for(a=0;a<p.length;a++)n=p[a],n&&n.t[0]>="0"&&n.t[0]<="9"&&(n.shift=s);return t}function draw_lyric_line(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d;e.hy_st&1<<t&&(l=!0,e.hy_st&=~(1<<t));for(o=e.sym;;o=o.next)if(o.type!=C.CLEF&&o.type!=C.KEY&&o.type!=C.METER)break;i=o.prev?o.prev.x:tsfirst.x,h=0;for(;o;o=o.next){o.a_ly?a=o.a_ly[t]:a=null;if(!a){switch(o.type){case C.REST:case C.MREST:c&&(out_wln(i+3,n,h-i),c=!1,i=o.x+o.wr)}continue}a.font!=gene.curfont&&(gene.curfont=p=a.font),r=a.t,s=a.w,d=a.shift,l&&(r=="_\n"?r="-\n":r!="-\n"&&(out_hyph(i,n,o.x-d-i),l=!1,i=o.x+o.wr)),c&&r!="_\n"&&(out_wln(i+3,n,h-i+3),c=!1,i=o.x+o.wr);if(r=="-\n"||r=="_\n"){h==0&&i>o.x-18&&(i=o.x-18),r[0]=="-"?l=!0:c=!0,h=o.x-d;continue}h=o.x-d,r.slice(-1)=="\n"&&(r=r.slice(0,-1),l=!0);if(user.anno_start||user.anno_stop)u={st:o.st,istart:a.istart,iend:a.iend,x:h,y:n,ymn:n,ymx:n+gene.curfont.size,wl:0,wr:s},anno_start(u,"lyrics");xy_str(h,n,r),anno_stop(u,"lyrics"),i=h+s}l&&(l=!1,h=realwidth-10,h<i+10&&(h=i+10),out_hyph(i,n,h-i),cfmt.hyphencont&&(e.hy_st|=1<<t));for(e.s_next;o;o=o.next)if(o.type==C.NOTE){if(!o.a_ly)break;a=o.a_ly[t],a&&a.t=="_\n"&&(c=!0,h=realwidth-15,h<i+12&&(h=i+12));break}c&&(out_wln(i+3,n,h-i+3),c=!1)}function draw_lyrics(e,t,n,r,i){var s,o,u=staff_tb[e.st].staffscale;set_font("vocal");if(i>0){r>-cfmt.vocalspace&&(r=-cfmt.vocalspace),r*=u;for(s=0;s<t;s++)r-=n[s]*1.1,draw_lyric_line(e,s,r);return(r-n[s-1]/6)/u}o=staff_tb[e.st].topbar+cfmt.vocalspace,r<o&&(r=o),r*=u;for(s=t;--s>=0;)draw_lyric_line(e,s,r),r+=n[s]*1.1;return r/u}function draw_all_lyrics(){var e,t,n,r,i,s,o,u,a,f,l=new Array(nstaff),c=voice_tb.length,h=new Array(c),p=new Array(c),d=new Array(c),v=new Array(c),m=0,g=0,y=-1;for(n=0;n<c;n++){e=voice_tb[n];if(!e.sym)continue;e.st!=y&&(m=0,g=0,y=e.st),r=0;if(e.have_ly){h[n]||(h[n]=[]);for(t=e.sym;t;t=t.next){a=t.a_ly;if(!a)continue;s=t.x,u=10;for(i=0;i<a.length;i++){f=a[i];if(f&&f.w!=0){s-=f.shift,u=f.w;break}}o=y_get(e.st,1,s,u),m<o&&(m=o),o=y_get(e.st,0,s,u),g>o&&(g=o);while(r<a.length)h[n][r++]=0;for(i=0;i<a.length;i++){f=a[i];if(!f)continue;if(!h[n][i]||f.font.size>h[n][i])h[n][i]=f.font.size}}}else o=y_get(e.st,1,0,realwidth),m<o&&(m=o),o=y_get(e.st,0,0,realwidth),g>o&&(g=o);l[y]||(l[y]={}),l[y].top=m,l[y].bot=g,p[n]=r;if(r==0)continue;e.pos.voc?d[n]=e.pos.voc==C.SL_ABOVE:voice_tb[n+1]&&voice_tb[n+1].st==y&&voice_tb[n+1].have_ly?d[n]=!0:d[n]=!1,d[n]?l[y].a=!0:l[y].b=!0}i=0;for(n=0;n<c;n++){e=voice_tb[n];if(!e.sym)continue;if(!e.have_ly)continue;if(d[n]){v[i++]=n;continue}y=e.st,set_dscale(y,!0),p[n]>0&&(l[y].bot=draw_lyrics(e,p[n],h[n],l[y].bot,1))}while(--i>=0)n=v[i],e=voice_tb[n],y=e.st,set_dscale(y,!0),l[y].top=draw_lyrics(e,p[n],h[n],l[y].top,-1);for(n=0;n<c;n++){e=voice_tb[n];if(!e.sym)continue;y=e.st;if(l[y].a){m=l[y].top+2;for(t=e.sym.next;t;t=t.next)t.a_ly&&y_set(y,1,t.x-2,10,m)}if(l[y].b){g=l[y].bot-2;if(p[e.v]>0)for(t=e.sym.next;t;t=t.next)t.a_ly&&y_set(y,0,t.x-2,10,g);else y_set(y,0,0,realwidth,g)}}}function parse_gchord(e){function h(){var e="";for(;;){t=n[o++];if("1234567890.-".indexOf(t)<0)return parseFloat(e);e+=t}}var t,n,r,i,s,e,o,u,a,f=get_font("annotation"),l=f.size,c=parse.line;u=parse.bol+c.index;if(e.length>1)n=e.slice(1,-1),a=u+1;else{n="";for(;;){t=c.next_char();if(!t){syntax(1,"No end of guitar chord");return}if(t=='"')break;t=="\\"&&(n+=t,t=c.next_char()),n+=t}a=parse.bol+c.index+1}if(curvoice.pos.gch==C.SL_HIDDEN)return;o=0,e="g";for(;;){t=n[o];if(!t)break;r={text:"",istart:u,iend:a,font:f};switch(t){case"@":e=t,o++,i=h(),t!=","?(syntax(1,"',' lacking in annotation '@x,y'"),s=0):(s=h(),t!=" "&&o--),r.x=i,r.y=s-l/2;break;case"^":case"_":case"<":case">":o++,e=t;break;default:switch(e){case"g":r.font=get_font("gchord");break;case"@":r.x=i,s-=l,r.y=s-l/2}}r.type=e;for(;;){t=n[o];if(!t)break;switch(t){case"\\":t=n[++o];if(!t||t=="n")break;r.text+="\\";default:r.text+=t,o++;continue;case"&":for(;;){r.text+=t,t=n[++o];switch(t){default:continue;case";":case undefined:case"\\":}break}if(t==";"){o++,r.text+=t;continue}break;case";":}o++;break}a_gch||(a_gch=[]),a_gch.push(r)}}function gch_tr1(e,t){var n,r,i,s,o,u,a,f,l,c,h=0;switch(e[0]){case"A":i=5;break;case"B":i=6;break;case"C":i=0;break;case"D":if(e[1]=="o"){h++,i=0;break}i=1;break;case"E":i=2;break;case"F":e[1]=="a"&&h++,i=3;break;case"G":i=4;break;case"L":h++,i=5;break;case"M":h++,i=2;break;case"R":h++,i=1;break;case"S":h++,e[1]=="o"?(h++,i=4):i=6;break;case"/":h--;break;default:return e}f=0,l=h+1;if(h>=0){while(e[l]=="#")f++,l++;while(e[l]=="b")f--,l++;o=cde2fcg[i]+t+f*7,u=cgd2cde[(o+112)%7],s=(((o+22)/7|0)+159)%5,n=(h?latin_names[u]:note_names[u])+acc_name[s]}else n="";return c=e.indexOf("/",l),c<0?n+e.slice(l):(i=note_names.indexOf(e[++c]),i<0?n+e.slice(l):(n+=e.slice(l,c),f=0,e[++c]=="#"?(f++,e[++c]=="#"&&(f++,c++)):e[c]=="b"&&(f--,e[++c]=="b"&&(f--,c++)),o=cde2fcg[i]+t+f*7,u=cgd2cde[(o+112)%7],s=(((o+22)/7|0)+159)%5,n+note_names[u]+acc_name[s]+e.slice(c)))}function gch_transp(e){var t,n,r,i=0,s=curvoice.ckey.k_sf-curvoice.okey.k_sf;for(;;){t=e.a_gch[i++];if(!t)return;if(t.type!="g")continue;n=t.text,r=n.indexOf(" "),r>=0&&(r++,n=n.slice(0,r)+gch_tr1(n.slice(r),s)),t.text=gch_tr1(n,s)}}function gch_build(e){var t,n,r,i,s=curvoice.pos.gch==C.SL_BELOW?-1:1,o=0,u=0,a=0,f=0,l=cfmt.gchordbox,c=.4;e.a_gch=a_gch,a_gch=null,curvoice.vtransp&&gch_transp(e);for(i=0;i<e.a_gch.length;i++){t=e.a_gch[i];if(t.type=="g")cfmt.chordnames&&(t.otext=t.text,t.text=t.text.replace(/A|B|C|D|E|F|G/g,function(e){return cfmt.chordnames[e]}),cfmt.chordnames.B=="H"&&(t.text=t.text.replace(/Hb/g,"Bb"))),t.text=t.text.replace(/##|#|=|bb|b/g,function(e){switch(e){case"##":return"x";case"#":return"♯";case"=":return"♮";case"b":return"♭"}return"bb"});else{t.text=cnv_escape(t.text);if(t.type=="@"&&!user.anno_start&&!user.anno_stop)continue}gene.curfont=t.font,n=strwh(t.text),t.w=n[0];switch(t.type){case"@":break;case"^":r=n[0]*c,r>8&&(r=8),t.x=-r,o-=n[1],t.y=o;break;case"_":r=n[0]*c,r>8&&(r=8),t.x=-r,u-=n[1],t.y=u;break;case"<":t.x=-(n[0]+6),a-=n[1],t.y=a+n[1]/2;break;case">":t.x=6,f-=n[1],t.y=f+n[1]/2;break;default:t.box=l,r=n[0]*c,r>8&&(r=8),t.x=-r,s<0?(u-=n[1],t.y=u,l&&(u-=2,t.y-=1)):(o-=n[1],t.y=o,l&&(o-=2,t.y-=1))}}a/=2,f/=2;for(i=0;i<e.a_gch.length;i++){t=e.a_gch[i];switch(t.type){case"^":t.y-=o;break;case"<":t.y-=a;break;case">":t.y-=f;break;case"g":s>0&&(t.y-=o)}}}function draw_gchord(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d=e.a_gch[0].w,v=y_get(e.st,1,e.x-2,d),m=y_get(e.st,0,e.x-2,d),g=e.dur?((e.notes[e.nhd].pit+e.notes[0].pit>>1)-18)*3:12;for(o=0;o<e.a_gch.length;o++){r=e.a_gch[o];if(r.type!="g")continue;i=r;if(r.y<0)break}i&&(i.y>=0?v<n&&(v=n):m>t&&(m=t)),set_dscale(e.st);for(o=0;o<e.a_gch.length;o++){r=e.a_gch[o],use_font(r.font),set_font(r.font),p=r.font.size,d=r.w,u=e.x+r.x,s=r.text;switch(r.type){case"_":a=r.y+m,y_set(e.st,0,u,d,a-p*.2-2);break;case"^":a=r.y+v,y_set(e.st,1,u,d,a+p*.8+2);break;case"<":e.notes[0].acc&&(u-=e.notes[0].shac),a=r.y+g-p/2;break;case">":e.xmx&&(u+=e.xmx),e.dots&&(u+=1.5+3.5*e.dots),a=r.y+g-p/2;break;default:h=r.box?3:2,r.y>=0?(a=r.y+v,y_set(e.st,!0,u,d,a+p+h)):(a=r.y+m,y_set(e.st,!1,u,d,a-h)),l=s.indexOf(" ");if(l>=0){u=realwidth;for(var y=e.next;y;y=y.next){switch(y.type){default:continue;case C.NOTE:case C.REST:case C.BAR:u=y.x}break}c=2;for(;;){l=s.indexOf(" ",l+1);if(l<0)break;c++}var b=(u-e.x)/c;u=e.x,a*=staff_tb[e.st].staffscale,user.anno_start&&user.anno_start("gchord",r.istart,r.iend,u-2,a+p+2,d+4,p+4,e),l=0,c=l;for(;;){l=s.indexOf(" ",c);if(l<0)break;xy_str(u,a,s.slice(c,l),"c"),u+=b,c=l+1}xy_str(u,a,s.slice(c),"c"),user.anno_stop&&user.anno_stop("gchord",r.istart,r.iend,e.x-2,a+p+2,d+4,p+4,e);continue}break;case"@":a=r.y+g,a>0?(f=a+p,f>staff_tb[e.st].ann_top&&(staff_tb[e.st].ann_top=f)):a<staff_tb[e.st].ann_bot&&(staff_tb[e.st].ann_bot=a)}user.anno_start&&user.anno_start("annot",r.istart,r.iend,u-2,a+p+2,d+4,p+4,e),r.box?xy_str_b(u,a,s):xy_str(u,a,s),user.anno_stop&&user.anno_stop("annot",r.istart,r.iend,u-2,a+p+2,d+4,p+4,e)}}function psdeco(){return!1}function psxygl(){return!1}function set_hooks(){function n(e){for(var t=0;t<e.length;t++)e[t](self)}var e=abc2svg.modules.hooks,t=abc2svg.modules.g_hooks;hook_init?e.length&&(n(e),t.push.apply(t,e),abc2svg.modules.hooks=[]):(e.length&&(t.push.apply(t,e),abc2svg.modules.hooks=[]),n(t),hook_init=!0)}var C=abc2svg.C,require=empty_function,system=empty_function,write=empty_function,XMLHttpRequest=empty_function,OPEN_BRACE=1,CLOSE_BRACE=2,OPEN_BRACKET=4,CLOSE_BRACKET=8,OPEN_PARENTH=16,CLOSE_PARENTH=32,STOP_BAR=64,FL_VOICE=128,OPEN_BRACE2=256,CLOSE_BRACE2=512,OPEN_BRACKET2=1024,CLOSE_BRACKET2=2048,MASTER_VOICE=4096,IN=96,CM=37.8,YSTEP=256,errs={bad_char:"Bad character '$1'",bad_val:"Bad value in $1",bar_grace:"Cannot have a bar in grace notes",ignored:"$1: inside tune - ignored",misplaced:"Misplaced '$1' in %%staves",must_note:"!$1! must be on a note",must_note_rest:"!$1! must be on a note or a rest",nonote_vo:"No note in voice overlay",not_enough_n:"Not enough notes/rests for %%repeat",not_enough_m:"Not enough measures for %%repeat",not_ascii:"Not an ASCII character"},self=this,glovar={meter:{type:C.METER,wmeasure:1,a_meter:[]}},info={},mac={},maci=new Int8Array(128),parse={ctx:{},prefix:"%",state:0,line:new scanBuf},psvg,dd_tb={},a_de,od,decos={dot:"0 stc 5 1 1",tenuto:"0 emb 5 3 3",slide:"1 sld 3 7 0",arpeggio:"2 arp 12 10 0",roll:"3 roll 7 6 6",fermata:"3 hld 12 7 7",emphasis:"3 accent 7 4 4",lowermordent:"3 lmrd 10 5 5",coda:"3 coda 24 10 10",uppermordent:"3 umrd 10 5 5",segno:"3 sgno 22 8 8",trill:"3 trl 14 5 5",upbow:"3 upb 10 5 5",downbow:"3 dnb 9 5 5",gmark:"3 grm 6 5 5",wedge:"3 wedge 8 3 3",turnx:"3 turnx 10 0 5",breath:"3 brth 0 1 20",longphrase:"3 lphr 0 1 1",mediumphrase:"3 mphr 0 1 1",shortphrase:"3 sphr 0 1 1",invertedfermata:"3 hld 12 7 7",invertedturn:"3 turn 10 0 5",invertedturnx:"3 turnx 10 0 5",0:"3 fng 8 3 3 0",1:"3 fng 8 3 3 1",2:"3 fng 8 3 3 2",3:"3 fng 8 3 3 3",4:"3 fng 8 3 3 4",5:"3 fng 8 3 3 5",plus:"3 dplus 7 3 3","+":"3 dplus 7 3 3",accent:"3 accent 7 4 4",">":"3 accent 7 4 4",marcato:"3 marcato 9 3 3","^":"3 marcato 9 3 3",mordent:"3 lmrd 10 5 5",open:"3 opend 10 3 3",snap:"3 snap 14 3 3",thumb:"3 thumb 14 3 3",dacapo:"3 dacs 16 20 20 Da Capo",dacoda:"3 dacs 16 20 20 Da Coda","D.C.":"3 dcap 16 10 10","D.S.":"3 dsgn 16 10 10","D.C.alcoda":"3 dacs 16 38 38 D.C. al Coda","D.S.alcoda":"3 dacs 16 38 38 D.S. al Coda","D.C.alfine":"3 dacs 16 38 38 D.C. al Fine","D.S.alfine":"3 dacs 16 38 38 D.S. al Fine",fine:"3 dacs 16 10 10 Fine",turn:"3 turn 10 0 5","trill(":"3 ltr 8 0 0","trill)":"3 ltr 8 0 0",f:"6 f 18 1 7",ff:"6 ff 18 2 10",fff:"6 fff 18 4 13",ffff:"6 ffff 18 6 16",mf:"6 mf 18 6 13",mp:"6 mp 18 6 16",p:"6 p 18 2 8",pp:"6 pp 18 5 14",ppp:"6 ppp 18 8 20",pppp:"6 pppp 18 10 25",pralltriller:"3 umrd 10 5 5",sfz:"6 sfz 18 4 10",ped:"4 ped 20 0 0","ped-up":"4 pedoff 20 0 0","crescendo(":"7 cresc 18 0 0","crescendo)":"7 cresc 18 0 0","<(":"7 cresc 18 0 0","<)":"7 cresc 18 0 0","diminuendo(":"7 dim 18 0 0","diminuendo)":"7 dim 18 0 0",">(":"7 dim 18 0 0",">)":"7 dim 18 0 0","-(":"8 gliss 0 0 0","-)":"8 gliss 0 0 0","~(":"8 glisq 0 0 0","~)":"8 glisq 0 0 0","8va(":"3 8va 10 0 0","8va)":"3 8va 10 0 0","8vb(":"4 8vb 10 0 0","8vb)":"4 8vb 10 0 0","15ma(":"3 15ma 10 0 0","15ma)":"3 15ma 10 0 0","15mb(":"4 15mb 10 0 0","15mb)":"4 15mb 10 0 0",invisible:"32 0 0 0 0",beamon:"33 0 0 0 0",trem1:"34 0 0 0 0",trem2:"34 0 0 0 0",trem3:"34 0 0 0 0",trem4:"34 0 0 0 0",xstem:"35 0 0 0 0",beambr1:"36 0 0 0 0",beambr2:"36 0 0 0 0",rbstop:"37 0 0 0 0","/":"38 0 0 6 6","//":"38 0 0 6 6","///":"38 0 0 6 6","beam-accel":"39 0 0 0 0","beam-rall":"39 0 0 0 0",stemless:"40 0 0 0 0",rbend:"41 0 0 0 0"},f_near=[!0,!0,!0],f_note=[!1,!1,!1,!0,!0,!0,!1,!1,!0],f_staff=[!1,!1,!1,!1,!1,!1,!0,!0],func_tb=[d_near,d_slide,d_arp,d_upstaff,d_upstaff,d_trill,d_pf,d_cresc],ottava={"8va(":1,"8va)":1,"15ma(":1,"15ma)":1,"8vb(":1,"8vb)":1,"15mb(":1,"15mb)":1},STEM_MIN=16,STEM_MIN2=14,STEM_MIN3=12,STEM_MIN4=10,STEM_CH_MIN=14,STEM_CH_MIN2=10,STEM_CH_MIN3=9,STEM_CH_MIN4=9,BEAM_DEPTH=3.2,BEAM_OFFSET=.25,BEAM_SHIFT=5,BEAM_SLOPE=.4,BEAM_STUB=8,SLUR_SLOPE=.5,GSTEM=15,GSTEM_XOFF=2.3,cache,min_tb=[[STEM_MIN,STEM_MIN,STEM_MIN2,STEM_MIN3,STEM_MIN4,STEM_MIN4],[STEM_CH_MIN,STEM_CH_MIN,STEM_CH_MIN2,STEM_CH_MIN3,STEM_CH_MIN4,STEM_CH_MIN4]],sharp_cl=new Int8Array([24,9,15,21,6,12,18]),flat_cl=new Int8Array([12,18,24,9,15,21,6]),sharp1=new Int8Array([-9,12,-9,-9,12,-9]),sharp2=new Int8Array([12,-9,12,-9,12,-9]),flat1=new Int8Array([9,-12,9,-12,9,-12]),flat2=new Int8Array([-12,9,-12,9,-12,9]),rest_tb=["r128","r64","r32","r16","r8","r4","r2","r1","r0","r00"],musicfont='url("data:application/x-font-ttf;base64,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MDgyB3VuaUUwODMHdW5pRTA4NAd1bmlFMDg1B3VuaUUwODYHdW5pRTA4Nwd1bmlFMDg4B3VuaUUwODkHdW5pRTA4QQd1bmlFMDhCB3VuaUUwOEMHdW5pRTA5NAd1bmlFMDk1B3VuaUUwQTAHdW5pRTBBMQd1bmlFMEEyB3VuaUUwQTMHdW5pRTBBNAd1bmlFMEE5B3VuaUUwQjMHdW5pRTEwMQd1bmlFMUI5B3VuaUUxQkIHdW5pRTFFNwd1bmlFMjYwB3VuaUUyNjEHdW5pRTI2Mgd1bmlFMjYzB3VuaUUyNjQHdW5pRTI4MAd1bmlFMjgxB3VuaUUyODIHdW5pRTI4Mwd1bmlFNEEwB3VuaUU0QTIHdW5pRTRBNAd1bmlFNEE4B3VuaUU0QUMHdW5pRTRDMAd1bmlFNENFB3VuaUU0RTEHdW5pRTRFMgd1bmlFNEUzB3VuaUU0RTQHdW5pRTRFNQd1bmlFNEU2B3VuaUU0RTcHdW5pRTRFOAd1bmlFNEU5B3VuaUU0RUEHdW5pRTRFRQd1bmlFNTAwB3VuaUU1MDEHdW5pRTUyMAd1bmlFNTIxB3VuaUU1MjIHdW5pRTUyNAd1bmlFNTI1B3VuaUU1MjkHdW5pRTUyQQd1bmlFNTJCB3VuaUU1MkMHdW5pRTUyRAd1bmlFNTJGB3VuaUU1MzAHdW5pRTUzMQd1bmlFNTM5B3VuaUU1NjYHdW5pRTU2Nwd1bmlFNTY5B3VuaUU1NkMHdW5pRTU2RAd1bmlFNTgyB3VuaUU1RDAHdW5pRTVFMgd1bmlFNjEwB3VuaUU2MTIHdW5pRTYxNAd1bmlFNjE4B3VuaUU2MjQHdW5pRTYzMAd1bmlFNjUwB3VuaUU2NTUHdW5pRTkxMAd1bmlFOTExB3VuaUU5MTIHdW5pRTkxNAd1bmlFOTE1B3VuaUU5MTgHdW5pRTkyMAd1bmlFOTI1B3VuaUU5NUQHdW5pRUEwMgd1bmlFQUE0AAAAAAH//wACAAEAAAAAAAAADAAUAAQAAAACAAAAAQAAAAEAAAAAAAEAAAAA1+feHQAAAADRlyIXAAAAANgWv3Y=")',defined_font={},font_tb={},fid=1,font_scale_tb={serif:1.05,serifBold:1.05,"sans-serif":1.1,"sans-serifBold":1.1,Palatino:1.1,Mono:1.35},fmt_lock={},cfmt={aligncomposer:1,breaklimit:.7,breakoneoln:!0,cancelkey:!0,composerspace:6,dblrepbar:":][:",decoerr:!0,dynalign:!0,fullsvg:"",gracespace:new Float32Array([4,8,11]),graceslurs:!0,hyphencont:!0,indent:0,infoname:'R "Rhythm: "\nB "Book: "\nS "Source: "\nD "Discography: "\nN "Notes: "\nZ "Transcription: "\nH "History: "',infospace:0,keywarn:!0,leftmargin:1.4*CM,lineskipfac:1.1,linewarn:!0,maxshrink:.65,maxstaffsep:2e3,maxsysstaffsep:2e3,measurefirst:1,measurenb:-1,musicspace:6,parskipfac:.4,partsspace:8,pagewidth:21*CM,printmargin:0,rightmargin:1.4*CM,rbdbstop:!0,rbmax:4,rbmin:2,scale:1,slurheight:1,staffsep:46,stemheight:21,stretchlast:.25,stretchstaff:!0,subtitlespace:3,sysstaffsep:34,textspace:14,titlespace:6,titletrim:!0,topspace:22,tuplets:[0,0,0,0],vocalspace:10,writefields:"CMOPQsTWw",wordsspace:5},textopt={align:"j",center:"c",fill:"f",justify:"j",ragged:"f",right:"r",skip:"s"},posval={above:C.SL_ABOVE,auto:0,below:C.SL_BELOW,down:C.SL_BELOW,hidden:C.SL_HIDDEN,opposite:C.SL_HIDDEN,under:C.SL_BELOW,up:C.SL_ABOVE};Abc.prototype.style_font=style_font;var abc_utf={"=D":"Đ","=H":"Ħ","=T":"Ŧ","=d":"đ","=h":"ħ","=t":"ŧ","/O":"Ø","/o":"ø","/L":"Ł","/l":"ł",vL:"Ľ",vl:"ľ",vd:"ď",".i":"ı",AA:"Å",aa:"å",AE:"Æ",ae:"æ",DH:"Ð",dh:"ð",OE:"Œ",oe:"œ",ss:"ß",TH:"Þ",th:"þ"},oct_acc={1:"♯",2:"♭",3:"♮",4:"x",5:"bb"},include=0;Abc.prototype.tosvg=tosvg;var gene,staff_tb,nstaff,tsnext,realwidth,insert_meter,spf_last,space_tb=new Float32Array([7,10,14.15,20,28.3,40,56.6,80,100,120]),smallest_duration,dx_tb=new Float32Array([10,10,11,13,13]),hw_tb=new Float32Array([4.5,5,6,7,8]),w_note=new Float32Array([3.5,3.7,5,6,7]),delta_tb={t:-4,c:0,b:4,p:-6},rest_sp=[[18,18],[12,18],[12,12],[0,12],[6,8],[10,10],[6,4],[10,0],[10,4],[10,10]],delpit=[0,-7,-14,0],MAXPIT=96,blocks=[],a_gch,a_dcn,multicol,maps={},qplet_tb=new Int8Array([0,1,3,2,3,0,2,0,3,0]),ntb="CDEFGABcdefgab",note_pit=new Int8Array([0,2,4,5,7,9,11]),reg_dur=/(\d*)(\/*)(\d*)/g,cde2fcg=new Int8Array([0,2,4,-1,1,3,5]),cgd2cde=new Int8Array([0,4,1,5,2,6,3]),acc2=new Int8Array([-2,-1,3,1,2]),nil=["0"],char_tb=[nil,nil,nil,nil,nil,nil,nil,nil,nil," ","\n",nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil," ","!",'"',"i","\n",nil,"&",nil,"(",")","i",nil,nil,"-","!dot!",nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,"|","i","<","n","<","i","i","n","n","n","n","n","n","n","!fermata!","d","d","d","!emphasis!","!lowermordent!","d","!coda!","!uppermordent!","d","d","!segno!","!trill!","d","d","d","n","d","n","[","\\","|","n","n","i","n","n","n","n","n","n","n","d","d","d","d","d","d","d","d","d","d","d","d","d","!upbow!","!downbow!","d","n","n","n","{","|","}","!gmark!",nil],cw_tb=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.25,.333,.408,.5,.5,.833,.778,.333,.333,.333,.5,.564,.25,.564,.25,.278,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.278,.278,.564,.564,.564,.444,.921,.722,.667,.667,.722,.611,.556,.722,.722,.333,.389,.722,.611,.889,.722,.722,.556,.722,.667,.556,.611,.722,.722,.944,.722,.722,.611,.333,.278,.333,.469,.5,.333,.444,.5,.444,.5,.444,.333,.5,.5,.278,.278,.5,.278,.778,.5,.5,.5,.5,.333,.389,.278,.5,.5,.722,.5,.5,.444,.48,.2,.48,.541,.5]),info_font_init={A:"info",C:"composer",O:"composer",P:"parts",Q:"tempo",R:"info",T:"title",X:"title"},output="",style="\n.fill {fill: currentColor}\n.stroke {stroke: currentColor; fill: none}\n.music text, .music tspan {fill:currentColor}",font_style="",posx=cfmt.leftmargin/cfmt.scale,posy=0,img={width:cfmt.pagewidth,lm:cfmt.leftmargin,rm:cfmt.rightmargin},defined_glyph={},defs="",fulldefs="",stv_g={scale:1,dy:0,st:-1,v:0,g:0},block={},tgls={brace:{x:0,y:0,c:""},hl:{x:-4,y:0,c:""},hl1:{x:-6,y:0,c:""},hl2:{x:-6,y:0,c:""},ghl:{x:-4,y:0,c:""},lphr:{x:0,y:24,c:""},mphr:{x:0,y:24,c:""},sphr:{x:0,y:27,c:""},rdots:{x:-1,y:0,c:""},dsgn:{x:-4,y:-4,c:""},dcap:{x:-4,y:-4,c:""},sgno:{x:-6,y:0,c:""},coda:{x:-12,y:-6,c:""},tclef:{x:-8,y:0,c:""},cclef:{x:-8,y:0,c:""},bclef:{x:-8,y:0,c:""},pclef:{x:-6,y:0,c:""},spclef:{x:-6,y:0,c:""},stclef:{x:-8,y:0,c:""},scclef:{x:-8,y:0,c:""},sbclef:{x:-7,y:0,c:""},oct:{x:0,y:2,c:""},HDD:{x:-7,y:0,c:""},breve:{x:-6,y:0,c:""},HD:{x:-5.2,y:0,c:""},Hd:{x:-3.8,y:0,c:""},hd:{x:-3.7,y:0,c:""},ghd:{x:2,y:0,c:"",sc:.66},pshhd:{x:-3.7,y:0,c:""},pfthd:{x:-3.7,y:0,c:""},x:{x:-3.7,y:0,c:""},"circle-x":{x:-3.7,y:0,c:""},srep:{x:-5,y:0,c:""},diamond:{x:-4,y:0,c:""},triangle:{x:-4,y:0,c:""},dot:{x:-2,y:0,c:""},"acc-1":{x:-3,y:0,c:""},acc3:{x:-2,y:0,c:""},acc1:{x:-3,y:0,c:""},acc2:{x:-3,y:0,c:""},"acc-2":{x:-3,y:0,c:""},"acc-1_1_4":{x:-3,y:0,c:""},"acc-1_3_4":{x:-4,y:0,c:""},acc1_1_4:{x:-2,y:0,c:""},acc1_3_4:{x:-4,y:0,c:""},accent:{x:-3,y:0,c:""},stc:{x:-1,y:-2,c:""},emb:{x:-4,y:-2,c:""},wedge:{x:-1,y:0,c:""},marcato:{x:-3,y:0,c:""},hld:{x:-7,y:0,c:""},brth:{x:0,y:0,c:""},r00:{x:-1.5,y:0,c:""},r0:{x:-1.5,y:0,c:""},r1:{x:-3.5,y:-6,c:""},r2:{x:-3.2,y:0,c:""},r4:{x:-3,y:0,c:""},r8:{x:-3,y:0,c:""},r16:{x:-4,y:0,c:""},r32:{x:-4,y:0,c:""},r64:{x:-4,y:0,c:""},r128:{x:-4,y:0,c:""},mrest:{x:-10,y:0,c:""},mrep:{x:-6,y:0,c:""},mrep2:{x:-9,y:0,c:""},p:{x:-4,y:-6,c:""},f:{x:-4,y:-6,c:""},pppp:{x:-4,y:-6,c:""},ppp:{x:-4,y:-6,c:""},pp:{x:-4,y:-6,c:""},mp:{x:-4,y:-6,c:""},mf:{x:-4,y:-6,c:""},ff:{x:-4,y:-6,c:""},fff:{x:-4,y:-6,c:""},ffff:{x:-4,y:-6,c:""},sfz:{x:-4,y:-6,c:""},trl:{x:-4,y:-4,c:""},turn:{x:-5,y:-4,c:""},turnx:{x:-5,y:-4,c:""},umrd:{x:-7,y:-2,c:""},lmrd:{x:-7,y:-2,c:""},dplus:{x:-4,y:10,c:""},sld:{x:-8,y:12,c:""},grm:{x:-2,y:0,c:""},dnb:{x:-4,y:0,c:""},upb:{x:-3,y:0,c:""},opend:{x:-2,y:0,c:""},roll:{x:0,y:0,c:""},thumb:{x:0,y:0,c:""},snap:{x:-2,y:0,c:""},ped:{x:-10,y:0,c:""},pedoff:{x:-5,y:0,c:""},longa:{x:-6,y:0,c:""},custos:{x:-4,y:3,c:""},ltr:{x:2,y:6,c:""}},glyphs={},mgls={" ":" ",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"",8:"",9:"",C:"","+":"","(":"",")":"",o:"",c:"",".":"","|":""},anno_type=["bar","clef","custos","","grace","key","meter","Zrest","note","part","rest","yspace","staves","Break","tempo","","block","remark"],anno_start=user.anno_start?a_start:empty_function,anno_stop=user.anno_stop?a_stop:empty_function;Abc.prototype.out_svg=function(e){output+=e},Abc.prototype.sx=sx,Abc.prototype.sy=sy,Abc.prototype.sh=function(e){return stv_g.st<0?e/stv_g.scale:e},Abc.prototype.ax=function(e){return e+posx},Abc.prototype.ay=function(e){return stv_g.st<0?posy-e:posy+(stv_g.dy-e)*stv_g.scale-stv_g.dy},Abc.prototype.ah=function(e){return stv_g.st<0?e:e*stv_g.scale},Abc.prototype.out_sxsy=out_sxsy,Abc.prototype.xypath=xypath;var deco_str_style={crdc:{dx:0,dy:5,style:"font:italic 14px serif"},dacs:{dx:0,dy:3,style:"font:16px serif",anchor:' text-anchor="middle"'},fng:{dx:0,dy:1,style:"font-family:Bookman; font-size:8px",anchor:' text-anchor="middle"'},pf:{dx:0,dy:5,style:"font:italic bold 16px serif"},"@":{dx:0,dy:5,style:"font: 12px sans-serif"}},deco_val_tb={arp:out_arp,cresc:out_cresc,dim:out_dim,ltr:out_ltr,"8va":out_8va,"8vb":out_8vb,"15ma":out_15ma,"15mb":out_15mb},deco_l_tb={glisq:out_glisq,gliss:out_gliss};Abc.prototype.blk_out=blk_out,Abc.prototype.blk_flush=blk_flush;var par_sy,cur_sy,voice_tb,curvoice,staves_found,vover,tsfirst,w_tb=new Uint8Array([2,1,8,0,3,5,6,9,9,0,9,3,0,7,0,0,0,0]),note_names="CDEFGAB",latin_names=["Do","Re","Mi","Fa","Sol","La","Si"],acc_name=["bb","b","","#","##"];font_init(),init_tune(),Abc.prototype.add_style=function(e){style+=e},Abc.prototype.calculate_beam=calculate_beam,Abc.prototype.cfmt=function(){return cfmt},Abc.prototype.clone=clone,Abc.prototype.deco_cnv=deco_cnv,Abc.prototype.do_pscom=do_pscom,Abc.prototype.do_begin_end=do_begin_end,Abc.prototype.draw_gchord=draw_gchord,Abc.prototype.draw_note=draw_note,Abc.prototype.draw_symbols=draw_symbols,Abc.prototype.errs=errs,Abc.prototype.font_class=font_class,Abc.prototype.gch_build=gch_build,Abc.prototype.gch_tr1=gch_tr1,Abc.prototype.get_a_gch=function(){return a_gch},Abc.prototype.get_bool=get_bool,Abc.prototype.get_cur_sy=function(){return cur_sy},Abc.prototype.get_curvoice=function(){return curvoice},Abc.prototype.get_delta_tb=function(){return delta_tb},Abc.prototype.get_decos=function(){return decos},Abc.prototype.get_fname=function(){return parse.fname},Abc.prototype.get_font=get_font,Abc.prototype.get_font_style=function(){return font_style},Abc.prototype.get_glyphs=function(){return glyphs},Abc.prototype.get_img=function(){return img},Abc.prototype.get_maps=function(){return maps},Abc.prototype.get_multi=function(){return multicol},Abc.prototype.get_newpage=function(){if(block.newpage)return block.newpage=!1,!0},Abc.prototype.get_posy=function(){var e=posy;return posy=0,e},Abc.prototype.get_staff_tb=function(){return staff_tb},Abc.prototype.get_top_v=function(){return par_sy.top_voice},Abc.prototype.get_tsfirst=function(){return tsfirst},Abc.prototype.get_voice_tb=function(){return voice_tb},Abc.prototype.goto_tune=goto_tune,Abc.prototype.info=function(){return info},Abc.prototype.new_note=new_note,Abc.prototype.out_arp=out_arp,Abc.prototype.out_deco_str=out_deco_str,Abc.prototype.out_deco_val=out_deco_val,Abc.prototype.out_ltr=out_ltr,Abc.prototype.output_music=output_music,Abc.prototype.param_set_font=param_set_font,Abc.prototype.parse=parse,Abc.prototype.psdeco=psdeco,Abc.prototype.psxygl=psxygl,Abc.prototype.set_bar_num=set_bar_num,Abc.prototype.set_cur_sy=function(e){cur_sy=e},Abc.prototype.set_dscale=set_dscale,Abc.prototype.set_font=set_font,Abc.prototype.set_format=set_format,Abc.prototype.set_pitch=set_pitch,Abc.prototype.set_scale=set_scale,Abc.prototype.set_stem_dir=set_stem_dir,Abc.prototype.set_stems=set_stems,Abc.prototype.set_sym_glue=set_sym_glue,Abc.prototype.set_tsfirst=function(e){tsfirst=e},Abc.prototype.set_vp=set_vp,Abc.prototype.set_v_param=set_v_param,Abc.prototype.set_width=set_width,Abc.prototype.set_xhtml=function(e){var t=write_text;return write_text=e,t},Abc.prototype.sort_pitch=sort_pitch,Abc.prototype.strwh=strwh,Abc.prototype.stv_g=function(){return stv_g},Abc.prototype.svg_flush=svg_flush,Abc.prototype.syntax=syntax,Abc.prototype.unlksym=unlksym,Abc.prototype.use_font=use_font,Abc.prototype.xy_str=xy_str,Abc.prototype.xygl=xygl;var hook_init}};var Abc=abc2svg.Abc;typeof module=="object"&&typeof exports=="object"&&(exports.abc2svg=abc2svg,exports.Abc=Abc),abc2svg.loadjs=function(e,t,n){n&&n()},abc2svg.modules={ambitus:{fn:"ambitus-1.js"},beginps:{fn:"psvg-1.js"},"break":{fn:"break-1.js"},capo:{fn:"capo-1.js"},clip:{fn:"clip-1.js"},voicecombine:{fn:"combine-1.js"},diagram:{fn:"diag-1.js"},equalbars:{fn:"equalbars-1.js"},grid:{fn:"grid-1.js"},grid2:{fn:"grid2-1.js"},MIDI:{fn:"MIDI-1.js"},percmap:{fn:"perc-1.js"},soloffs:{fn:"soloffs-1.js"},sth:{fn:"sth-1.js"},temperament:{fn:"temper-1.js"},nreq:0,hooks:[],g_hooks:[],load:function(e,t,n){function r(){return typeof user=="object"&&user.errmsg?user.errmsg:typeof printErr=="function"?printErr:typeof alert=="function"?function(e){alert(e)}:typeof console=="object"?console.log:function(){}}var i,s,o=this.nreq,u=e.match(/(^|\n)(%%|I:).+?\b/g);if(!u)return!0;this.cbf=t||function(){},this.errmsg=n||r();for(var a=0;a<u.length;a++){i=abc2svg.modules[u[a].replace(/\n?(%%|I:)/,"")];if(!i||i.loaded)continue;i.loaded=!0,this.nreq++,abc2svg.loadjs(i.fn,function(){--abc2svg.modules.nreq==0&&abc2svg.modules.cbf()},function(){abc2svg.modules.errmsg("error loading "+i.fn),--abc2svg.modules.nreq==0&&abc2svg.modules.cbf()})}return this.nreq==o}},abc2svg.version="1.18.2",abc2svg.vdate="2018-11-18",abc2svg.MIDI={do_midi:function(e){function r(e){var r=Number(e);if(isNaN(r))return;return e=(r/12|0)*7-19,r%=12,e+=t[r],note={pit:e},n[r]&&(note.acc=n[r]),note}function i(e){var t=e.match(/^([_^=]*)([A-Ga-g])([,']*)$/);if(!t)return;return e.match(/[A-Z]/)&&(e=e.toLowerCase(),e.indexOf("'")>0?e=e.replace("'",""):e+=","),e}var t=new Int8Array([0,0,1,2,2,3,3,4,5,5,6,6]),n=new Int8Array([0,1,0,-1,0,0,1,0,-1,0,-1,0]),s,o,u=this.get_maps(),a=e.split(/\s+/);switch(a[1]){case"channel":if(a[2]!="10")break;this.set_v_param("midictl","0 1");break;case"drummap":if(this.cfmt().sound!="play")break;s=i(a[2]),o=r(a[3]);if(!s||!o){this.syntax(1,this.errs.bad_val,"%%MIDI drummap");break}u.MIDIdrum||(u.MIDIdrum={}),u.MIDIdrum[s]=[null,o],this.set_v_param("mididrum","MIDIdrum");break;case"program":a[3]!=undefined?o=a[3]:o=a[2],o=parseInt(o);if(isNaN(o)||o<0||o>128){this.syntax(1,"Bad program in %%MIDI");return}this.set_v_param("instr",o);break;case"control":s=parseInt(a[2]);if(isNaN(s)||s<0||s>127){this.syntax(1,"Bad controller number in %%MIDI");return}o=parseInt(a[3]);if(isNaN(o)||o<0||o>127){this.syntax(1,"Bad controller value in %%MIDI");return}this.set_v_param("midictl",a[2]+" "+a[3])}},set_midi:function(e){var t,n,r=this.get_curvoice();for(t=0;t<e.length;t++)switch(e[t]){case"instr=":r.instr=e[t+1];break;case"midictl=":r.midictl||(r.midictl={}),n=e[t+1].split(" "),r.midictl[n[0]]=Number(n[1]);break;case"mididrum=":r.map||(r.map={}),r.map=e[t+1]}},do_pscom:function(e,t){t.slice(0,5)=="MIDI "?abc2svg.MIDI.do_midi.call(this,t):e(t)},set_vp:function(e,t){abc2svg.MIDI.set_midi.call(this,t),e(t)},set_hooks:function(e){e.do_pscom=abc2svg.MIDI.do_pscom.bind(e,e.do_pscom),e.set_vp=abc2svg.MIDI.set_vp.bind(e,e.set_vp)}},abc2svg.modules.hooks.push(abc2svg.MIDI.set_hooks),abc2svg.modules.MIDI.loaded=!0,abc2svg.combine={comb_v:function(){function t(t){var n,r=t.ts_next;return!r||r.type!=e.NOTE&&r.type!=e.REST?!1:r.v==t.v||r.st!=t.st||r.time!=t.time||r.dur!=t.dur?!1:t.combine<=0&&r.type!=t.type?!1:t.a_gch&&r.a_gch?!1:t.type==e.REST?t.type==r.type&&t.invis&&!r.invis?!1:!0:r.a_ly||r.sl1||r.sl2||r.slur_start||r.slur_end?!1:r.beam_st!=t.beam_st||r.beam_end!=t.beam_end?!1:(n=r.nhd,t.combine<=1&&t.notes[0].pit<=r.notes[n].pit+1?!1:!0)}function n(t,n){var r,i,s;t.notes=t.notes.concat(n.notes),t.nhd=r=t.notes.length-1,this.sort_pitch(t);if(t.combine>=3){for(s=r;s>0;s--)t.notes[s].pit==t.notes[s-1].pit&&t.notes[s].acc==t.notes[s-1].acc&&t.notes.splice(s,1);t.nhd=r=t.notes.length-1}t.ymx=3*(t.notes[r].pit-18)+4,t.ymn=3*(t.notes[0].pit-18)-4,i=t.notes[0].ti1,(i&15)==e.SL_AUTO&&(t.notes[0].ti1=e.SL_BELOW|i&~e.SL_DOTTED),i=t.notes[r].ti1,(i&15)==e.SL_AUTO&&(t.notes[r].ti1=e.SL_ABOVE|i&~e.SL_DOTTED)}function r(r){var i,s,o,u;for(;;){s=r.nhd,i=r.ts_next,o=i.nhd,r.type!=i.type?i.type!=e.REST&&(i=r,r=i.ts_next):r.type==e.REST?r.invis&&!i.invis&&delete r.invis:n.call(this,r,i),i.a_gch&&(r.a_gch=i.a_gch),i.a_dd&&(r.a_dd?r.a_dd=r.a_dd.concat(i.a_dd):r.a_dd=i.a_dd),this.unlksym(i);if(r.in_tuplet||!t.call(this,r))break}}var e=abc2svg.C,i,s,o,u,a;for(i=this.get_tsfirst();i;i=i.ts_next){switch(i.type){case e.REST:if(i.combine==undefined||i.combine<0)continue;t.call(this,i)&&r.call(this,i);continue;default:continue;case e.NOTE:if(i.combine==undefined||i.combine<=0)continue}if(!i.beam_st)continue;if(i.beam_end){t.call(this,i)&&r.call(this,i);continue}s=i;for(;;){if(!t.call(this,s)){s=null;break}if(s.beam_end)break;do s=s.next;while(s.type!=e.NOTE&&s.type!=e.REST)}if(!s)continue;s=i;for(;;){r.call(this,s);if(s.beam_end)break;do s=s.next;while(s.type!=e.NOTE&&s.type!=e.REST)}}},do_pscom:function(e,t){t.slice(0,13)=="voicecombine "?this.set_v_param("combine",t.split(/[ \t]/)[1]):e(t)},new_note:function(e,t,n){var r=this.get_curvoice(),i=e(t,n);return i&&i.notes&&r.combine!=undefined&&(i.combine=r.combine),i},set_stem_dir:function(e){e(),abc2svg.combine.comb_v.call(this)},set_vp:function(e,t){var n,r=this.get_curvoice();for(n=0;n<t.length;n++)if(t[n]=="combine="){r.combine=t[n+1];break}e(t)},set_hooks:function(e){e.do_pscom=abc2svg.combine.do_pscom.bind(e,e.do_pscom),e.new_note=abc2svg.combine.new_note.bind(e,e.new_note),e.set_stem_dir=abc2svg.combine.set_stem_dir.bind(e,e.set_stem_dir),e.set_vp=abc2svg.combine.set_vp.bind(e,e.set_vp)}},abc2svg.modules.hooks.push(abc2svg.combine.set_hooks),abc2svg.modules.voicecombine.loaded=!0,abc2svg.diag={do_diag:function(){var e=this.get_glyphs(),t=this.get_voice_tb();if(!e.fb){var n,r,i,s=this.get_decos();ns="CDEFGAB",ms=["","m","7","m7","maj7","sus4"],this.add_style("\n.diag {font:6px sans-serif}\n.frn {font:italic 7px sans-serif}");for(n=0;n<ns.length;n++)for(r=0;r<ms.length;r++)i=ns[n]+ms[r],s[i]="3 "+i+" 40 0 0";for(r=0;r<ms.length;r++)i="F♯"+ms[r],s[i]="3 F#"+ms[r]+" 40 0 0";e.fb='<g id="fb">\n<path class="stroke" stroke-width="0.4" d="M-10 -34h20m0 6h-20m0 6h20m0 6h-20m0 6h20"/>\n<path class="stroke" stroke-width="0.5" d="M-10 -34v24m4 0v-24m4 0v24m4 0v-24m4 0v24m4 0v-24"/>\n</g>',e.nut='<path id="nut" class="stroke" stroke-width="1.6" d="M-10.2 -34.5h20.4"/>',e.barre='<path id="barre" class="stroke" stroke-width=".9" d="M-10.2 -31h20.4"/>',e.fr1='<text id="fr1" x="-20" y="-29" class="frn">fr1</text>',e.fr2='<text id="fr2" x="-20" y="-29" class="frn">fr2</text>',e.fr3='<text id="fr3" x="-20" y="-29" class="frn">fr3</text>',e.ddot='<circle id="ddot" class="fill" r="1.5"/>',e.C='<g id="C">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-3,4" y="-36" class="diag">321</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Cm='<g id="Cm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">342</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n</g>',e.C7='<g id="C7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0,4" y="-36" class="diag">3241</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Cm7='<g id="Cm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-12,-4,4" y="-36" class="diag">x32</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n</g>',e.Cmaj7='<g id="Cmaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,-4" y="-36" class="diag">x21</text>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Csus4='<g id="Csus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4" y="-36" class="diag">x34</text>\n<use x="6" y="-13" xlink:href="#ddot"/>\n<use x="2" y="-19" xlink:href="#ddot"/>\n</g>',e.D='<g id="D">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4,8" y="-36" class="diag">x132</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.Dm='<g id="Dm">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4,8" y="-36" class="diag">x231</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="10" y="-31" xlink:href="#ddot"/>\n</g>',e.D7='<g id="D7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4,8" y="-36" class="diag">x312</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Dm7='<g id="Dm7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,0,4,8" y="-36" class="diag">xx211</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="10" y="-31" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Dmaj7='<g id="Dmaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,0,4,8" y="-36" class="diag">xx123</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.Dsus4='<g id="Dsus4">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,0,4,8" y="-36" class="diag">xx123</text>\n<use x="10" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.E='<g id="E">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">231</text>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-31" xlink:href="#ddot"/>\n</g>',e.Em='<g id="Em">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">23</text>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.E7='<g id="E7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,0" y="-36" class="diag">21</text>\n<use x="2" y="-31" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Em7='<g id="Em7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">1</text>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Emaj7='<g id="Emaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">312</text>\n<use x="2" y="-31" xlink:href="#ddot"/>\n<use x="-2" y="-31" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Esus4='<g id="Esus4">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">12</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.F='<g id="F">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">342</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.Fm='<g id="Fm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">34</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.F7='<g id="F7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,0" y="-36" class="diag">32</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Fm7='<g id="Fm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">3</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Fmaj7='<g id="Fmaj7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">423</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Fsus4='<g id="Fsus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">34</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e["F#"]='<g id="F#">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">342</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e["F#m"]='<g id="F#m">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">34</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#7"]='<g id="F#7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,0" y="-36" class="diag">32</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#m7"]='<g id="F#m7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">3</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#maj7"]='<g id="F#maj7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">423</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#sus4"]='<g id="F#sus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">34</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.G='<g id="G">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,8" y="-36" class="diag">234</text>\n<use x="10" y="-19" xlink:href="#ddot"/>\n<use x="-10" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Gm='<g id="Gm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">34</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.G7='<g id="G7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,8" y="-36" class="diag">321</text>\n<use x="-10" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="10" y="-31" xlink:href="#ddot"/>\n</g>',e.Gm7='<g id="Gm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">3</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Gmaj7='<g id="Gmaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,8" y="-36" class="diag">312</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="-10" y="-19" xlink:href="#ddot"/>\n</g>',e.Gsus4='<g id="Gsus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">34</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.A='<g id="A">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">234</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Am='<g id="Am">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">231</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.A7='<g id="A7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,4" y="-36" class="diag">23</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Am7='<g id="Am7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,4" y="-36" class="diag">21</text>\n<use x="6" y="-31" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Amaj7='<g id="Amaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-4,0,4" y="-36" class="diag">x213</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-31" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Asus4='<g id="Asus4">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4" y="-36" class="diag">x12</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.B='<g id="B">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">234</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.Bm='<g id="Bm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">341</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.B7='<g id="B7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,-4,0,8" y="-36" class="diag">x2134</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-31" xlink:href="#ddot"/>\n</g>',e.Bm7='<g id="Bm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,8" y="-36" class="diag">x32</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n</g>',e.Bmaj7='<g id="Bmaj7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-12,-4,0,4" y="-36" class="diag">x324</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.Bsus4='<g id="Bsus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4" y="-36" class="diag">x34</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>'}var o,n,u,a;for(o=t[0].sym;o;o=o.next){if(!o.a_gch)continue;for(n=0;n<o.a_gch.length;n++){u=o.a_gch[n];if(!u||u.type!="g"||u.capo)continue;a=u.otext||u.text,this.deco_cnv(a.split(/[ \t/]/,1),o,null)}}},output_music:function(e){this.cfmt().diag&&abc2svg.diag.do_diag.call(this),e()},set_fmt:function(e,t,n,r){if(t=="diagram"){this.cfmt().diag=n;return}e(t,n,r)},set_hooks:function(e){e.output_music=abc2svg.diag.output_music.bind(e,e.output_music),e.set_format=abc2svg.diag.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.diag.set_hooks),abc2svg.modules.diagram.loaded=!0,abc2svg.grid={do_grid:function(){function a(t){var n=e.BLEN/4;return!t.a_meter[0]||t.a_meter[0].top[0]=="C"||!t.a_meter[0].bot?n:(n=e.BLEN/t.a_meter[0].bot[0]|0,t.a_meter[0].bot[0]==8&&t.a_meter[0].top[0]%3==0&&(n=e.BLEN/8*3),n)}function f(e,t,n,a){function C(){var t,n,r="-";for(t=0;t<e.length;t++){n=e[t],n[0]||(n[0]=r);if(n.length==0)continue;if(n.length==1){r=n[0];continue}if(n.length==2){n[2]=n[1],r=n[2];continue}if(n.length==3){r=n[2];continue}n[2]||(n[2]=n[1]||n[0]),r=n[3]}}var f,l,c,h,p,d,v,m,g,y,b,w,E,S="",x="",T=[],N=u.n;C();if(!u.ls)T=e;else{v=t,t=[];for(f=0;f<u.ls.length;f++){h=u.ls[f],h.indexOf("-")<0?h=[h,h]:h=h.split("-");for(c=h[0]-1;c<h[1];c++){if(!e[c])break;T.push(e[c]),t.push(v[c])}}}N<0&&(N=-N),N<3&&(N=T.length%6==0?6:8),N>T.length&&(N=T.length),p=(T.length+N-1)/N|0,g=n.size*2,a<g*1.4&&(a=g*1.4),m=a*N,m>r.width&&(N/=2,p*=2,m/=2),d='<svg xmlns="http://www.w3.org/2000/svg" version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n color="black" width="'+r.width.toFixed(0)+'px" height="'+(g*p+6).toFixed(0)+'px"',f=o.bgcolor,f&&(d+=' style="background-color: '+f+'"'),d+='>\n<style type="text/css">\n.mid {text-anchor:middle}\n',o.fullsvg&&(d+=".stroke {stroke: currentColor; fill: none}\n."+i+" {"+this.style_font(n.name+"."+n.size)+"}\n"),d+="</style>\n",d+='<path class="stroke" d="\n',y=(r.width-m)/2,w=1;for(l=0;l<=p;l++)d+="M"+y.toFixed(2)+" "+w.toFixed(2)+"h"+m.toFixed(2)+"\n",w+=g;b=y;for(f=0;f<=N;f++)d+="M"+b.toFixed(2)+" 1v"+(g*p).toFixed(2)+"\n",b+=a;d+='"/>\n',w=1-g/2+n.size*.3,E=1;for(f=0;f<T.length;f++)S=T[f],f%N==0&&(w+=g,E+=g,b=y+a/2),S.length>1?(d+='<path class="stroke" stroke-width="1" d="M'+(b-a/2).toFixed(2)+" "+E.toFixed(2)+"l"+a.toFixed(2)+" -"+g.toFixed(2)+'"/>\n',S[1]?(d+='<path class="stroke" stroke-width="1" d="M'+(b-a/2).toFixed(2)+" "+(E-g).toFixed(2)+"l"+(a/2).toFixed(2)+" "+(g/2).toFixed(2)+'"/>\n',d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b-a/3).toFixed(2)+'" y="'+w.toFixed(2)+'">'+S[0]+"</text>\n",d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+b.toFixed(2)+'" y="'+(w-g/3).toFixed(2)+'">'+S[1]+"</text>\n"):d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b-a*.2).toFixed(2)+'" y="'+(w-g/4).toFixed(2)+'">'+S[0]+"</text>\n",S.length>=3&&(S[3]?(d+='<path class="stroke" stroke-width="1" d="M'+b.toFixed(2)+" "+(E-g/2).toFixed(2)+"l"+(a/2).toFixed(2)+" "+(g/2).toFixed(2)+'"/>\n',d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+b.toFixed(2)+'" y="'+(w+g/3).toFixed(2)+'">'+S[2]+"</text>\n",d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b+a/3).toFixed(2)+'" y="'+w.toFixed(2)+'">'+S[3]+"</text>\n"):d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b+a*.2).toFixed(2)+'" y="'+(w+g/4).toFixed(2)+'">'+S[2]+"</text>\n")):d+='<text class="'+s+'" x="'+b.toFixed(2)+'" y="'+w.toFixed(2)+'">'+S[0]+"</text>\n",b+=a;w=1-g/2+n.size*.3,b=y;for(f=0;f<t.length;f++)v=t[f],v[0]==":"&&(d+='<text class="'+s+'" x="'+(b-5).toFixed(2)+'" y="'+w.toFixed(2)+'" style="font-weight:bold;font-size:'+(n.size+2).toFixed(2)+'">:</text>\n'),f%N==0&&(w+=g,b=y),v[v.length-1]==":"&&(d+='<text class="'+s+'" x="'+(b+5).toFixed(2)+'" y="'+w.toFixed(2)+'" style="font-weight:bold;font-size:'+(n.size+2).toFixed(2)+'">:</text>\n'),b+=a;return d+"</svg>"}var e=abc2svg.C,t=this.get_tsfirst(),n=this.get_voice_tb(),r,i,s,o=this.cfmt(),u=o.grid,l,c,h,p,d,v,m,g,y,b,w,E,S,x=[],T=[],N=[];r=this.get_img(),c=a(n[0].meter),y=n[0].meter.wmeasure,o.gridfont||this.param_set_font("gridfont","serif 16"),g=this.get_font("grid"),i=this.font_class(g),s=i+" mid",this.set_font("grid"),h=d=m=E=0,x.push("|");for(l=n[0].sym;l;l=l.next){while(l.time>h)d<3&&d++,h+=c;switch(l.type){case e.NOTE:case e.REST:if(l.a_gch)for(p=0;p<l.a_gch.length;p++)if(l.a_gch[p].type=="g"){N[d]||(N[d]=l.a_gch[p].text,w=this.strwh(N[d])[0],w>E&&(E=w),m++);break}break;case e.BAR:b=u.norep?"|":l.bar_type;if(l.time<y)N.length?(T.push(N),x.push(b)):x[0]=b;else{if(!l.bar_num)break;T.push(N),x.push(b)}N=[],h=l.time,d=0,b.indexOf(":")&&(S=!0);break;case e.METER:c=a(l),y=l.wmeasure}}if(m==0)return;N.length!=0&&(x.push(""),T.push(N)),E+=this.strwh(S?" ":" ")[0],v=n[this.get_top_v()],l={type:e.BLOCK,subtype:"ml",dur:0,time:0,p_v:v,v:v.v,text:f.call(this,T,x,g,E)};if(o.grid.n<0){for(var C=t;C.ts_next;C=C.ts_next);l.time=C.time,l.prev=v.last_sym,l.ts_prev=C,v.last_sym.next=l,C.ts_next=l}else l.time=0,l.next=v.sym,l.ts_next=t,t.ts_prev=l,t=l,this.set_tsfirst(l),v.sym.prev=l,v.sym=l},output_music:function(e){this.cfmt().grid&&abc2svg.grid.do_grid.call(this),e()},set_fmt:function(e,t,n,r){if(t=="grid"){n||(n="1"),n=n.split(/\s+/);var i=this.cfmt().grid={n:Number(n.shift())};isNaN(i.n)&&(i.n=1);while(n.length){var s=n.shift();s=="norepeat"?i.norep=!0:s.slice(0,8)=="include="&&(i.ls=s.slice(8).split(","))}return}e(t,n,r)},set_hooks:function(e){e.output_music=abc2svg.grid.output_music.bind(e,e.output_music),e.set_format=abc2svg.grid.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.grid.set_hooks),abc2svg.modules.grid.loaded=!0,abc2svg.equalbars={output_music:function(e){this.equalbars_d=0,e()},set_fmt:function(e,t,n,r){t=="equalbars"?this.cfmt().equalbars=this.get_bool(n):e(t,n,r)},set_sym_glue:function(e,t){var n=abc2svg.C,r,i,s,o,u,a,l,c,h,p=[],v=this.get_tsfirst();e(t);if(!this.cfmt().equalbars)return;for(i=v;i;i=i.ts_next){if(!i.seqst)continue;switch(i.type){default:continue;case n.BAR:case n.GRACE:case n.MREST:case n.NOTE:case n.REST:case n.SPACE:}break}if(!i)return;r=i.ts_next,h=c=r.time;for(;;){if(!r.ts_next){p.push([r,r.time-c]),c=r.time,r.dur&&(c+=r.dur);break}r.type==n.BAR&&r.seqst&&(p.push([r,r.time-c]),c=r.time),r=r.ts_next}u=p.length;if(u==0)return;a=i.type==n.GRACE?i.extra.x:i.x,d=this.equalbars_d,d||(d=this.equalbars_d=a),s=(t-d)/(c-h);for(o=0;o<u;o++){r=p[o][0],f=s*p[o][1]/(r.x-a);for(;i!=r;i=i.ts_next)if(i.type==n.GRACE)for(l=i.extra;l;l=l.next)l.x=d+(l.x-a)*f;else i.x&&(i.x=d+(i.x-a)*f);d+=s*p[o][1],a=i.x;for(;;){i.x=d,i=i.ts_next;if(!i||i.seqst)break}if(!i)break}},set_hooks:function(e){e.output_music=abc2svg.equalbars.output_music.bind(e,e.output_music),e.set_format=abc2svg.equalbars.set_fmt.bind(e,e.set_format),e.set_sym_glue=abc2svg.equalbars.set_sym_glue.bind(e,e.set_sym_glue)}},abc2svg.modules.hooks.push(abc2svg.equalbars.set_hooks),abc2svg.modules.equalbars.loaded=!0,abc2svg.perc={do_perc:function(e){function i(e){var i,s,o,u=Number(e);if(isNaN(u)){o=e.match(/^([_^=]*)([A-Ga-g])([,']*)$/);if(o){i="CDEFGABcdefgab".indexOf(o[2])+16;switch(o[3]){case"'":i+=7*o[3].length;break;case",":i-=7*o[3].length}note={pit:i};switch(o[1]){case"^":note.acc=1;break;case"_":note.acc=-1}return note}e=e.toLowerCase(e),o=e[0],i=0;for(;;){s=e.indexOf("-",i);if(s<0)break;i=s+1,o+="-"+e[i]}u=r[o];if(!u)switch(e[0]){case"c":switch(e[1]){case"a":u=r.ca;break;case"l":u=r.cl;break;case"o":u=r.co}break;case"h":case"l":i=e.indexOf("-");if(e[i+1]!="t")break;switch(e[1]){case"i":case"o":u=r[o+e[1]]}}}if(!u)return;return e=(u/12|0)*7-19,u%=12,e+=t[u],note={pit:e},n[u]&&(note.acc=n[u]),note}function s(e){var t=e.match(/^([_^]*)([A-Ga-g])([,']*)$/);if(!t)return;return e.match(/[A-Z]/)&&(e=e.toLowerCase(),e.indexOf("'")>0?e=e.replace("'",""):e+=","),e}var t=new Int8Array([0,0,1,2,2,3,3,4,5,5,6,6]),n=new Int8Array([0,1,0,-1,0,0,1,0,-1,0,-1,0]),r={"a-b-d":35,"a-s":38,"b-d-1":36,ca:69,cl:75,co:56,"c-c":52,"c-c-1":49,"c-c-2":57,"c-h-h":42,"e-s":40,"h-a":67,"h-b":60,"h-c":39,"h-f-t":43,"h-m-t":48,"h-ti":65,"h-to":50,"h-w-b":76,"l-a":68,"l-b":61,"l-c":64,"l-f-t":41,"l-g":74,"l-m-t":47,"l-ti":66,"l-to":45,"l-w":72,"l-w-b":77,m:70,"m-c":78,"m-h-c":62,"m-t":80,"o-c":79,"o-h-c":63,"o-h-h":46,"o-t":81,"p-h-h":44,"r-b":53,"r-c-1":51,"r-c-2":59,"s-c":55,"s-g":73,"s-s":37,"s-w":71,t:54,v:58},o,u,a=this.get_maps(),f=e.split(/\s+/);o=s(f[1]);if(!o){this.syntax(1,this.errs.bad_val,"%%percmap");return}if(this.cfmt().sound!="play"){if(!f[3])return;a.MIDIdrum||(a.MIDIdrum={}),u=i(o);if(!u){this.syntax(1,this.errs.bad_val,"%%percmap");return}delete u.acc,a.MIDIdrum[o]=[[f[3]],u]}else{u=i(f[2]);if(!u){this.syntax(1,this.errs.bad_val,"%%percmap");return}a.MIDIdrum||(a.MIDIdrum={}),a.MIDIdrum[o]=[null,u]}this.set_v_param("perc","MIDIdrum")},set_perc:function(e){var t,n,r=this.get_curvoice();for(t=0;t<e.length;t++)switch(e[t]){case"perc=":r.map||(r.map={}),r.map=e[t+1],r.midictl||(r.midictl={}),r.midictl[0]=1}},do_pscom:function(e,t){t.slice(0,8)=="percmap "?abc2svg.perc.do_perc.call(this,t):e(t)},set_vp:function(e,t){abc2svg.perc.set_perc.call(this,t),e(t)},set_hooks:function(e){e.do_pscom=abc2svg.perc.do_pscom.bind(e,e.do_pscom),e.set_vp=abc2svg.perc.set_vp.bind(e,e.set_vp)}},abc2svg.modules.hooks.push(abc2svg.perc.set_hooks),abc2svg.modules.percmap.loaded=!0,abc2svg.ambitus={do_ambitus:function(){var e=abc2svg.C,t,n,r,i,s,o=this.get_voice_tb();for(n=0;n<o.length;n++){r=o[n];if(r.second)continue;i=100,s=-100;for(t=r.sym;t;t=t.next){if(t.type!=e.NOTE)continue;t.notes[t.nhd].pit>s&&(s=t.notes[t.nhd].pit),t.notes[0].pit<i&&(i=t.notes[0].pit)}if(i==100)continue;t=r.clef,t.stem=1,t.head=e.FULL,t.stemless=!0,t.nhd=1,t.notes=[{dur:e.BLEN/4,pit:i,shhd:0},{dur:e.BLEN/4,pit:s,shhd:0}]}},draw_symbols:function(e,t){var n=this.get_staff_tb(),r=t.sym;r.clef_type!=undefined&&r.nhd>0&&(r.x-=26,this.set_scale(r),this.draw_note(r),r.notes[1].pit-r.notes[0].pit>4&&(this.xypath(r.x,3*(r.notes[1].pit-18)+n[r.st].y),this.out_svg("v"+((r.notes[1].pit-r.notes[0].pit)*3).toFixed(2)+'" stroke-width=".6"/>\n')),r.x+=26,t.clef.nhd=0),e(t)},set_pitch:function(e,t){e(t),!t&&this.cfmt().ambitus&&abc2svg.ambitus.do_ambitus.call(this)},set_fmt:function(e,t,n,r){if(t=="ambitus"){this.cfmt().ambitus=n;return}e(t,n,r)},set_width:function(e,t){t.clef_type!=undefined&&t.nhd>0?(t.wl=40,t.wr=12):e(t)},set_hooks:function(e){e.draw_symbols=abc2svg.ambitus.draw_symbols.bind(e,e.draw_symbols),e.set_pitch=abc2svg.ambitus.set_pitch.bind(e,e.set_pitch),e.set_format=abc2svg.ambitus.set_fmt.bind(e,e.set_format),e.set_width=abc2svg.ambitus.set_width.bind(e,e.set_width)}},abc2svg.modules.hooks.push(abc2svg.ambitus.set_hooks),abc2svg.modules.ambitus.loaded=!0,abc2svg.break={get_break:function(e){var t=abc2svg.C,r,i,s,o,u=e.split(/[ ,]/),a=this.cfmt();a.break||(a.break=[]);for(n=1;n<u.length;n++){r=u[n],i=r.match(/(\d+)([a-z]?)(:\d+\/\d+)?/);if(!i){this.syntax(1,this.errs.bad_val,"%%break");continue}i[2]&&(o=i[2].charCodeAt(0)-97);if(!i[3]){a.break.push({m:i[1],t:0,sq:o});continue}s=i[3].match(/:(\d+)\/(\d+)/);if(!s||s[2]<1){this.syntax(1,"Bad denominator in %%break");continue}a.break.push({m:i[1],t:s[1]*t.BLEN/s[2],sq:o})}},do_break:function(){var e,t,n,r,i,o=this.get_voice_tb();v=this.get_cur_sy().top_voice,s1=o[v].sym,cfmt=this.cfmt();for(e=0;e<cfmt.break.length;e++){r=cfmt.break[e],t=r.m;for(s=s1;s;s=s.next)if(s.bar_num==t)break;if(!s)continue;if(r.sq){i=r.sq;for(s=s.ts_next;s;s=s.ts_next)if(s.bar_num==t&&--i==0)break;if(!s)continue}n=r.t;if(n){n=s.time+n;for(;s;s=s.next)if(s.time>=n)break;if(!s)continue;s=s.prev}s.eoln=!0}},do_pscom:function(e,t){t.slice(0,6)=="break "?abc2svg.break.get_break.call(this,t):e(t)},set_bar_num:function(e){e(),this.cfmt().break&&abc2svg.break.do_break.call(this)},set_hooks:function(e){e.do_pscom=abc2svg.break.do_pscom.bind(e,e.do_pscom),e.set_bar_num=abc2svg.break.set_bar_num.bind(e,e.set_bar_num)}},abc2svg.modules.hooks.push(abc2svg.break.set_hooks),abc2svg.modules.break.loaded=!0,abc2svg.capo={gch_capo:function(e){var t,n,r,i=this.cfmt(),s=i.capo,o=0;for(;;){t=e[o++];if(!t)return;if(t.type=="g")break}n=Object.create(t),n.capo=!1,n.text=this.gch_tr1(n.text,[0,5,-2,3,-4,1,-6,-1,4,-3,2,-5][s%12]),this.capo_first||(this.capo_first=!0,n.text+=" (capo: "+s.toString()+")"),n.font=this.get_font(i.capofont?"capo":"annotation"),e.splice(o,0,n),t.capo=!0},gch_build:function(e,t){var n=this.get_a_gch();this.cfmt().capo&&n&&abc2svg.capo.gch_capo.call(this,n),e(t)},output_music:function(e){this.capo_first=!1,e()},set_fmt:function(e,t,n,r){if(t=="capo"){this.cfmt().capo=n;return}e(t,n,r)},set_hooks:function(e){e.gch_build=abc2svg.capo.gch_build.bind(e,e.gch_build),e.output_music=abc2svg.capo.output_music.bind(e,e.output_music),e.set_format=abc2svg.capo.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.capo.set_hooks),abc2svg.modules.capo.loaded=!0,abc2svg.clip={get_clip:function(e){function n(e){var n,r,i,s=e.match(/(\d+)([a-z]?)(:\d+\/\d+)?/);if(!s)return;s[2]&&(i=s[2].charCodeAt(0)-97);if(!s[3])return{m:s[1],t:0,sq:i};e=s[3].match(/:(\d+)\/(\d+)/);if(!e||e[2]<1)return;return{m:s[1],t:e[1]*t.BLEN/e[2],sq:i}}var t=abc2svg.C,r,i,s=e.split(/[ -]/);if(s.length!=3){this.syntax(1,this.errs.bad_val,"%%clip");return}s[1]?r=n(s[1]):r={m:0,t:0},i=n(s[2]);if(!r||!i){this.syntax(1,this.errs.bad_val,"%%clip");return}this.cfmt().clip=[r,i]},do_clip:function(){function t(t,n){var r,i,s;if(n.m<=1){if(n.m==1){for(r=t;r;r=r.ts_next)if(r.type==e.BAR&&r.time!=0)break;r.time<voice_tb[this.get_cur_sy().top_voice].meter.wmeasure&&(t=r)}}else{for(;t;t=t.ts_next)if(t.type==e.BAR&&t.bar_num>=n.m)break;if(!t)return;if(n.sq){s=n.sq;for(t=t.ts_next;t;t=t.ts_next)if(t.type==e.BAR&&t.bar_num==n.m&&--s==0)break;if(!t)return}}if(n.t==0)return t;i=t.time+n.t;while(t.time<i){t=t.ts_next;if(!t)return t}do t=t.ts_prev;while(!t.seqst);return t}var e=abc2svg.C;voice_tb=this.get_voice_tb(),cfmt=this.cfmt();var n,r,i,s,o;n=this.get_tsfirst();if(cfmt.clip[0].m>0||cfmt.clip[0].t>0){n=t(n,cfmt.clip[0]);if(!n){this.set_tsfirst(null);return}i=this.get_cur_sy();for(r=this.get_tsfirst();r!=n;r=r.ts_next)switch(r.type){case e.CLEF:r.p_v.clef=r;break;case e.KEY:r.p_v.key=this.clone(r.as.u.key);break;case e.METER:r.p_v.meter=this.clone(r.as.u.meter);break;case e.STAVES:i=r.sy,this.set_cur_sy(i)}for(o=0;o<voice_tb.length;o++){s=voice_tb[o];for(r=n;r;r=r.ts_next)if(r.v==o){delete r.prev;break}s.sym=r}this.set_tsfirst(n),delete n.ts_prev}n=t(n,cfmt.clip[1]);if(!n)return;do{n=n.ts_next;if(!n)return}while(!n.seqst);for(o=0;o<voice_tb.length;o++){s=voice_tb[o];for(r=n.ts_prev;r;r=r.ts_prev)if(r.v==o){delete r.next;break}r||(s.sym=null)}delete n.ts_prev.ts_next},do_pscom:function(e,t){t.slice(0,5)=="clip "?abc2svg.clip.get_clip.call(this,t):e(t)},set_bar_num:function(e){e(),this.cfmt().clip&&abc2svg.clip.do_clip.call(this)},set_hooks:function(e){e.do_pscom=abc2svg.clip.do_pscom.bind(e,e.do_pscom),e.set_bar_num=abc2svg.clip.set_bar_num.bind(e,e.set_bar_num)}},abc2svg.modules.hooks.push(abc2svg.clip.set_hooks),abc2svg.modules.clip.loaded=!0,abc2svg.grid2={do_grid:function(){var e,t,n,r=this.get_voice_tb();for(t=0;t<r.length;t++){n=r[t];if(!n.grid2)continue;n.clef.invis=!0,n.key.k_sf=n.key.k_a_acc=0,n.staffnonote=2;for(e=n.sym;e;e=e.next)e.dur&&(e.invis=!0,delete e.sl1,e.ti1=0)}},draw_chosym:function(e){var t,n;this.set_dscale(e.st);for(t=0;t<e.a_gch.length;t++){n=e.a_gch[t];if(n.type!="g")continue;this.use_font(n.font),this.set_font(n.font),this.xy_str(e.x+n.x,n.y+6,n.text)}},draw_gchord:function(e,t,n,r){t.p_v.grid2?abc2svg.grid2.draw_chosym.call(this,t):e(t,n,r)},output_music:function(e){abc2svg.grid2.do_grid.call(this),e()},set_fmt:function(e,t,n,r){if(t=="grid2"){var i=this.get_curvoice();i&&(this.set_v_param("stafflines","..."),i.grid2=n);return}e(t,n,r)},set_hooks:function(e){e.draw_gchord=abc2svg.grid2.draw_gchord.bind(e,e.draw_gchord),e.output_music=abc2svg.grid2.output_music.bind(e,e.output_music),e.set_format=abc2svg.grid2.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.grid2.set_hooks),abc2svg.modules.grid2.loaded=!0,abc2svg.psvg={do_begin_end:function(e,t,n,r){if(t!="ps"){e(t,n,r);return}if(n=="nosvg")return;this.psvg||(this.psvg=new Psvg(this)),this.psvg.ps_eval.call(this.psvg,r)},psdeco:function(e,t,n,r,i){return this.psvg?this.psvg.psdeco.call(this.psvg,t,n,r,i):!1},psxygl:function(e,t,n,r){return this.psvg?this.psvg.psxygl.call(this.psvg,t,n,r):!1},set_hooks:function(e){e.do_begin_end=abc2svg.psvg.do_begin_end.bind(e,e.do_begin_end),e.psdeco=abc2svg.psvg.psdeco.bind(e,e.psdeco),e.psxygl=abc2svg.psvg.psxygl.bind(e,e.psxygl)}},abc2svg.modules.hooks.push(abc2svg.psvg.set_hooks),abc2svg.modules.beginps.loaded=!0,abc2svg.soloffs={set_fmt:function(e,t,n,r){if(t=="soloffs"){var i,s,o=abc2svg.C,u=this.cfmt().soloffs={};n=n.split(/\s+/);while(n.length){i=n.shift().split("="),s=Number(i[1]);if(isNaN(s))continue;switch(i[0]){case"part":u[o.PART]=s+10;break;case"tempo":u[o.TEMPO]=s+16;break;case"space":u[o.SPACE]=s}}return}e(t,n,r)},set_sym_glue:function(e,t){var n,r=abc2svg.C,i=this.get_tsfirst(),s=this.cfmt().soloffs;e(t);if(!s)return;for(n=i;n;n=n.ts_next){if(n.dur)break;s[n.type]!=undefined&&(n.x=s[n.type])}},set_hooks:function(e){e.set_sym_glue=abc2svg.soloffs.set_sym_glue.bind(e,e.set_sym_glue),e.set_format=abc2svg.soloffs.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.soloffs.set_hooks),abc2svg.modules.soloffs.loaded=!0,abc2svg.temper={set_bar_num:function(e){e();if(this.cfmt().temper){var t=this.get_voice_tb()[0];t.temper=new Float32Array(12);for(var n=0;n<12;n++)t.temper[n]=this.cfmt().temper[n]/100}},set_fmt:function(e,t,n,r){if(t=="temperament"){var i=new Float32Array(n.split(/ +/)),s=i.length;if(s==12){while(--s>=0)if(isNaN(parseInt(i[s])))break;if(s<0){this.cfmt().temper=i;return}}this.syntax(1,this.errs.bad_val,"%%temperament");return}e(t,n,r)},set_hooks:function(e){e.set_bar_num=abc2svg.temper.set_bar_num.bind(e,e.set_bar_num),e.set_format=abc2svg.temper.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.temper.set_hooks),abc2svg.modules.temperament.loaded=!0,abc2svg.sth={recal_beam:function(e,t){var n=this.get_staff_tb(),r=n[t.st].y,i=e.s2,s=n[i.st].y;t.sth&&(t.ys=t.sth),i.sth&&(i.ys=i.sth),e.a=(t.ys+r-i.ys-s)/(t.xs-i.xs),e.b=t.ys-t.xs*e.a+r;for(;;){t.ys=e.a*t.xs+e.b-r,t.stem>0?t.ymx=t.ys+2.5:t.ymn=t.ys-2.5,t=t.next;if(t==i)break}},set_sth:function(){var e,t,n,r,i,s=this.get_voice_tb();for(n=0;n<s.length;n++){i=s[n];if(i.sth!=null)continue;r=[];for(e=i.sym;e;e=e.next){e.sth&&(r=e.sth,e.sth=null);if(r.length==0||e.nflags<=-2||e.stemless||!e.beam_st&&!e.beam_end)continue;t=r.shift();if(t=="*")continue;if(t=="|"){for(e=e.next;e;e=e.next)if(e.bar_type)break;continue}t=Number(t);if(isNaN(t)||!t)continue;e.stem>=0?(e.ys=e.y+t,e.ymx=e.ys+2.5|0):(e.ys=e.y-t,e.ymn=e.ys-2.5|0),e.sth=e.ys}}},calculate_beam:function(e,t,n){var r=e(t,n);return r&&t.s2&&(n.sth||t.s2.sth)&&abc2svg.sth.recal_beam.call(this,t,n),r},new_note:function(e,t,n){var r=abc2svg.C,i=e(t,n),s=this.get_curvoice();return s.sth&&i&&i.type==r.NOTE&&(i.sth=s.sth,s.sth=null),i},set_format:function(e,t,n,r){if(t=="sth"){var i=this.get_curvoice();this.parse.state==2&&this.goto_tune(),i&&(i.sth=n.split(/[ \t;-]+/));return}e(t,n,r)},set_stems:function(e){e(),abc2svg.sth.set_sth.call(this)},set_hooks:function(e){e.calculate_beam=abc2svg.sth.calculate_beam.bind(e,e.calculate_beam),e.new_note=abc2svg.sth.new_note.bind(e,e.new_note),e.set_format=abc2svg.sth.set_format.bind(e,e.set_format),e.set_stems=abc2svg.sth.set_stems.bind(e,e.set_stems)}},abc2svg.modules.hooks.push(abc2svg.sth.set_hooks),abc2svg.modules.sth.loaded=!0 function
/plugin/findologicxmlexport/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/
H A DClassCodeGenerator.php40 public function generate($classname, Node\ClassNode $class) function in Prophecy\\Doubler\\Generator\\ClassCodeGenerator
/plugin/findologicxmlexport/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/
H A DGenerator.php547 …public function generate($type, array $methods = null, $mockClassName = '', $callOriginalClone = t… function in PHPUnit_Framework_MockObject_Generator
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Reports/
H A DNotifysend.php150 public function generate( function in PHP_CodeSniffer_Reports_Notifysend
H A DSummary.php104 public function generate( function in PHP_CodeSniffer_Reports_Summary
H A DEmacs.php95 public function generate( function in PHP_CodeSniffer_Reports_Emacs
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/DocGenerators/
H A DHTML.php46 public function generate() function in PHP_CodeSniffer_DocGenerators_HTML

12