diff --git a/Build/JavaScript/AlphaTab.js b/Build/JavaScript/AlphaTab.js index 45a9dcaf7..6c87b2f2c 100644 --- a/Build/JavaScript/AlphaTab.js +++ b/Build/JavaScript/AlphaTab.js @@ -1,5 +1,5 @@ /* - * alphaTab v0.9.1.0 (master) + * alphaTab v0.9.1.0 (develop) * * This file is part of alphaTab. * Copyright © 2018, Daniel Kuschny and Contributors, All rights reserved. @@ -20615,6 +20615,18 @@ alphaTab.model._HarmonicType.HarmonicType_Impl_.toString = function(this1) { alphaTab.model.JsonConverter = $hx_exports["alphaTab"]["model"]["JsonConverter"] = function() { }; alphaTab.model.JsonConverter.__name__ = ["alphaTab","model","JsonConverter"]; +alphaTab.model.JsonConverter.ScoreToJson = function(score) { + var obj = alphaTab.model.JsonConverter.ScoreToJsObject(score); + return JSON.stringify(obj,function(k,v) { + if(ArrayBuffer.isView(v)) { + return Array.apply([], v); + } + return v; + }); +}; +alphaTab.model.JsonConverter.JsonToScore = function(json,settings) { + return alphaTab.model.JsonConverter.JsObjectToScore(alphaTab.model.JsonConverter.JsObjectToScore(JSON.parse(json),settings),null); +}; alphaTab.model.JsonConverter.ScoreToJsObject = function(score) { var score2 = {} alphaTab.model.Score.CopyTo(score,score2); @@ -20750,7 +20762,8 @@ alphaTab.model.JsonConverter.ScoreToJsObject = function(score) { } return score2; }; -alphaTab.model.JsonConverter.JsObjectToScore = function(score,settings) { +alphaTab.model.JsonConverter.JsObjectToScore = function(jsObject,settings) { + var score = jsObject; var score2 = new alphaTab.model.Score(); alphaTab.model.Score.CopyTo(score,score2); alphaTab.model.RenderStylesheet.CopyTo(score.Stylesheet,score2.Stylesheet); @@ -24766,8 +24779,8 @@ alphaTab.platform.javaScript.AlphaTabWorkerScoreRenderer.prototype = { } } ,Render: function(score,trackIndexes) { - score = alphaTab.model.JsonConverter.ScoreToJsObject(score); - this._worker.postMessage({ cmd : "alphaTab.render", score : score, trackIndexes : trackIndexes}); + var jsObject = alphaTab.model.JsonConverter.ScoreToJsObject(score); + this._worker.postMessage({ cmd : "alphaTab.render", score : jsObject, trackIndexes : trackIndexes}); } ,add_PreRender: function(value) { return this.PreRender = system._EventAction1.EventAction1_Impl_.add(this.PreRender,value); diff --git a/Build/JavaScript/AlphaTab.min.js b/Build/JavaScript/AlphaTab.min.js index 8458a02e5..37300adfa 100644 --- a/Build/JavaScript/AlphaTab.min.js +++ b/Build/JavaScript/AlphaTab.min.js @@ -1,5 +1,5 @@ /* - * alphaTab v0.9.1.0 (master) + * alphaTab v0.9.1.0 (develop) * * This file is part of alphaTab. * Copyright © 2018, Daniel Kuschny and Contributors, All rights reserved. @@ -17,4 +17,4 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -!function($hx_exports,$global){"use strict";$hx_exports.alphaTab=$hx_exports.alphaTab||{},$hx_exports.alphaTab.xml=$hx_exports.alphaTab.xml||{},$hx_exports.alphaTab.xml._XmlNodeType=$hx_exports.alphaTab.xml._XmlNodeType||{},$hx_exports.alphaTab.utils=$hx_exports.alphaTab.utils||{},$hx_exports.alphaTab.utils._UnionData=$hx_exports.alphaTab.utils._UnionData||{},$hx_exports.alphaTab.model=$hx_exports.alphaTab.model||{},$hx_exports.alphaTab.model._WhammyType=$hx_exports.alphaTab.model._WhammyType||{},$hx_exports.alphaTab.model._VibratoType=$hx_exports.alphaTab.model._VibratoType||{},$hx_exports.alphaTab.model._TripletFeel=$hx_exports.alphaTab.model._TripletFeel||{},$hx_exports.alphaTab.model._StaffKind=$hx_exports.alphaTab.model._StaffKind||{},$hx_exports.alphaTab.model._SlideType=$hx_exports.alphaTab.model._SlideType||{},$hx_exports.alphaTab.model._SimileMark=$hx_exports.alphaTab.model._SimileMark||{},$hx_exports.alphaTab.model._PickStroke=$hx_exports.alphaTab.model._PickStroke||{},$hx_exports.alphaTab.model._Ottavia=$hx_exports.alphaTab.model._Ottavia||{},$hx_exports.alphaTab.model._NoteAccidentalMode=$hx_exports.alphaTab.model._NoteAccidentalMode||{},$hx_exports.alphaTab.model._Lyrics_LyricsState=$hx_exports.alphaTab.model._Lyrics_LyricsState||{},$hx_exports.alphaTab.model._KeySignatureType=$hx_exports.alphaTab.model._KeySignatureType||{},$hx_exports.alphaTab.model._KeySignature=$hx_exports.alphaTab.model._KeySignature||{},$hx_exports.alphaTab.model._HarmonicType=$hx_exports.alphaTab.model._HarmonicType||{},$hx_exports.alphaTab.model._GraceType=$hx_exports.alphaTab.model._GraceType||{},$hx_exports.alphaTab.model._Fingers=$hx_exports.alphaTab.model._Fingers||{},$hx_exports.alphaTab.model._FermataType=$hx_exports.alphaTab.model._FermataType||{},$hx_exports.alphaTab.model._DynamicValue=$hx_exports.alphaTab.model._DynamicValue||{},$hx_exports.alphaTab.model._Duration=$hx_exports.alphaTab.model._Duration||{},$hx_exports.alphaTab.model._CrescendoType=$hx_exports.alphaTab.model._CrescendoType||{},$hx_exports.alphaTab.model._Clef=$hx_exports.alphaTab.model._Clef||{},$hx_exports.alphaTab.model._BrushType=$hx_exports.alphaTab.model._BrushType||{},$hx_exports.alphaTab.model._BendType=$hx_exports.alphaTab.model._BendType||{},$hx_exports.alphaTab.model._BendStyle=$hx_exports.alphaTab.model._BendStyle||{},$hx_exports.alphaTab.model._AutomationType=$hx_exports.alphaTab.model._AutomationType||{},$hx_exports.alphaTab.model._AccidentalType=$hx_exports.alphaTab.model._AccidentalType||{},$hx_exports.alphaTab.model._AccentuationType=$hx_exports.alphaTab.model._AccentuationType||{},$hx_exports.alphaTab.io=$hx_exports.alphaTab.io||{},$hx_exports.alphaTab.importer=$hx_exports.alphaTab.importer||{},$hx_exports.alphaTab.importer._BinaryStylesheetParser_DataType=$hx_exports.alphaTab.importer._BinaryStylesheetParser_DataType||{},$hx_exports.alphaTab.importer._AlphaTexSymbols=$hx_exports.alphaTab.importer._AlphaTexSymbols||{},$hx_exports.alphaTab.exporter=$hx_exports.alphaTab.exporter||{},$hx_exports.alphaTab.collections=$hx_exports.alphaTab.collections||{},$hx_exports.alphaTab.collections._StringBuilder=$hx_exports.alphaTab.collections._StringBuilder||{},$hx_exports.alphaTab.collections._FastList=$hx_exports.alphaTab.collections._FastList||{},$hx_exports.alphaTab.collections._FastDictionary=$hx_exports.alphaTab.collections._FastDictionary||{},$hx_exports.alphaTab._FingeringMode=$hx_exports.alphaTab._FingeringMode||{},$hx_exports.alphaTab.rendering=$hx_exports.alphaTab.rendering||{},$hx_exports.alphaTab.rendering.staves=$hx_exports.alphaTab.rendering.staves||{},$hx_exports.alphaTab.rendering.utils=$hx_exports.alphaTab.rendering.utils||{},$hx_exports.alphaTab.rendering.utils._BeamDirection=$hx_exports.alphaTab.rendering.utils._BeamDirection||{},$hx_exports.alphaTab.rendering._EffectBarGlyphSizing=$hx_exports.alphaTab.rendering._EffectBarGlyphSizing||{},$hx_exports.alphaTab.rendering.glyphs=$hx_exports.alphaTab.rendering.glyphs||{},$hx_exports.alphaTab.rendering.glyphs._TripletFeelGlyph_BarType=$hx_exports.alphaTab.rendering.glyphs._TripletFeelGlyph_BarType||{},$hx_exports.alphaTab.rendering.glyphs._MusicFontSymbol=$hx_exports.alphaTab.rendering.glyphs._MusicFontSymbol||{},$hx_exports.alphaTab.rendering._BeatXPosition=$hx_exports.alphaTab.rendering._BeatXPosition||{},$hx_exports.alphaTab.rendering.effects=$hx_exports.alphaTab.rendering.effects||{},$hx_exports.alphaTab.rendering.layout=$hx_exports.alphaTab.rendering.layout||{},$hx_exports.alphaTab.rendering.layout._HeaderFooterElements=$hx_exports.alphaTab.rendering.layout._HeaderFooterElements||{},$hx_exports.alphaTab.audio=$hx_exports.alphaTab.audio||{},$hx_exports.alphaTab.audio.generator=$hx_exports.alphaTab.audio.generator||{},$hx_exports.alphaTab.audio.synth=$hx_exports.alphaTab.audio.synth||{},$hx_exports.alphaTab.audio.synth.sf2=$hx_exports.alphaTab.audio.synth.sf2||{},$hx_exports.alphaTab.audio.synth.sf2.chunks=$hx_exports.alphaTab.audio.synth.sf2.chunks||{},$hx_exports.alphaTab.audio.synth.sf2._TransformEnum=$hx_exports.alphaTab.audio.synth.sf2._TransformEnum||{},$hx_exports.alphaTab.audio.synth.sf2._SourceTypeEnum=$hx_exports.alphaTab.audio.synth.sf2._SourceTypeEnum||{},$hx_exports.alphaTab.audio.synth.sf2._SFSampleLink=$hx_exports.alphaTab.audio.synth.sf2._SFSampleLink||{},$hx_exports.alphaTab.audio.synth.sf2._PolarityEnum=$hx_exports.alphaTab.audio.synth.sf2._PolarityEnum||{},$hx_exports.alphaTab.audio.synth.sf2._GeneratorEnum=$hx_exports.alphaTab.audio.synth.sf2._GeneratorEnum||{},$hx_exports.alphaTab.audio.synth.sf2._DirectionEnum=$hx_exports.alphaTab.audio.synth.sf2._DirectionEnum||{},$hx_exports.alphaTab.audio.synth.midi=$hx_exports.alphaTab.audio.synth.midi||{},$hx_exports.alphaTab.audio.synth.midi.event=$hx_exports.alphaTab.audio.synth.midi.event||{},$hx_exports.alphaTab.audio.synth.midi.event._SystemCommonTypeEnum=$hx_exports.alphaTab.audio.synth.midi.event._SystemCommonTypeEnum||{},$hx_exports.alphaTab.audio.synth.midi.event._MidiEventType=$hx_exports.alphaTab.audio.synth.midi.event._MidiEventType||{},$hx_exports.alphaTab.audio.synth.midi.event._MetaEventTypeEnum=$hx_exports.alphaTab.audio.synth.midi.event._MetaEventTypeEnum||{},$hx_exports.alphaTab.audio.synth.midi.event._ControllerType=$hx_exports.alphaTab.audio.synth.midi.event._ControllerType||{},$hx_exports.alphaTab.audio.synth._PlayerState=$hx_exports.alphaTab.audio.synth._PlayerState||{},$hx_exports.alphaTab.audio.synth.ds=$hx_exports.alphaTab.audio.synth.ds||{},$hx_exports.alphaTab.audio.synth.ds._SampleArray=$hx_exports.alphaTab.audio.synth.ds._SampleArray||{},$hx_exports.alphaTab.audio.synth.bank=$hx_exports.alphaTab.audio.synth.bank||{},$hx_exports.alphaTab.audio.synth.bank.patch=$hx_exports.alphaTab.audio.synth.bank.patch||{},$hx_exports.alphaTab.audio.synth.bank.patch._IntervalType=$hx_exports.alphaTab.audio.synth.bank.patch._IntervalType||{},$hx_exports.alphaTab.audio.synth.bank.descriptors=$hx_exports.alphaTab.audio.synth.bank.descriptors||{},$hx_exports.alphaTab.audio.synth.bank.descriptors._Waveform=$hx_exports.alphaTab.audio.synth.bank.descriptors._Waveform||{},$hx_exports.alphaTab.audio.synth.bank.components=$hx_exports.alphaTab.audio.synth.bank.components||{},$hx_exports.alphaTab.audio.synth.bank.components._PanFormulaEnum=$hx_exports.alphaTab.audio.synth.bank.components._PanFormulaEnum||{},$hx_exports.alphaTab.audio.synth.bank.components._LfoState=$hx_exports.alphaTab.audio.synth.bank.components._LfoState||{},$hx_exports.alphaTab.audio.synth.bank.components._FilterType=$hx_exports.alphaTab.audio.synth.bank.components._FilterType||{},$hx_exports.alphaTab.audio.synth.bank.components._EnvelopeState=$hx_exports.alphaTab.audio.synth.bank.components._EnvelopeState||{},$hx_exports.alphaTab.audio.synth.bank.components.generators=$hx_exports.alphaTab.audio.synth.bank.components.generators||{},$hx_exports.alphaTab.audio.synth.bank.components.generators._LoopMode=$hx_exports.alphaTab.audio.synth.bank.components.generators._LoopMode||{},$hx_exports.alphaTab.audio.synth.bank.components.generators._GeneratorState=$hx_exports.alphaTab.audio.synth.bank.components.generators._GeneratorState||{},$hx_exports.alphaTab.audio.synth.util=$hx_exports.alphaTab.audio.synth.util||{},$hx_exports.alphaTab.audio.synth.synthesis=$hx_exports.alphaTab.audio.synth.synthesis||{},$hx_exports.alphaTab.audio.synth.synthesis._VoiceStateEnum=$hx_exports.alphaTab.audio.synth.synthesis._VoiceStateEnum||{},$hx_exports.alphaTab.util=$hx_exports.alphaTab.util||{},$hx_exports.alphaTab.util._LogLevel=$hx_exports.alphaTab.util._LogLevel||{},$hx_exports.alphaTab.platform=$hx_exports.alphaTab.platform||{},$hx_exports.alphaTab.platform.javaScript=$hx_exports.alphaTab.platform.javaScript||{},$hx_exports.alphaTab.platform.model=$hx_exports.alphaTab.platform.model||{},$hx_exports.alphaTab.platform.model._TextBaseline=$hx_exports.alphaTab.platform.model._TextBaseline||{},$hx_exports.alphaTab.platform.model._TextAlign=$hx_exports.alphaTab.platform.model._TextAlign||{},$hx_exports.alphaTab.platform.model._FontStyle=$hx_exports.alphaTab.platform.model._FontStyle||{},$hx_exports.alphaTab.platform.svg=$hx_exports.alphaTab.platform.svg||{},$hx_exports.alphaTab.platform.svg._SupportedFonts=$hx_exports.alphaTab.platform.svg._SupportedFonts||{},$hx_exports.alphaTab._DisplayMode=$hx_exports.alphaTab._DisplayMode||{};var $estr=function(){return js.Boot.__string_rec(this,"")};function $extend(from,fields){function Inherit(){}Inherit.prototype=from;var proto=new Inherit;for(var name in fields)proto[name]=fields[name];return fields.toString!==Object.prototype.toString&&(proto.toString=fields.toString),proto}var EReg=function(r,opt){this.r=new RegExp(r,opt.split("u").join(""))};EReg.__name__=["EReg"],EReg.prototype={match:function(s){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(s),this.r.s=s,null!=this.r.m},matched:function(n){if(null!=this.r.m&&n>=0&&n=start.length&&HxOverrides.substr(s,0,start.length)==start},StringTools.endsWith=function(s,end){var elen=end.length,slen=s.length;return slen>=elen&&HxOverrides.substr(s,slen-elen,elen)==end},StringTools.isSpace=function(s,pos){var c=HxOverrides.cca(s,pos);return c>8&&c<14||32==c},StringTools.ltrim=function(s){for(var l=s.length,r=0;r0?HxOverrides.substr(s,r,l-r):s},StringTools.rtrim=function(s){for(var l=s.length,r=0;r0?HxOverrides.substr(s,0,l-r):s},StringTools.trim=function(s){return StringTools.ltrim(StringTools.rtrim(s))},StringTools.replace=function(s,sub,by){return s.split(sub).join(by)};var Type=function(){};Type.__name__=["Type"],Type.getClassName=function(c){var a=c.__name__;return null==a?null:a.join(".")};var system={};system.Exception=function(){},system.Exception.__name__=["system","Exception"],system.Exception.prototype={Exception_CsString:function(message){return this.Message=message,this},__class__:system.Exception};var alphaTab={};alphaTab.AlphaTabException=$hx_exports.alphaTab.AlphaTabException=function(){system.Exception.call(this)},alphaTab.AlphaTabException.__name__=["alphaTab","AlphaTabException"],alphaTab.AlphaTabException.__super__=system.Exception,alphaTab.AlphaTabException.prototype=$extend(system.Exception.prototype,{AlphaTabException:function(message){return this.Exception_CsString(message),this},__class__:alphaTab.AlphaTabException}),alphaTab._DisplayMode={},alphaTab._DisplayMode.DisplayMode_Impl_=$hx_exports.alphaTab._DisplayMode.DisplayMode_Impl_={},alphaTab._DisplayMode.DisplayMode_Impl_.__name__=["alphaTab","_DisplayMode","DisplayMode_Impl_"],alphaTab._DisplayMode.DisplayMode_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.toString=function(this1){switch(this1){case 0:return"GuitarPro";case 1:return"SongBook"}return""},alphaTab.platform={},alphaTab.platform.IPathCanvas=$hx_exports.alphaTab.platform.IPathCanvas=function(){},alphaTab.platform.IPathCanvas.__name__=["alphaTab","platform","IPathCanvas"],alphaTab.platform.IPathCanvas.prototype={__class__:alphaTab.platform.IPathCanvas},alphaTab.platform.ICanvas=$hx_exports.alphaTab.platform.ICanvas=function(){},alphaTab.platform.ICanvas.__name__=["alphaTab","platform","ICanvas"],alphaTab.platform.ICanvas.__interfaces__=[alphaTab.platform.IPathCanvas],alphaTab.platform.ICanvas.prototype={__class__:alphaTab.platform.ICanvas},alphaTab.platform.svg={},alphaTab.platform.svg.SvgCanvas=$hx_exports.alphaTab.platform.svg.SvgCanvas=function(){this.Buffer=null,this._currentPath=null,this._currentPathIsEmpty=!1,this.set_Color(null),this.set_LineWidth(0),this.set_Font(null),this.set_TextAlign(0),this.set_TextBaseline(0),this.set_Resources(null);this._currentPath="",this._currentPathIsEmpty=!0,this.set_Color(new alphaTab.platform.model.Color(255,255,255,255)),this.set_LineWidth(1),this.set_Font(new alphaTab.platform.model.Font("Arial",10,0)),this.set_TextAlign(0),this.set_TextBaseline(0)},alphaTab.platform.svg.SvgCanvas.__name__=["alphaTab","platform","svg","SvgCanvas"],alphaTab.platform.svg.SvgCanvas.__interfaces__=[alphaTab.platform.IPathCanvas,alphaTab.platform.ICanvas],alphaTab.platform.svg.SvgCanvas.prototype={get_Color:function(){return this.__Color},set_Color:function(value){return this.__Color=value},get_LineWidth:function(){return this.__LineWidth},set_LineWidth:function(value){return this.__LineWidth=value},get_Font:function(){return this.__Font},set_Font:function(value){return this.__Font=value},get_TextAlign:function(){return this.__TextAlign},set_TextAlign:function(value){return this.__TextAlign=value},get_TextBaseline:function(){return this.__TextBaseline},set_TextBaseline:function(value){return this.__TextBaseline=value},get_Resources:function(){return this.__Resources},set_Resources:function(value){return this.__Resources=value},BeginRender:function(width,height){this.Buffer="",this.Buffer+=Std.string('\n');this._currentPath="",this._currentPathIsEmpty=!0},BeginGroup:function(identifier){this.Buffer+=Std.string('')},EndGroup:function(){this.Buffer+=Std.string("")},EndRender:function(){return this.Buffer+=Std.string(""),this.Buffer},FillRect:function(x,y,w,h){if(w>0){var s='\n';this.Buffer+=Std.string(s)}},StrokeRect:function(x,y,w,h){var s='\n')},BeginPath:function(){},ClosePath:function(){this._currentPath+=Std.string(" z")},MoveTo:function(x,y){this._currentPath+=Std.string(" M"+(x-0)+","+(y-0))},LineTo:function(x,y){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" L"+(x-0)+","+(y-0))},QuadraticCurveTo:function(cpx,cpy,x,y){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" Q"+cpx+","+cpy+","+x+","+y)},BezierCurveTo:function(cp1x,cp1y,cp2x,cp2y,x,y){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" C"+cp1x+","+cp1y+","+cp2x+","+cp2y+","+x+","+y)},FillCircle:function(x,y,radius){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" M"+(x-radius)+","+y+" A1,1 0 0,0 "+(x+radius)+","+y+" A1,1 0 0,0 "+(x-radius)+","+y+" z"),this.Fill()},Fill:function(){if(!this._currentPathIsEmpty){if(this.Buffer+=Std.string('')}this._currentPath="",this._currentPathIsEmpty=!0},Stroke:function(){if(!this._currentPathIsEmpty){var s='"+text+"",this.Buffer+=Std.string(s)}},GetSvgTextAlignment:function(){switch(this.get_TextAlign()){case 0:return"start";case 1:return"middle";case 2:return"end"}return""},GetSvgBaseLine:function(){switch(this.get_TextBaseline()){case 0:return"hanging";case 1:return"middle";case 2:return"bottom";default:return""}},MeasureText:function(text){if(null==text||0==text.length)return 0;var font=1;return-1!=this.get_Font().Family.indexOf("Times")&&(font=0),alphaTab.platform.svg.FontSizes.MeasureString(text,font,this.get_Font().Size,this.get_Font().Style)},FillMusicFontSymbol:function(x,y,scale,symbol){throw new js._Boot.HaxeError("abstract")},FillMusicFontSymbols:function(x,y,scale,symbols){throw new js._Boot.HaxeError("abstract")},OnPreRender:function(){return null},OnRenderFinished:function(){return null},BeginRotate:function(centerX,centerY,angle){this.Buffer+=Std.string('')},EndRotate:function(){this.Buffer+=Std.string("")},__class__:alphaTab.platform.svg.SvgCanvas},alphaTab.platform.svg.CssFontSvgCanvas=$hx_exports.alphaTab.platform.svg.CssFontSvgCanvas=function(){alphaTab.platform.svg.SvgCanvas.call(this)},alphaTab.platform.svg.CssFontSvgCanvas.__name__=["alphaTab","platform","svg","CssFontSvgCanvas"],alphaTab.platform.svg.CssFontSvgCanvas.__super__=alphaTab.platform.svg.SvgCanvas,alphaTab.platform.svg.CssFontSvgCanvas.prototype=$extend(alphaTab.platform.svg.SvgCanvas.prototype,{FillMusicFontSymbol:function(x,y,scale,symbol){if(-1!=symbol){var s='&#"+symbol+";")}},FillMusicFontSymbols:function(x,y,scale,symbols){for(var s="",symbol=HxOverrides.iter(symbols);symbol.hasNext();){var symbol1=symbol.next();-1!=symbol1&&(s=s+"&#"+symbol1+";")}var s1='"+s+"")},__class__:alphaTab.platform.svg.CssFontSvgCanvas}),alphaTab.platform.model={},alphaTab.platform.model.Color=$hx_exports.alphaTab.platform.model.Color=function(r,g,b,a){null==a&&(a=255),this.Raw=0,this.RGBA=null,this.Raw=a<<24|r<<16|g<<8|b,255==this.get_A()?this.RGBA="#"+alphaTab.platform.Platform.ToHexString(this.get_R(),2)+alphaTab.platform.Platform.ToHexString(this.get_G(),2)+alphaTab.platform.Platform.ToHexString(this.get_B(),2):this.RGBA="rgba("+this.get_R()+","+this.get_G()+","+this.get_B()+","+this.get_A()/255+")"},alphaTab.platform.model.Color.__name__=["alphaTab","platform","model","Color"],alphaTab.platform.model.Color.Random=function(opacity){return null==opacity&&(opacity=100),new alphaTab.platform.model.Color(system.Convert.ToUInt8(alphaTab.platform.Platform.Random(255)),system.Convert.ToUInt8(alphaTab.platform.Platform.Random(255)),system.Convert.ToUInt8(alphaTab.platform.Platform.Random(255)),opacity)},alphaTab.platform.model.Color.prototype={get_A:function(){return system.Convert.ToUInt8(this.Raw>>24&255)},get_R:function(){return system.Convert.ToUInt8(this.Raw>>16&255)},get_G:function(){return system.Convert.ToUInt8(this.Raw>>8&255)},get_B:function(){return system.Convert.ToUInt8(255&this.Raw)},__class__:alphaTab.platform.model.Color},alphaTab.platform.Platform=$hx_exports.alphaTab.platform.Platform=function(){},alphaTab.platform.Platform.__name__=["alphaTab","platform","Platform"],alphaTab.platform.Platform.ParseFloat=function(s){return parseFloat(s)},alphaTab.platform.Platform.GetCallerName=function(){return arguments.callee.caller.caller.name},alphaTab.platform.Platform.Log=function(logLevel,category,msg,details){msg="[AlphaTab]["+category+"] "+msg;var $console=$global.console;switch(logLevel){case 0:break;case 1:msg="[Debug]"+msg,$console.debug(msg,details);break;case 2:msg="[Info]"+msg,$console.info(msg,details);break;case 3:$console.warn(msg,details);break;case 4:var stack=haxe.CallStack.toString(haxe.CallStack.callStack());$console.error(msg,stack,details)}},alphaTab.platform.Platform.NewObject=function(){return{}},alphaTab.platform.Platform.JsonExists=function(json,property){return json&&property in json},alphaTab.platform.Platform.JsonKeys=function(json){return Object.keys(json)},alphaTab.platform.Platform.Log2=function(f){return Math.log2(f)},alphaTab.platform.Platform.ParseInt=function(s){var val=parseInt(s);return isNaN(val)?-2147483648:val},alphaTab.platform.Platform.CloneArray=function(array){return new Int32Array(array)},alphaTab.platform.Platform.BlockCopy=function(src,srcOffset,dst,dstOffset,count){dst.set(src.subarray(srcOffset,srcOffset+count),dstOffset)},alphaTab.platform.Platform.StringFromCharCode=function(c){return String.fromCharCode(c)},alphaTab.platform.Platform.ReadSignedByte=function(readable){var n=readable.ReadByte();return n>=128?system.Convert.ToInt8(n-256):system.Convert.ToInt8(n)},alphaTab.platform.Platform.ToString=function(data){if($global.TextDecoder){var encoding=alphaTab.platform.Platform.DetectEncoding(data);return new TextDecoder(encoding).decode(data)}for(var s="",i=0;i>18)),s+=String.fromCharCode(1023&u|56320)}}return s},alphaTab.platform.Platform.DetectEncoding=function(data){return 254==data[0]&&255==data[1]?"utf-16be":255==data[0]&&254==data[1]?"utf-16le":0==data[0]&&0==data[1]&&254==data[2]&&255==data[3]?"utf-32be":255==data[0]&&254==data[1]&&0==data[2]&&0==data[3]?"utf-32le":"utf-8"},alphaTab.platform.Platform.StringToByteArray=function(contents){for(var byteArray=new Uint8Array(contents.length),i=0;i=48&&c<=57},alphaTab.platform.Platform.IsWhiteSpace=function(c){return 32==c||11==c||13==c||10==c||9==c},alphaTab.platform.Platform.IsAlmostEqualTo=function(a,b){return Math.abs(a-b)<1e-5},alphaTab.platform.Platform.ToHexString=function(n,digits){null==digits&&(digits=0);for(var s="";;){var this1=system.Convert.ToUInt16(HxOverrides.cca("0123456789ABCDEF",15&n));if(s=String.fromCharCode(this1)+s,!((n>>=4)>0))break}for(;s.length=0){if(v<2147483647.5)return 0|v}else if(v>=-2147483648.5)return 0|v;throw new js._Boot.HaxeError(new system.OverflowException("Value was either too large or too small for a Int32."))},system.Convert.ToInt32_Single=function(v){var this1=v;return system.Convert.ToInt32_Double(this1)},alphaTab.platform.model.Font=$hx_exports.alphaTab.platform.model.Font=function(family,size,style){null==style&&(style=0),this._css=null,this.Family=null,this.Size=0,this.Style=0,this.Family=family,this.Size=size,this.Style=style,this._css=this.ToCssString(1)},alphaTab.platform.model.Font.__name__=["alphaTab","platform","model","Font"],alphaTab.platform.model.Font.prototype={get_IsBold:function(){return 0!=(1&this.Style)},get_IsItalic:function(){return 0!=(2&this.Style)},Clone:function(){return new alphaTab.platform.model.Font(this.Family,this.Size,this.Style)},ToCssString:function(scale){if(null==scale&&(scale=1),null!=this._css&&1==scale)return this._css;var buf="";return this.get_IsBold()&&(buf+=Std.string("bold ")),this.get_IsItalic()&&(buf+=Std.string("italic ")),buf+=Std.string(this.Size*scale),buf+=Std.string("px "),buf+=Std.string("'"),buf+=Std.string(this.Family),buf+=Std.string("'")},__class__:alphaTab.platform.model.Font},alphaTab.platform.javaScript={},alphaTab.platform.javaScript.Html5Canvas=$hx_exports.alphaTab.platform.javaScript.Html5Canvas=function(){this._measureCanvas=null,this._measureContext=null,this._canvas=null,this._context=null,this._color=null,this._font=null,this._musicFont=null,this._lineWidth=0,this.set_Resources(null),this._color=new alphaTab.platform.model.Color(0,0,0,255);var fontElement=window.document.createElement("span");fontElement.classList.add("at"),window.document.body.appendChild(fontElement);var style=window.getComputedStyle(fontElement),family=style.fontFamily;(StringTools.startsWith(family,'"')||StringTools.startsWith(family,"'"))&&(family=HxOverrides.substr(family,1,family.length-2));var s=style.fontSize;this._musicFont=new alphaTab.platform.model.Font(family,parseFloat(s),0),this._measureCanvas=js.Boot.__cast(window.document.createElement("canvas"),HTMLCanvasElement),this._measureCanvas.width=10,this._measureCanvas.height=10,this._measureCanvas.style.width="10px",this._measureCanvas.style.height="10px",this._measureContext=this._measureCanvas.getContext("2d"),this._measureContext.textBaseline="top"},alphaTab.platform.javaScript.Html5Canvas.__name__=["alphaTab","platform","javaScript","Html5Canvas"],alphaTab.platform.javaScript.Html5Canvas.__interfaces__=[alphaTab.platform.ICanvas],alphaTab.platform.javaScript.Html5Canvas.prototype={get_Resources:function(){return this.__Resources},set_Resources:function(value){return this.__Resources=value},OnPreRender:function(){return null},OnRenderFinished:function(){return null},BeginRender:function(width,height){this._canvas=js.Boot.__cast(window.document.createElement("canvas"),HTMLCanvasElement);var tmp=system.Convert.ToInt32_Single(width);this._canvas.width=tmp;var tmp1=system.Convert.ToInt32_Single(height);this._canvas.height=tmp1,this._canvas.style.width=Std.string(width)+"px",this._canvas.style.height=Std.string(height)+"px",this._context=this._canvas.getContext("2d"),this._context.textBaseline="top",this._context.lineWidth=this._lineWidth},EndRender:function(){var result=this._canvas;return this._canvas=null,result},get_Color:function(){return this._color},set_Color:function(value){return this._color.RGBA==value.RGBA?this.get_Color():(this._color=value,this._context.strokeStyle=value.RGBA,this._context.fillStyle=value.RGBA,this.get_Color())},get_LineWidth:function(){return this._lineWidth},set_LineWidth:function(value){return this._lineWidth=value,null!=this._context&&(this._context.lineWidth=value),this.get_LineWidth()},FillRect:function(x,y,w,h){w>0&&this._context.fillRect(system.Convert.ToInt32_Single(x)-0,system.Convert.ToInt32_Single(y)-0,w,h)},StrokeRect:function(x,y,w,h){this._context.strokeRect(x-0,y-0,w,h)},BeginPath:function(){this._context.beginPath()},ClosePath:function(){this._context.closePath()},MoveTo:function(x,y){this._context.moveTo(x-0,y-0)},LineTo:function(x,y){this._context.lineTo(x-0,y-0)},QuadraticCurveTo:function(cpx,cpy,x,y){this._context.quadraticCurveTo(cpx,cpy,x,y)},BezierCurveTo:function(cp1x,cp1y,cp2x,cp2y,x,y){this._context.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y)},FillCircle:function(x,y,radius){this._context.beginPath(),this._context.arc(x,y,radius,0,6.28318530717958,!0),this.Fill()},Fill:function(){this._context.fill()},Stroke:function(){this._context.stroke()},get_Font:function(){return this._font},set_Font:function(value){if(this._font=value,null!=this._context){var tmp=value.ToCssString(1);this._context.font=tmp}var tmp1=value.ToCssString(1);return this._measureContext.font=tmp1,this.get_Font()},get_TextAlign:function(){switch(this._context.textAlign){case"center":return 1;case"left":return 0;case"right":return 2;default:return 0}},set_TextAlign:function(value){switch(value){case 0:this._context.textAlign="left";break;case 1:this._context.textAlign="center";break;case 2:this._context.textAlign="right"}return this.get_TextAlign()},get_TextBaseline:function(){switch(this._context.textBaseline){case"bottom":return 2;case"middle":return 1;case"top":default:return 0}},set_TextBaseline:function(value){switch(value){case 0:this._context.textBaseline="top";break;case 1:this._context.textBaseline="middle";break;case 2:this._context.textBaseline="bottom"}return this.get_TextBaseline()},BeginGroup:function(identifier){},EndGroup:function(){},FillText:function(text,x,y){x=system.Convert.ToInt32_Single(x);y=system.Convert.ToInt32_Single(y),this._context.fillText(text,x,y)},MeasureText:function(text){return js.Boot.__cast(this._measureContext.measureText(text).width,Float)},FillMusicFontSymbol:function(x,y,scale,symbol){if(-1!=symbol){x=system.Convert.ToInt32_Single(x);y=system.Convert.ToInt32_Single(y);var baseLine=this._context.textBaseline,font=this._context.font,tmp=this._musicFont.ToCssString(scale);this._context.font=tmp,this._context.textBaseline="middle",this._context.fillText(String.fromCharCode(symbol),x,y),this._context.textBaseline=baseLine,this._context.font=font}},FillMusicFontSymbols:function(x,y,scale,symbols){x=system.Convert.ToInt32_Single(x);y=system.Convert.ToInt32_Single(y);var baseLine=this._context.textBaseline,font=this._context.font,tmp=this._musicFont.ToCssString(scale);this._context.font=tmp,this._context.textBaseline="middle";for(var s="",symbol=HxOverrides.iter(symbols);symbol.hasNext();){var symbol1=symbol.next();-1!=symbol1&&(s+=String.fromCharCode(symbol1))}this._context.fillText(s,x,y),this._context.textBaseline=baseLine,this._context.font=font},BeginRotate:function(centerX,centerY,angle){this._context.save(),this._context.translate(centerX,centerY);this._context.rotate(3.14159265358979*angle/180)},EndRotate:function(){this._context.restore()},__class__:alphaTab.platform.javaScript.Html5Canvas},alphaTab.platform.javaScript.JQueryAlphaTab=$hx_exports.alphaTab.platform.javaScript.JQueryAlphaTab=function(){this._initListeners=[]},alphaTab.platform.javaScript.JQueryAlphaTab.__name__=["alphaTab","platform","javaScript","JQueryAlphaTab"],alphaTab.platform.javaScript.JQueryAlphaTab.Restore=function(selector){$(selector).empty().removeData("alphaTab")},alphaTab.platform.javaScript.JQueryAlphaTab.prototype={Exec:function(element,method,args){"string"!=typeof method&&(args=[method],method="init");if(95==system.Convert.ToUInt16(HxOverrides.cca(method,0))||"Exec"==method)return null;var jElement=$(element),context=jElement.data("alphaTab");if("destroy"==method&&!context)return null;if("init"!=method&&!context)throw new Error("alphaTab not initialized");var apiMethod=this[method];if(apiMethod){var realArgs=[jElement,context].concat(args);return apiMethod.apply(this,realArgs)}return alphaTab.util.Logger.Error("Api","Method '"+method+"' does not exist on jQuery.alphaTab",null),null},init:function(element,context,options){if(!context){context=new alphaTab.platform.javaScript.AlphaTabApi(element[0],options),element.data("alphaTab",context);for(var listener=$iterator(this._initListeners)();listener.hasNext();){listener.next()(element,context,options)}}},destroy:function(element,context){element.removeData("alphaTab"),context.Destroy()},tex:function(element,context,tex){context.Tex(tex)},tracks:function(element,context,tracks){return tracks&&context.SetTracks(tracks,!0),context.get_Tracks()},api:function(element,context){return context},score:function(element,context,score){return score&&context.ScoreLoaded(score,!0),context.Score},renderer:function(element,context){return context.Renderer},layout:function(element,context,layout){return layout&&context.UpdateLayout(layout),context.Settings.Layout},print:function(element,context,width){context.Print(width)},player:function(element,context){return context.Player},playerOptions:function(element,context,options){return options&&alphaTab.Settings.FillPlayerOptions(context.Settings,options,!1,null),context.Settings},cursorOptions:function(element,context,options){return this.playerOptions(element,context,options)},playerState:function(element,context){return null==context.Player?0:context.Player.get_State()},masterVolume:function(element,context,masterVolume){return null==context.Player?0:(masterVolume&&context.Player.set_MasterVolume(masterVolume),context.Player.get_MasterVolume())},playbackSpeed:function(element,context,playbackSpeed){return null==context.Player?0:(playbackSpeed&&context.Player.set_PlaybackSpeed(playbackSpeed),context.Player.get_PlaybackSpeed())},metronomeVolume:function(element,context,metronomeVolume){return null==context.Player?0:(metronomeVolume&&context.Player.set_MetronomeVolume(metronomeVolume),context.Player.get_MetronomeVolume())},tickPosition:function(element,context,tickPosition){return null==context.Player?0:(tickPosition&&context.Player.set_TickPosition(tickPosition),context.Player.get_TickPosition())},playbackRange:function(element,context,playbackRange){return null==context.Player?null:(playbackRange&&context.Player.set_PlaybackRange(playbackRange),context.Player.get_PlaybackRange())},loop:function(element,context,loop){return null!=context.Player&&(loop&&context.Player.set_IsLooping(loop),context.Player.get_IsLooping())},autoScroll:function(element,context,autoScroll){return null==context.Player?null:(autoScroll&&(context.Settings.ScrollMode=autoScroll),context.Settings.ScrollMode)},play:function(element,context){context.Play()},pause:function(element,context){context.Pause()},playPause:function(element,context){context.PlayPause()},stop:function(element,context){context.Stop()},loadSoundFont:function(element,context,value){context.LoadSoundFont(value)},muteTrack:function(element,context,tracks,mute){context.SetTrackMute(tracks,mute)},soloTrack:function(element,context,tracks,solo){context.SetTrackSolo(tracks,solo)},trackVolume:function(element,context,tracks,volume){context.SetTrackVolume(tracks,volume)},downloadMidi:function(element,context,tracks,volume){context.DownloadMidi()},_oninit:function(listener){this._initListeners.push(listener)},__class__:alphaTab.platform.javaScript.JQueryAlphaTab},alphaTab.util={},alphaTab.util.Logger=$hx_exports.alphaTab.util.Logger=function(){},alphaTab.util.Logger.__name__=["alphaTab","util","Logger"],alphaTab.util.Logger.Debug=function(category,msg,details){alphaTab.util.Logger.Log(1,category,msg,details)},alphaTab.util.Logger.Warning=function(category,msg,details){alphaTab.util.Logger.Log(3,category,msg,details)},alphaTab.util.Logger.Info=function(category,msg,details){alphaTab.util.Logger.Log(2,category,msg,details)},alphaTab.util.Logger.Error=function(category,msg,details){alphaTab.util.Logger.Log(4,category,msg,details)},alphaTab.util.Logger.Log=function(logLevel,category,msg,details){logLevel=0){var className=HxOverrides.substr(fullName,0,idx),methodName=HxOverrides.substr(fullName,idx+1,null);method=haxe.StackItem.Method(className,methodName)}}stack.push(haxe.StackItem.FilePos(method,site.getFileName(),site.getLineNumber()))}return stack};var a=haxe.CallStack.makeStack(e.stack);return Error.prepareStackTrace=oldValue,a},haxe.CallStack.callStack=function(){try{throw new Error}catch(e){e instanceof js._Boot.HaxeError&&(e=e.val);var a=haxe.CallStack.getStack(e);return a.shift(),a}},haxe.CallStack.toString=function(stack){for(var b=new StringBuf,_g=0;_g=5)return"<...>";var t=typeof o;switch("function"==t&&(o.__name__||o.__ename__)&&(t="object"),t){case"function":return"";case"object":if(o instanceof Array){if(o.__enum__){if(2==o.length)return o[0];var str=o[0]+"(";s+="\t";for(var _g1=2,_g=o.length;_g1<_g;){var i=_g1++;str+=2!=i?","+js.Boot.__string_rec(o[i],s):js.Boot.__string_rec(o[i],s)}return str+")"}var l=o.length,str1="[";s+="\t";for(var _g11=0,_g2=l;_g11<_g2;){var i2=_g11++;str1+=(i2>0?",":"")+js.Boot.__string_rec(o[i2],s)}return str1+="]"}var tostr;try{tostr=o.toString}catch(e){return"???"}if(null!=tostr&&tostr!=Object.toString&&"function"==typeof tostr){var s2=o.toString();if("[object Object]"!=s2)return s2}var k=null,str2="{\n";s+="\t";var hasp=null!=o.hasOwnProperty;for(var k in o)hasp&&!o.hasOwnProperty(k)||"prototype"!=k&&"__class__"!=k&&"__super__"!=k&&"__interfaces__"!=k&&"__properties__"!=k&&(2!=str2.length&&(str2+=", \n"),str2+=s+k+" : "+js.Boot.__string_rec(o[k],s));return str2+="\n"+(s=s.substring(1))+"}";case"string":return o;default:return String(o)}},js.Boot.__interfLoop=function(cc,cl){if(null==cc)return!1;if(cc==cl)return!0;var intf=cc.__interfaces__;if(null!=intf)for(var _g1=0,_g=intf.length;_g1<_g;){var i1=intf[_g1++];if(i1==cl||js.Boot.__interfLoop(i1,cl))return!0}return js.Boot.__interfLoop(cc.__super__,cl)},js.Boot.__instanceof=function(o,cl){if(null==cl)return!1;switch(cl){case Array:return o instanceof Array&&null==o.__enum__;case Bool:return"boolean"==typeof o;case Dynamic:return!0;case Float:return"number"==typeof o;case Int:return"number"==typeof o&&(0|o)===o;case String:return"string"==typeof o;default:if(null==o)return!1;if("function"==typeof cl){if(o instanceof cl)return!0;if(js.Boot.__interfLoop(js.Boot.getClass(o),cl))return!0}else if("object"==typeof cl&&js.Boot.__isNativeObj(cl)&&o instanceof cl)return!0;return cl==Class&&null!=o.__name__||(cl==Enum&&null!=o.__ename__||o.__enum__==cl)}},js.Boot.__cast=function(o,t){if(js.Boot.__instanceof(o,t))return o;throw new js._Boot.HaxeError("Cannot cast "+Std.string(o)+" to "+Std.string(t))},js.Boot.__nativeClassName=function(o){var name=js.Boot.__toStr.call(o).slice(8,-1);return"Object"==name||"Function"==name||"Math"==name||"JSON"==name?null:name},js.Boot.__isNativeObj=function(o){return null!=js.Boot.__nativeClassName(o)},js.Boot.__resolveNativeClass=function(name){return $global[name]},haxe.StackItem={__ename__:!0,__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"]},haxe.StackItem.CFunction=["CFunction",0],haxe.StackItem.CFunction.toString=$estr,haxe.StackItem.CFunction.__enum__=haxe.StackItem,haxe.StackItem.Module=function(m){var $x=["Module",1,m];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},haxe.StackItem.FilePos=function(s,file,line){var $x=["FilePos",2,s,file,line];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},haxe.StackItem.Method=function(classname,method){var $x=["Method",3,classname,method];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},haxe.StackItem.LocalFunction=function(v){var $x=["LocalFunction",4,v];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},alphaTab.platform.javaScript.AlphaTabWebWorker=$hx_exports.alphaTab.platform.javaScript.AlphaTabWebWorker=function(main){this._renderer=null,this._main=null,this._main=main,this._main.addEventListener("message",$bind(this,this.HandleMessage),!1)},alphaTab.platform.javaScript.AlphaTabWebWorker.__name__=["alphaTab","platform","javaScript","AlphaTabWebWorker"],alphaTab.platform.javaScript.AlphaTabWebWorker.Init=function(){new alphaTab.platform.javaScript.AlphaTabWebWorker($global)},alphaTab.platform.javaScript.AlphaTabWebWorker.prototype={HandleMessage:function(e){var _gthis=this,data=js.Boot.__cast(e,MessageEvent).data;switch(data?data.cmd:""){case"alphaTab.initialize":var settings=alphaTab.Settings.FromJson(data.settings,null);alphaTab.util.Logger.LogLevel=settings.LogLevel,this._renderer=new alphaTab.rendering.ScoreRenderer(settings),this._renderer.PartialRenderFinished=system._EventAction1.EventAction1_Impl_.add(this._renderer.PartialRenderFinished,function(result){_gthis._main.postMessage({cmd:"alphaTab.partialRenderFinished",result:result})}),this._renderer.RenderFinished=system._EventAction1.EventAction1_Impl_.add(this._renderer.RenderFinished,function(result1){_gthis._main.postMessage({cmd:"alphaTab.renderFinished",result:result1})}),this._renderer.PostRenderFinished=system._EventAction.EventAction_Impl_.add(this._renderer.PostRenderFinished,function(){_gthis._main.postMessage({cmd:"alphaTab.postRenderFinished",boundsLookup:_gthis._renderer.get_BoundsLookup().ToJson()})}),this._renderer.PreRender=system._EventAction1.EventAction1_Impl_.add(this._renderer.PreRender,function(result2){_gthis._main.postMessage({cmd:"alphaTab.preRender",result:result2})}),this._renderer.Error=system._EventAction2.EventAction2_Impl_.add(this._renderer.Error,$bind(this,this.Error));break;case"alphaTab.invalidate":this._renderer.Invalidate();break;case"alphaTab.render":var score=alphaTab.model.JsonConverter.JsObjectToScore(data.score,this._renderer.Settings);this.RenderMultiple(score,data.trackIndexes);break;case"alphaTab.resize":this._renderer.Resize(data.width);break;case"alphaTab.updateSettings":this.UpdateSettings(data.settings)}},UpdateSettings:function(settings){this._renderer.UpdateSettings(alphaTab.Settings.FromJson(settings,null))},RenderMultiple:function(score,trackIndexes){try{this._renderer.Render(score,trackIndexes)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;this.Error("render",e)}},Error:function(type,e){alphaTab.util.Logger.Error(type,"An unexpected error occurred in worker",e);var error=JSON.parse(JSON.stringify(e)),e2=e;e2.message&&(error.message=e2.message),e2.stack&&(error.stack=e2.stack),e2.constructor&&e2.constructor.name&&(error.type=e2.constructor.name),this._main.postMessage({cmd:"alphaTab.error",error:{type:type,detail:error}})},__class__:alphaTab.platform.javaScript.AlphaTabWebWorker},alphaTab.platform.javaScript.AlphaSynthWebWorker=$hx_exports.alphaTab.platform.javaScript.AlphaSynthWebWorker=function(main,id){this._player=null,this._main=null,this._main=main,this._main.addEventListener("message",$bind(this,this.HandleMessage)),this._player=new alphaTab.audio.synth.AlphaSynth(new alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput),this._player.PositionChanged=system._EventAction1.EventAction1_Impl_.add(this._player.PositionChanged,$bind(this,this.OnPositionChanged)),this._player.PlayerStateChanged=system._EventAction1.EventAction1_Impl_.add(this._player.PlayerStateChanged,$bind(this,this.OnPlayerStateChanged)),this._player.Finished=system._EventAction1.EventAction1_Impl_.add(this._player.Finished,$bind(this,this.OnFinished)),this._player.SoundFontLoaded=system._EventAction.EventAction_Impl_.add(this._player.SoundFontLoaded,$bind(this,this.OnSoundFontLoaded)),this._player.SoundFontLoadFailed=system._EventAction1.EventAction1_Impl_.add(this._player.SoundFontLoadFailed,$bind(this,this.OnSoundFontLoadFailed)),this._player.SoundFontLoadFailed=system._EventAction1.EventAction1_Impl_.add(this._player.SoundFontLoadFailed,$bind(this,this.OnSoundFontLoadFailed)),this._player.MidiLoaded=system._EventAction.EventAction_Impl_.add(this._player.MidiLoaded,$bind(this,this.OnMidiLoaded)),this._player.MidiLoadFailed=system._EventAction1.EventAction1_Impl_.add(this._player.MidiLoadFailed,$bind(this,this.OnMidiLoadFailed)),this._player.ReadyForPlayback=system._EventAction.EventAction_Impl_.add(this._player.ReadyForPlayback,$bind(this,this.OnReadyForPlayback)),this._main.postMessage({cmd:"alphaSynth.ready"})},alphaTab.platform.javaScript.AlphaSynthWebWorker.__name__=["alphaTab","platform","javaScript","AlphaSynthWebWorker"],alphaTab.platform.javaScript.AlphaSynthWebWorker.Init=function(){var main=$global;main.addEventListener("message",function(e){var data=e.data;"alphaSynth.initialize"==data.cmd&&(alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.PreferredSampleRate=data.sampleRate,alphaTab.util.Logger.LogLevel=data.logLevel,new alphaTab.platform.javaScript.AlphaSynthWebWorker(main,data.id))})},alphaTab.platform.javaScript.AlphaSynthWebWorker.prototype={HandleMessage:function(e){var data=e.data;switch(data.cmd){case"alphaSynth.loadMidi":this._player.LoadMidi(alphaTab.model.JsonConverter.JsObjectToMidiFile(data.midi));break;case"alphaSynth.loadSoundFontBytes":this._player.LoadSoundFont(data.data);break;case"alphaSynth.pause":this._player.Pause();break;case"alphaSynth.play":this._player.Play();break;case"alphaSynth.playPause":this._player.PlayPause();break;case"alphaSynth.resetChannelStates":this._player.ResetChannelStates();break;case"alphaSynth.setChannelMute":this._player.SetChannelMute(data.channel,data.mute);break;case"alphaSynth.setChannelProgram":this._player.SetChannelProgram(data.channel,data.program);break;case"alphaSynth.setChannelSolo":this._player.SetChannelSolo(data.channel,data.solo);break;case"alphaSynth.setChannelVolume":this._player.SetChannelVolume(data.channel,data.volume);break;case"alphaSynth.setIsLooping":this._player.set_IsLooping(data.value);break;case"alphaSynth.setLogLevel":alphaTab.util.Logger.LogLevel=data.value;break;case"alphaSynth.setMasterVolume":this._player.set_MasterVolume(data.value);break;case"alphaSynth.setMetronomeVolume":this._player.set_MetronomeVolume(data.value);break;case"alphaSynth.setPlaybackRange":this._player.set_PlaybackRange(data.value);break;case"alphaSynth.setPlaybackSpeed":this._player.set_PlaybackSpeed(data.value);break;case"alphaSynth.setTickPosition":this._player.set_TickPosition(data.value);break;case"alphaSynth.setTimePosition":this._player.set_TimePosition(data.value);break;case"alphaSynth.stop":this._player.Stop()}},OnPositionChanged:function(e){this._main.postMessage({cmd:"alphaSynth.positionChanged",currentTime:e.CurrentTime,endTime:e.EndTime,currentTick:e.CurrentTick,endTick:e.EndTick})},OnPlayerStateChanged:function(e){this._main.postMessage({cmd:"alphaSynth.playerStateChanged",state:e.State})},OnFinished:function(isLooping){this._main.postMessage({cmd:"alphaSynth.finished",isLooping:isLooping})},OnSoundFontLoaded:function(){this._main.postMessage({cmd:"alphaSynth.soundFontLoaded"})},OnSoundFontLoadFailed:function(e){this._main.postMessage({cmd:"alphaSynth.soundFontLoadFailed",error:this.SerializeException(e)})},SerializeException:function(e){var error=JSON.parse(JSON.stringify(e)),e2=e;return e2.message&&(error.message=e2.message),e2.stack&&(error.stack=e2.stack),e2.constructor&&e2.constructor.name&&(error.type=e2.constructor.name),error},OnMidiLoaded:function(){this._main.postMessage({cmd:"alphaSynth.midiLoaded"})},OnMidiLoadFailed:function(e){this._main.postMessage({cmd:"alphaSynth.midiLoaded",error:this.SerializeException(e)})},OnReadyForPlayback:function(){this._main.postMessage({cmd:"alphaSynth.readyForPlayback"})},SendLog:function(level,s){this._main.postMessage({cmd:"alphaSynth.log",level:level,message:s})},__class__:alphaTab.platform.javaScript.AlphaSynthWebWorker},alphaTab.audio={},alphaTab.audio.synth={},alphaTab.audio.synth.ISynthOutput=$hx_exports.alphaTab.audio.synth.ISynthOutput=function(){},alphaTab.audio.synth.ISynthOutput.__name__=["alphaTab","audio","synth","ISynthOutput"],alphaTab.audio.synth.ISynthOutput.prototype={__class__:alphaTab.audio.synth.ISynthOutput},alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput=$hx_exports.alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput=function(){this._worker=null},alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.__name__=["alphaTab","platform","javaScript","AlphaSynthWorkerSynthOutput"],alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.__interfaces__=[alphaTab.audio.synth.ISynthOutput],alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.prototype={get_SampleRate:function(){return alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.PreferredSampleRate},Open:function(){alphaTab.util.Logger.Debug("AlphaSynth","Initializing webworker worker",null),this._worker=$global,this._worker.addEventListener("message",$bind(this,this.HandleMessage)),system._EventAction.EventAction_Impl_.Invoke(this.Ready)},HandleMessage:function(e){var data=e.data;switch(data.cmd){case"alphaSynth.output.finished":system._EventAction.EventAction_Impl_.Invoke(this.Finished);break;case"alphaSynth.output.sampleRequest":system._EventAction.EventAction_Impl_.Invoke(this.SampleRequest);break;case"alphaSynth.output.samplesPlayed":system._EventAction1.EventAction1_Impl_.Invoke(this.SamplesPlayed,data.samples)}},add_Ready:function(value){return this.Ready=system._EventAction.EventAction_Impl_.add(this.Ready,value)},remove_Ready:function(value){return this.Ready=system._EventAction.EventAction_Impl_.sub(this.Ready,value)},add_SamplesPlayed:function(value){return this.SamplesPlayed=system._EventAction1.EventAction1_Impl_.add(this.SamplesPlayed,value)},remove_SamplesPlayed:function(value){return this.SamplesPlayed=system._EventAction1.EventAction1_Impl_.sub(this.SamplesPlayed,value)},add_SampleRequest:function(value){return this.SampleRequest=system._EventAction.EventAction_Impl_.add(this.SampleRequest,value)},remove_SampleRequest:function(value){return this.SampleRequest=system._EventAction.EventAction_Impl_.sub(this.SampleRequest,value)},add_Finished:function(value){return this.Finished=system._EventAction.EventAction_Impl_.add(this.Finished,value)},remove_Finished:function(value){return this.Finished=system._EventAction.EventAction_Impl_.sub(this.Finished,value)},SequencerFinished:function(){this._worker.postMessage({cmd:"alphaSynth.output.sequencerFinished"})},AddSamples:function(samples){this._worker.postMessage({cmd:"alphaSynth.output.addSamples",samples:samples})},Play:function(){this._worker.postMessage({cmd:"alphaSynth.output.play"})},Pause:function(){this._worker.postMessage({cmd:"alphaSynth.output.pause"})},ResetSamples:function(){this._worker.postMessage({cmd:"alphaSynth.output.resetSamples"})},__class__:alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput},alphaTab.audio.synth.IAlphaSynth=$hx_exports.alphaTab.audio.synth.IAlphaSynth=function(){},alphaTab.audio.synth.IAlphaSynth.__name__=["alphaTab","audio","synth","IAlphaSynth"],alphaTab.audio.synth.IAlphaSynth.prototype={__class__:alphaTab.audio.synth.IAlphaSynth},alphaTab.audio.synth.AlphaSynth=$hx_exports.alphaTab.audio.synth.AlphaSynth=function(output){var _gthis=this;this._sequencer=null,this._synthesizer=null,this._isSoundFontLoaded=!1,this._isMidiLoaded=!1,this._tickPosition=0,this._timePosition=0,this.Output=null,this.set_IsReady(!1),this.set_State(0),alphaTab.util.Logger.Debug("AlphaSynth","Initializing player",null),this.set_State(0),alphaTab.util.Logger.Debug("AlphaSynth","Creating output",null),this.Output=output,this.Output.Ready=system._EventAction.EventAction_Impl_.add(this.Output.Ready,function(){_gthis.set_IsReady(!0),_gthis.CheckReadyForPlayback()}),this.Output.Finished=system._EventAction.EventAction_Impl_.add(this.Output.Finished,function(){_gthis.Stop(),alphaTab.util.Logger.Debug("AlphaSynth","Finished playback",null),_gthis.OnFinished(_gthis._sequencer.IsLooping),_gthis._sequencer.IsLooping&&_gthis.Play()}),this.Output.SampleRequest=system._EventAction.EventAction_Impl_.add(this.Output.SampleRequest,function(){_gthis._sequencer.FillMidiEventQueue(),_gthis._synthesizer.Synthesize(),_gthis.Output.AddSamples(_gthis._synthesizer.SampleBuffer),_gthis._sequencer.CheckForStop()}),this.Output.SamplesPlayed=system._EventAction1.EventAction1_Impl_.add(this.Output.SamplesPlayed,$bind(this,this.OnSamplesPlayed)),alphaTab.util.Logger.Debug("AlphaSynth","Creating synthesizer",null),this._synthesizer=new alphaTab.audio.synth.synthesis.Synthesizer(this.Output.get_SampleRate(),2,441,3,100),this._sequencer=new alphaTab.audio.synth.MidiFileSequencer(this._synthesizer),this._sequencer.Finished=system._EventAction.EventAction_Impl_.add(this._sequencer.Finished,($_=this.Output,$bind($_,$_.SequencerFinished))),alphaTab.util.Logger.Debug("AlphaSynth","Opening output",null),this.Output.Open()},alphaTab.audio.synth.AlphaSynth.__name__=["alphaTab","audio","synth","AlphaSynth"],alphaTab.audio.synth.AlphaSynth.__interfaces__=[alphaTab.audio.synth.IAlphaSynth],alphaTab.audio.synth.AlphaSynth.prototype={get_IsReady:function(){return this.__IsReady},set_IsReady:function(value){return this.__IsReady=value},get_IsReadyForPlayback:function(){return!(!this.get_IsReady()||!this._isSoundFontLoaded)&&this._isMidiLoaded},get_State:function(){return this.__State},set_State:function(value){return this.__State=value},get_LogLevel:function(){return alphaTab.util.Logger.LogLevel},set_LogLevel:function(value){return alphaTab.util.Logger.LogLevel=value},get_MasterVolume:function(){return this._synthesizer.MasterVolume},set_MasterVolume:function(value){return value=alphaTab.audio.synth.util.SynthHelper.ClampF(value,0,10),this._synthesizer.MasterVolume=value,this.get_MasterVolume()},get_MetronomeVolume:function(){return this._synthesizer.get_MetronomeVolume()},set_MetronomeVolume:function(value){return value=alphaTab.audio.synth.util.SynthHelper.ClampF(value,0,10),this._synthesizer.set_MetronomeVolume(value),this.get_MetronomeVolume()},get_PlaybackSpeed:function(){return this._sequencer.PlaybackSpeed},set_PlaybackSpeed:function(value){value=alphaTab.audio.synth.util.SynthHelper.ClampD(value,.125,8);var oldSpeed=this._sequencer.PlaybackSpeed;return this._sequencer.PlaybackSpeed=value,this.UpdateTimePosition(this._timePosition*(oldSpeed/value)),this.get_PlaybackSpeed()},get_TickPosition:function(){return this._tickPosition},set_TickPosition:function(value){return this.set_TimePosition(this._sequencer.TickPositionToTimePosition(value)),this.get_TickPosition()},get_TimePosition:function(){return this._timePosition},set_TimePosition:function(value){return alphaTab.util.Logger.Debug("AlphaSynth","Seeking to position "+value+"ms",null),this._sequencer.Seek(value),this.UpdateTimePosition(value),this.Output.ResetSamples(),this.get_TimePosition()},get_PlaybackRange:function(){return this._sequencer.get_PlaybackRange()},set_PlaybackRange:function(value){return this._sequencer.set_PlaybackRange(value),null!=value&&this.set_TickPosition(value.StartTick),this.get_PlaybackRange()},get_IsLooping:function(){return this._sequencer.IsLooping},set_IsLooping:function(value){return this._sequencer.IsLooping=value},Play:function(){1!=this.get_State()&&this.get_IsReadyForPlayback()&&(alphaTab.util.Logger.Debug("AlphaSynth","Starting playback",null),this.set_State(1),this.OnPlayerStateChanged(new alphaTab.audio.synth.PlayerStateChangedEventArgs(this.get_State())),this.Output.Play())},Pause:function(){0!=this.get_State()&&this.get_IsReadyForPlayback()&&(alphaTab.util.Logger.Debug("AlphaSynth","Pausing playback",null),this.set_State(0),this.OnPlayerStateChanged(new alphaTab.audio.synth.PlayerStateChangedEventArgs(this.get_State())),this.Output.Pause(),this._synthesizer.NoteOffAll(!1))},PlayPause:function(){1!=this.get_State()&&this.get_IsReadyForPlayback()?this.Play():this.Pause()},Stop:function(){this.get_IsReadyForPlayback()&&(alphaTab.util.Logger.Debug("AlphaSynth","Stopping playback",null),this.Pause(),this._synthesizer.NoteOffAll(!0),this.set_TickPosition(null!=this._sequencer.get_PlaybackRange()?this._sequencer.get_PlaybackRange().StartTick:0))},LoadSoundFont:function(data){this.Pause();var input=alphaTab.io.ByteBuffer.FromBuffer(data);try{alphaTab.util.Logger.Info("AlphaSynth","Loading soundfont from bytes",null);var bank=new alphaTab.audio.synth.bank.PatchBank;bank.LoadSf2(input),this._synthesizer.LoadBank(bank),this._isSoundFontLoaded=!0,this.OnSoundFontLoaded(),alphaTab.util.Logger.Info("AlphaSynth","soundFont successfully loaded",null),this.CheckReadyForPlayback()}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;alphaTab.util.Logger.Error("AlphaSynth","Could not load soundfont from bytes "+Std.string(e),null),this.OnSoundFontLoadFailed(e)}},CheckReadyForPlayback:function(){this.get_IsReadyForPlayback()&&this.OnReadyForPlayback()},LoadMidi:function(midiFile){this.Stop();try{alphaTab.util.Logger.Info("AlphaSynth","Loading midi from model",null),this._sequencer.LoadMidi(midiFile),this._isMidiLoaded=!0,this.OnMidiLoaded(),alphaTab.util.Logger.Info("AlphaSynth","Midi successfully loaded",null),this.CheckReadyForPlayback(),this.set_TickPosition(0)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;alphaTab.util.Logger.Error("AlphaSynth","Could not load midi from model "+Std.string(e),null),this.OnMidiLoadFailed(e)}},SetChannelMute:function(channel,mute){this._synthesizer.SetChannelMute(channel,mute)},ResetChannelStates:function(){this._synthesizer.ResetChannelStates()},SetChannelSolo:function(channel,solo){this._synthesizer.SetChannelSolo(channel,solo)},SetChannelVolume:function(channel,volume){volume=alphaTab.audio.synth.util.SynthHelper.ClampD(volume,0,10),this._synthesizer.SetChannelVolume(channel,volume)},SetChannelProgram:function(channel,program){program=alphaTab.audio.synth.util.SynthHelper.ClampB(program,0,127),this._sequencer.SetChannelProgram(channel,program),this._synthesizer.SetChannelProgram(channel,program)},OnSamplesPlayed:function(sampleCount){var playedMillis=sampleCount/js.Boot.__cast(this._synthesizer.SampleRate,Float)*1e3;this.UpdateTimePosition(this._timePosition+playedMillis)},UpdateTimePosition:function(timePosition){var currentTime=this._timePosition=timePosition,currentTick=this._tickPosition=this._sequencer.TimePositionToTickPosition(currentTime),endTime=this._sequencer.get_EndTime(),endTick=this._sequencer.EndTick;alphaTab.util.Logger.Debug("AlphaSynth","Position changed: (time: "+currentTime+"/"+endTime+", tick: "+currentTick+"/"+endTime+", Active Voices: "+this._synthesizer.get_ActiveVoices()+", Free Voices: "+this._synthesizer.get_FreeVoices()+")",null),this.OnPositionChanged(new alphaTab.audio.synth.PositionChangedEventArgs(currentTime,endTime,currentTick,endTick))},OnFinished:function(isLooping){var _e=this.Finished,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(isLooping)},OnPlayerStateChanged:function(e){var _e=this.PlayerStateChanged,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},OnSoundFontLoaded:function(){var _e=this.SoundFontLoaded,handler=function(){system._EventAction.EventAction_Impl_.Invoke(_e)};null!=handler&&handler()},OnReadyForPlayback:function(){var _e=this.ReadyForPlayback,handler=function(){system._EventAction.EventAction_Impl_.Invoke(_e)};null!=handler&&handler()},OnSoundFontLoadFailed:function(e){var _e=this.SoundFontLoadFailed,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},OnMidiLoaded:function(){var _e=this.MidiLoaded,handler=function(){system._EventAction.EventAction_Impl_.Invoke(_e)};null!=handler&&handler()},OnMidiLoadFailed:function(e){var _e=this.MidiLoadFailed,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},OnPositionChanged:function(e){var _e=this.PositionChanged,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},__class__:alphaTab.audio.synth.AlphaSynth},system._EventAction={},system._EventAction.EventAction_Impl_={},system._EventAction.EventAction_Impl_.__name__=["system","_EventAction","EventAction_Impl_"],system._EventAction.EventAction_Impl_.add=function(lhs,rhs){if(null==lhs){lhs=null==rhs?null:[rhs]}else lhs.push(rhs);return lhs},system._EventAction.EventAction_Impl_.sub=function(lhs,rhs){var raw=lhs,index=raw.indexOf(rhs);return-1!=index&&(raw.splice(index,1),0==raw.length)?null:lhs},system._EventAction.EventAction_Impl_.Invoke=function(this1){if(null!=this1)for(var _g=0;_g0)for(var i=0;i=0;){if(this._layerList[x].ExclusiveGroupTarget==this._layerList[i].ExclusiveGroupTarget){notseen=!1;break}--i}if(0!=this._layerList[x].ExclusiveGroupTarget&¬seen)for(var node1=this._voiceManager.ActiveVoices.First;null!=node1;)this._layerList[x].ExclusiveGroupTarget==node1.Value.Patch.ExclusiveGroup&&(node1.Value.Stop(),this._voiceManager.RemoveVoiceFromRegistry(node1.Value)),node1=node1.get_Next();++x}for(var x1=0;x163||this.ReleaseHoldPedal(channel),this._synthChannels[channel].HoldPedal=data2>63;break;case 68:this._synthChannels[channel].LegatoPedal=data2>63;break;case 98:case 99:this._synthChannels[channel].Rpn.set_Combined(16383);break;case 100:this._synthChannels[channel].Rpn.set_Fine(system.Convert.ToUInt8(data2));break;case 101:this._synthChannels[channel].Rpn.set_Coarse(system.Convert.ToUInt8(data2));break;case 121:this._synthChannels[channel].Expression.set_Combined(16383),this._synthChannels[channel].ModRange.set_Combined(0),this._synthChannels[channel].HoldPedal&&this.ReleaseHoldPedal(channel),this._synthChannels[channel].HoldPedal=!1,this._synthChannels[channel].LegatoPedal=!1,this._synthChannels[channel].Rpn.set_Combined(16383),this._synthChannels[channel].PitchBend.set_Combined(8192),this._synthChannels[channel].ChannelAfterTouch=0,this._synthChannels[channel].UpdateCurrentPitch(),this._synthChannels[channel].UpdateCurrentVolumeFromExpression();break;case 123:this.NoteOffAll(!1);break;default:return}break;case 192:this._synthChannels[channel].Program=system.Convert.ToUInt8(data1);break;case 208:this._synthChannels[channel].ChannelAfterTouch=system.Convert.ToUInt8(data2);break;case 224:this._synthChannels[channel].PitchBend.set_Coarse(system.Convert.ToUInt8(data2)),this._synthChannels[channel].PitchBend.set_Fine(system.Convert.ToUInt8(data1)),this._synthChannels[channel].UpdateCurrentPitch()}this.OnMidiEventProcessed(e)},OnMidiEventProcessed:function(e){var _e=this.MidiEventProcessed,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},ReleaseAllHoldPedals:function(){for(var node=this._voiceManager.ActiveVoices.First;null!=node;)node.Value.VoiceParams.NoteOffPending&&(node.Value.Stop(),this._voiceManager.RemoveVoiceFromRegistry(node.Value)),node=node.get_Next()},ReleaseHoldPedal:function(channel){for(var node=this._voiceManager.ActiveVoices.First;null!=node;)node.Value.VoiceParams.Channel==channel&&node.Value.VoiceParams.NoteOffPending&&(node.Value.Stop(),this._voiceManager.RemoveVoiceFromRegistry(node.Value)),node=node.get_Next()},DispatchEvent:function(i,synthEvent){this._midiEventQueue.AddFirst(synthEvent);var tmp=i,tmp1=this._midiEventCounts[tmp];this._midiEventCounts[tmp]=tmp1+1},SetChannelMute:function(channel,mute){if(mute)this._mutedChannels[channel]=!0;else{delete this._mutedChannels[channel]}},ResetChannelStates:function(){this._mutedChannels={};this._soloChannels={},this._isAnySolo=!1},SetChannelSolo:function(channel,solo){if(solo)this._soloChannels[channel]=!0;else{delete this._soloChannels[channel]}var this2=this._soloChannels;this._isAnySolo=Object.keys(this2).length>0},SetChannelProgram:function(channel,program){channel<0||channel>=this._synthChannels.length||(this._synthChannels[channel].Program=program)},SetChannelVolume:function(channel,volume){channel<0||channel>=this._synthChannels.length||(this._synthChannels[channel].MixVolume=js.Boot.__cast(volume,Float))},__class__:alphaTab.audio.synth.synthesis.Synthesizer},alphaTab.audio.synth.util={},alphaTab.audio.synth.util.SynthHelper=$hx_exports.alphaTab.audio.synth.util.SynthHelper=function(){},alphaTab.audio.synth.util.SynthHelper.__name__=["alphaTab","audio","synth","util","SynthHelper"],alphaTab.audio.synth.util.SynthHelper.SwapEndianess=function(data,bits){for(var swapArray=new Uint8Array(bits=bits/8|0),x=0;x=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampD=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampF=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampI=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampS=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.NearestPowerOfTwo=function(value){return Math.pow(2,Math.round(Math.log(value)/Math.log(2)))},alphaTab.audio.synth.util.SynthHelper.SamplesFromTime=function(sampleRate,seconds){return sampleRate*seconds},alphaTab.audio.synth.util.SynthHelper.TimeFromSamples=function(sampleRate,samples){return samples/js.Boot.__cast(sampleRate,Float)},alphaTab.audio.synth.util.SynthHelper.DBtoLinear=function(dBvalue){return Math.pow(10,dBvalue/20)},alphaTab.audio.synth.util.SynthHelper.LineartoDB=function(linearvalue){return Math.log(linearvalue)/Math.log(10)*20},alphaTab.audio.synth.util.SynthHelper.FrequencyToKey=function(frequency,rootkey){return Math.log(frequency/440)/Math.log(2)*12+rootkey},alphaTab.audio.synth.util.SynthHelper.KeyToFrequency=function(key,rootkey){return 440*Math.pow(2,(key-rootkey)/12)},alphaTab.audio.synth.util.SynthHelper.SemitoneToPitch=function(key){key<-127?key=-127:key>127&&(key=127);return alphaTab.audio.synth.util.Tables.SemitoneTable(127+key)},alphaTab.audio.synth.util.SynthHelper.CentsToPitch=function(cents){var key=cents/100|0;cents-=100*key,key<-127?key=-127:key>127&&(key=127);return alphaTab.audio.synth.util.Tables.SemitoneTable(127+key)*alphaTab.audio.synth.util.Tables.CentTable(100+cents)},alphaTab.audio.synth.util.SynthHelper.prototype={__class__:alphaTab.audio.synth.util.SynthHelper},system.OverflowException=function(message){null==message&&(message=""),system.Exception.call(this),this.Exception_CsString(message)},system.OverflowException.__name__=["system","OverflowException"],system.OverflowException.__super__=system.Exception,system.OverflowException.prototype=$extend(system.Exception.prototype,{__class__:system.OverflowException}),alphaTab.audio.synth.synthesis.SynthParameters=$hx_exports.alphaTab.audio.synth.synthesis.SynthParameters=function(synth){this.Program=0,this.BankSelect=0,this.ChannelAfterTouch=0,this.Pan=null,this.Volume=null,this.Expression=null,this.ModRange=null,this.PitchBend=null,this.PitchBendRangeCoarse=0,this.PitchBendRangeFine=0,this.MasterCoarseTune=0,this.MasterFineTune=null,this.HoldPedal=!1,this.LegatoPedal=!1,this.Rpn=null,this.Synth=null,this.CurrentVolume=0,this.CurrentPitch=0,this.CurrentMod=0,this.CurrentPan=null,this.MixVolume=0,this.Synth=synth,this.Pan=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.Volume=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.Expression=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.ModRange=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.PitchBend=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.MasterFineTune=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.Rpn=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.MixVolume=1,this.CurrentPan=new alphaTab.audio.synth.bank.components.PanComponent,this.ResetControllers()},alphaTab.audio.synth.synthesis.SynthParameters.__name__=["alphaTab","audio","synth","synthesis","SynthParameters"],alphaTab.audio.synth.synthesis.SynthParameters.prototype={ResetControllers:function(){this.Program=0,this.BankSelect=0,this.ChannelAfterTouch=0,this.Pan.set_Combined(8192),this.Volume.set_Fine(0),this.Volume.set_Coarse(100),this.Expression.set_Combined(16383),this.ModRange.set_Combined(0),this.PitchBend.set_Combined(8192),this.PitchBendRangeCoarse=2,this.PitchBendRangeFine=0,this.MasterCoarseTune=0,this.MasterFineTune.set_Combined(8192),this.HoldPedal=!1,this.LegatoPedal=!1,this.Rpn.set_Combined(16383),this.UpdateCurrentPan(),this.UpdateCurrentPitch(),this.UpdateCurrentVolumeFromExpression()},UpdateCurrentPitch:function(){this.CurrentPitch=system.Convert.ToInt32_Double((this.PitchBend.get_Combined()-8192)/8192*(100*this.PitchBendRangeCoarse+this.PitchBendRangeFine))},UpdateCurrentMod:function(){this.CurrentMod=system.Convert.ToInt32_Double(this.ModRange.get_Combined()/16383*100)},UpdateCurrentPan:function(){var value=this.Pan.get_Combined()/16383*1.570796326794895;this.CurrentPan.Left=js.Boot.__cast(Math.cos(value),Float),this.CurrentPan.Right=js.Boot.__cast(Math.sin(value),Float)},UpdateCurrentVolumeFromVolume:function(){this.CurrentVolume=this.Volume.get_Combined()/16383,this.CurrentVolume=this.CurrentVolume*this.CurrentVolume},UpdateCurrentVolumeFromExpression:function(){this.CurrentVolume=this.Expression.get_Combined()/16383,this.CurrentVolume=this.CurrentVolume*this.CurrentVolume},__class__:alphaTab.audio.synth.synthesis.SynthParameters},alphaTab.audio.synth.synthesis.CCValue=$hx_exports.alphaTab.audio.synth.synthesis.CCValue=function(){this._coarseValue=0,this._fineValue=0,this._combined=0},alphaTab.audio.synth.synthesis.CCValue.__name__=["alphaTab","audio","synth","synthesis","CCValue"],alphaTab.audio.synth.synthesis.CCValue.prototype={get_Coarse:function(){return this._coarseValue},set_Coarse:function(value){return this._coarseValue=value,this.UpdateCombined(),this.get_Coarse()},get_Fine:function(){return this._fineValue},set_Fine:function(value){return this._fineValue=value,this.UpdateCombined(),this.get_Fine()},get_Combined:function(){return this._combined},set_Combined:function(value){return this._combined=value,this.UpdateCoarseFinePair(),this.get_Combined()},CCValue_Byte_Byte:function(coarse,fine){return this._coarseValue=0,this._fineValue=0,this._combined=0,this._coarseValue=coarse,this._fineValue=fine,this._combined=0,this.UpdateCombined(),this},CCValue_Int16:function(combined){return this._coarseValue=0,this._fineValue=0,this._combined=0,this._coarseValue=0,this._fineValue=0,this._combined=combined,this.UpdateCoarseFinePair(),this},UpdateCombined:function(){this._combined=system.Convert.ToInt16(this._coarseValue<<7|this._fineValue)},UpdateCoarseFinePair:function(){this._coarseValue=system.Convert.ToUInt8(this._combined>>7),this._fineValue=system.Convert.ToUInt8(127&this._combined)},__class__:alphaTab.audio.synth.synthesis.CCValue},alphaTab.audio.synth.bank={},alphaTab.audio.synth.bank.components={},alphaTab.audio.synth.bank.components.PanComponent=$hx_exports.alphaTab.audio.synth.bank.components.PanComponent=function(){this.Left=0,this.Right=0},alphaTab.audio.synth.bank.components.PanComponent.__name__=["alphaTab","audio","synth","bank","components","PanComponent"],alphaTab.audio.synth.bank.components.PanComponent.prototype={SetValue:function(value,formula){value=alphaTab.audio.synth.util.SynthHelper.ClampF(value,-1,1);var dvalue;switch(formula){case 0:dvalue=1.570796326794895*(value+1)/2,this.Left=js.Boot.__cast(Math.cos(dvalue),Float),this.Right=js.Boot.__cast(Math.sin(dvalue),Float);break;case 1:this.Left=js.Boot.__cast(.5+-.5*value,Float),this.Right=js.Boot.__cast(.5+.5*value,Float);break;case 2:dvalue=1.570796326794895*(value+1)/2,this.Left=js.Boot.__cast(Math.cos(dvalue)/.707106781186,Float),this.Right=js.Boot.__cast(Math.sin(dvalue)/.707106781186,Float);break;default:throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid pan law selected."))}},__class__:alphaTab.audio.synth.bank.components.PanComponent},alphaTab.audio.synth.synthesis.VoiceManager=$hx_exports.alphaTab.audio.synth.synthesis.VoiceManager=function(voiceCount){this._voicePool=null,this._vNodes=null,this.Polyphony=0,this.FreeVoices=null,this.ActiveVoices=null,this.Registry=null,this.Polyphony=voiceCount;var this1=new Array(voiceCount);this._voicePool=this1,this._vNodes=new alphaTab.audio.synth.ds.LinkedList,this.FreeVoices=new alphaTab.audio.synth.ds.LinkedList,this.ActiveVoices=new alphaTab.audio.synth.ds.LinkedList;for(var i=0;i0){var voice=this.FreeVoices.First.Value;return this.FreeVoices.RemoveFirst(),voice}return this.StealQuietestVoice()},AddToRegistry:function(voice){var node=this._vNodes.RemoveLast();node.Value=voice,node.Next=this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note],this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note]=node},RemoveFromRegistry:function(channel,note){for(var node=this.Registry[channel][note];null!=node;)this._vNodes.AddLast(node),node=node.Next;this.Registry[channel][note]=null},RemoveVoiceFromRegistry:function(voice){var node=this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note];if(null!=node)if(node.Value==voice)this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note]=node.Next,this._vNodes.AddLast(node);else{var node2=node;for(node=node.Next;null!=node;){if(node.Value==voice)return node2.Next=node.Next,void this._vNodes.AddLast(node);node2=node,node=node.Next}}},ClearRegistry:function(){for(var node=this.ActiveVoices.First;null!=node;){for(var vnode=this.Registry[node.Value.VoiceParams.Channel][node.Value.VoiceParams.Note];null!=vnode;)this._vNodes.AddLast(vnode),vnode=vnode.Next;this.Registry[node.Value.VoiceParams.Channel][node.Value.VoiceParams.Note]=null,node=node.get_Next()}},UnloadPatches:function(){for(var v=HxOverrides.iter(this._voicePool);v.hasNext();){v.next().Configure(0,0,0,null,null);for(var current=this._vNodes.First;null!=current;)current.Value.Value=null,current=current.get_Next()}},StealQuietestVoice:function(){for(var voiceVolume=1e3,quietest=null,node=this.ActiveVoices.First;null!=node;){if(2!=node.Value.VoiceParams.State){var volume=node.Value.VoiceParams.get_CombinedVolume();if(volume=generator.EndPhase?this.CurrentState=3:this.Phase>=generator.LoopEndPhase?(this.CurrentState=2,this.CurrentEnd=generator.EndPhase):this.Phase>=generator.LoopStartPhase?(this.CurrentState=1,this.CurrentEnd=generator.LoopEndPhase,this.CurrentStart=generator.LoopStartPhase):(this.CurrentState=0,this.CurrentEnd=generator.LoopStartPhase);break;default:this.CurrentEnd=generator.EndPhase,this.Phase>=this.CurrentEnd?this.CurrentState=3:this.CurrentState=2}},__class__:alphaTab.audio.synth.bank.components.generators.GeneratorParameters},alphaTab.audio.synth.bank.components.Envelope=$hx_exports.alphaTab.audio.synth.bank.components.Envelope=function(){this._stages=null,this._index=0,this._stage=null,this.Value=0,this.CurrentStage=0,this.Depth=0,this.Value=0,this.Depth=0;var this1=new Array(7);this._stages=this1;for(var x=0;xsamples)this._index=this._index+samples,samples=0;else{if(this._index=0,6!=this.CurrentStage)for(;this._stage=this._stages[0|++this.CurrentStage],0==this._stage.Time;);samples-=neededSamples}if(!(samples>0))break}var i=system.Convert.ToInt32_Double(this._stage.Graph.length*(this._index/js.Boot.__cast(this._stage.Time,Float)));if(this._stage.Reverse){this.Value=(1-this._stage.Graph[i])*this._stage.Scale+this._stage.Offset}else this.Value=this._stage.Graph[i]*this._stage.Scale+this._stage.Offset},Release:function(lowerLimit){this.Value<=lowerLimit?(this._index=0,this.CurrentStage=6,this._stage=this._stages[this.CurrentStage]):this.CurrentStage<5&&(this._index=0,this.CurrentStage=5,this._stage=this._stages[this.CurrentStage],this._stage.Scale=this.Value)},ReleaseSf2VolumeEnvelope:function(){this.Value<=-100?(this._index=0,this.CurrentStage=6,this._stage=this._stages[this.CurrentStage]):this.CurrentStage<5&&(this._index=0,this.CurrentStage=5,this._stage=this._stages[this.CurrentStage],this._stage.Offset=-100,this._stage.Scale=100+this.Value)},__class__:alphaTab.audio.synth.bank.components.Envelope},alphaTab.audio.synth.bank.components.EnvelopeStage=$hx_exports.alphaTab.audio.synth.bank.components.EnvelopeStage=function(){this.Time=0,this.Graph=null,this.Scale=0,this.Offset=0,this.Reverse=!1,this.Time=0,this.Graph=null,this.Scale=0,this.Offset=0,this.Reverse=!1},alphaTab.audio.synth.bank.components.EnvelopeStage.__name__=["alphaTab","audio","synth","bank","components","EnvelopeStage"],alphaTab.audio.synth.bank.components.EnvelopeStage.prototype={__class__:alphaTab.audio.synth.bank.components.EnvelopeStage},alphaTab.audio.synth.util.Tables=$hx_exports.alphaTab.audio.synth.util.Tables=function(){},alphaTab.audio.synth.util.Tables.__name__=["alphaTab","audio","synth","util","Tables"],alphaTab.audio.synth.util.Tables.EnvelopeTables=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._envelopeTables[index]},alphaTab.audio.synth.util.Tables.SemitoneTable=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._semitoneTable[index]},alphaTab.audio.synth.util.Tables.CentTable=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._centTable[index]},alphaTab.audio.synth.util.Tables.SincTable=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._sincTable[index]},alphaTab.audio.synth.util.Tables.Init=function(){var this1=new Array(4);alphaTab.audio.synth.util.Tables._envelopeTables=this1,alphaTab.audio.synth.util.Tables._envelopeTables[0]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateSustainTable(64)),alphaTab.audio.synth.util.Tables._envelopeTables[1]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateLinearTable(64)),alphaTab.audio.synth.util.Tables._envelopeTables[2]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateExponentialTable(64,.09)),alphaTab.audio.synth.util.Tables._envelopeTables[3]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateSineTable(64)),alphaTab.audio.synth.util.Tables._centTable=alphaTab.audio.synth.util.Tables.CreateCentTable(),alphaTab.audio.synth.util.Tables._semitoneTable=alphaTab.audio.synth.util.Tables.CreateSemitoneTable(),alphaTab.audio.synth.util.Tables._sincTable=alphaTab.audio.synth.util.Tables.CreateSincTable(16,64,.43,alphaTab.audio.synth.util.Tables.HammingWindow),alphaTab.audio.synth.util.Tables._isInitialized=!0},alphaTab.audio.synth.util.Tables.CreateSquareTable=function(size,k){for(var squaretable=new Float32Array(size),inc=1/size,phase=0,x=0;x1e-5?Math.sin(sinc)/sinc:1;table[64*x+y]=js.Boot.__cast(gain*sinc*windowFunction(a,windowSize),Float),++y}++x}return table},alphaTab.audio.synth.util.Tables.prototype={__class__:alphaTab.audio.synth.util.Tables},alphaTab.audio.synth.bank.components.Filter=$hx_exports.alphaTab.audio.synth.bank.components.Filter=function(){this._a1=0,this._a2=0,this._b1=0,this._b2=0,this._m1=0,this._m2=0,this._m3=0,this._cutOff=0,this._resonance=0,this.FilterMethod=0,this.CoeffNeedsUpdating=!1,this._a1=0,this._a2=0,this._b1=0,this._b2=0,this._m1=0,this._m2=0,this._m3=0,this.FilterMethod=0,this.set_CutOff(0),this.set_Resonance(0)},alphaTab.audio.synth.bank.components.Filter.__name__=["alphaTab","audio","synth","bank","components","Filter"],alphaTab.audio.synth.bank.components.Filter.prototype={get_CutOff:function(){return this._cutOff},set_CutOff:function(value){return this._cutOff=value,this.CoeffNeedsUpdating=!0,this.get_CutOff()},get_Resonance:function(){return this._resonance},set_Resonance:function(value){return this._resonance=value,this.CoeffNeedsUpdating=!0,this.get_Resonance()},get_Enabled:function(){return 0!=this.FilterMethod},Disable:function(){this.FilterMethod=0},QuickSetup:function(sampleRate,note,velocity,filterInfo){this.CoeffNeedsUpdating=!1;var this1=filterInfo.CutOff;this.set_CutOff(this1);var this2=filterInfo.Resonance;this.set_Resonance(this2),this.FilterMethod=filterInfo.FilterMethod,this._a1=0,this._a2=0,this._b1=0,this._b2=0,this._m1=0,this._m2=0,this._m3=0,(this.get_CutOff()<=0||this.get_Resonance()<=0)&&(this.FilterMethod=0),0!=this.FilterMethod&&(this.set_CutOff(this.get_CutOff()*alphaTab.audio.synth.util.SynthHelper.CentsToPitch((note-filterInfo.RootKey)*filterInfo.KeyTrack+system.Convert.ToInt32_Single(velocity*filterInfo.VelTrack))),this.UpdateCoefficients(sampleRate))},ApplyFilter_Single:function(sample){switch(this.FilterMethod){case 1:case 2:return this._m3=sample-this._a1*this._m1-this._a2*this._m2,sample=this._b2*(this._m3+this._m2)+this._b1*this._m1,this._m2=this._m1,this._m1=this._m3,sample;case 3:return this._m1=this._m1+this._a1*(sample-this._m1),this._m1;default:return 0}},ApplyFilter_SampleArray:function(data){switch(this.FilterMethod){case 1:case 2:for(var x=0;x=this._generator.LoopEndPhase;)this._phase=this._generator.LoopStartPhase+(this._phase-this._generator.LoopEndPhase)%(this._generator.LoopEndPhase-this._generator.LoopStartPhase);var this2=this._generator.GetValue(this._phase);this.Value=this2}},Reset:function(){if(this.Value=0,this._delayTime>0){var this1=this._delayTime;this._phase=this1,this.CurrentState=0}else this._phase=0,this.CurrentState=1},__class__:alphaTab.audio.synth.bank.components.Lfo},alphaTab.audio.synth.bank.descriptors={},alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor=$hx_exports.alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor=function(){this.LoopMethod=0,this.SamplerType=0,this.AssetName=null,this.EndPhase=0,this.StartPhase=0,this.LoopEndPhase=0,this.LoopStartPhase=0,this.Offset=0,this.Period=0,this.RootKey=0,this.KeyTrack=0,this.VelTrack=0,this.Tune=0,this.LoopMethod=0,this.SamplerType=0,this.AssetName="null",this.EndPhase=-1,this.StartPhase=-1,this.LoopEndPhase=-1,this.LoopStartPhase=-1,this.Offset=0,this.Period=-1,this.RootKey=-1,this.KeyTrack=100,this.VelTrack=0,this.Tune=0},alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor.__name__=["alphaTab","audio","synth","bank","descriptors","GeneratorDescriptor"],alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor.prototype={__class__:alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor},alphaTab.audio.synth.bank.components.generators.Generator=$hx_exports.alphaTab.audio.synth.bank.components.generators.Generator=function(description){this.LoopMode=0,this.LoopStartPhase=0,this.LoopEndPhase=0,this.StartPhase=0,this.EndPhase=0,this.Offset=0,this.Period=0,this.Frequency=0,this.RootKey=0,this.KeyTrack=0,this.VelocityTrack=0,this.Tune=0,this.LoopMode=description.LoopMethod,this.LoopStartPhase=description.LoopStartPhase,this.LoopEndPhase=description.LoopEndPhase,this.StartPhase=description.StartPhase,this.EndPhase=description.EndPhase,this.Offset=description.Offset,this.Period=description.Period,this.Frequency=0,this.RootKey=description.RootKey,this.KeyTrack=description.KeyTrack,this.VelocityTrack=description.VelTrack,this.Tune=description.Tune},alphaTab.audio.synth.bank.components.generators.Generator.__name__=["alphaTab","audio","synth","bank","components","generators","Generator"],alphaTab.audio.synth.bank.components.generators.Generator.prototype={Release:function(generatorParams){3==this.LoopMode&&(generatorParams.CurrentState=2,generatorParams.CurrentStart=this.StartPhase,generatorParams.CurrentEnd=this.EndPhase)},GetValue:function(phase){throw new js._Boot.HaxeError("abstract")},GetValues:function(generatorParams,blockBuffer,increment){for(var proccessed=0;;){var samplesAvailable=system.Convert.ToInt32_Double(Math.ceil((generatorParams.CurrentEnd-generatorParams.Phase)/increment));if(samplesAvailable>blockBuffer.length-proccessed)for(;proccessed0?1:0},__class__:alphaTab.audio.synth.bank.components.generators.SquareGenerator}),alphaTab.audio.synth.bank.components.generators.TriangleGenerator=$hx_exports.alphaTab.audio.synth.bank.components.generators.TriangleGenerator=function(description){alphaTab.audio.synth.bank.components.generators.Generator.call(this,description),this.EndPhase<0&&(this.EndPhase=1.25),this.StartPhase<0&&(this.StartPhase=.25),this.LoopEndPhase<0&&(this.LoopEndPhase=this.EndPhase),this.LoopStartPhase<0&&(this.LoopStartPhase=this.StartPhase),this.Period<0&&(this.Period=1),this.RootKey<0&&(this.RootKey=69),this.Frequency=440},alphaTab.audio.synth.bank.components.generators.TriangleGenerator.__name__=["alphaTab","audio","synth","bank","components","generators","TriangleGenerator"],alphaTab.audio.synth.bank.components.generators.TriangleGenerator.__super__=alphaTab.audio.synth.bank.components.generators.Generator,alphaTab.audio.synth.bank.components.generators.TriangleGenerator.prototype=$extend(alphaTab.audio.synth.bank.components.generators.Generator.prototype,{GetValue:function(phase){return js.Boot.__cast(4*Math.abs(phase-Math.floor(phase+.5))-1,Float)},__class__:alphaTab.audio.synth.bank.components.generators.TriangleGenerator}),alphaTab.audio.synth.bank.components.generators.DefaultGenerators=$hx_exports.alphaTab.audio.synth.bank.components.generators.DefaultGenerators=function(){},alphaTab.audio.synth.bank.components.generators.DefaultGenerators.__name__=["alphaTab","audio","synth","bank","components","generators","DefaultGenerators"],alphaTab.audio.synth.bank.components.generators.DefaultGenerators.prototype={__class__:alphaTab.audio.synth.bank.components.generators.DefaultGenerators},alphaTab.audio.synth.synthesis.VoiceNode=$hx_exports.alphaTab.audio.synth.synthesis.VoiceNode=function(){this.Value=null,this.Next=null},alphaTab.audio.synth.synthesis.VoiceNode.__name__=["alphaTab","audio","synth","synthesis","VoiceNode"],alphaTab.audio.synth.synthesis.VoiceNode.prototype={__class__:alphaTab.audio.synth.synthesis.VoiceNode},alphaTab.audio.synth.MidiFileSequencer=$hx_exports.alphaTab.audio.synth.MidiFileSequencer=function(synthesizer){this._synthesizer=null,this._tempoChanges=null,this._firstProgramEventPerChannel=null,this._synthData=null,this._division=0,this._eventIndex=0,this._currentTime=0,this._playbackRange=null,this._playbackRangeStartTime=0,this._playbackRangeEndTime=0,this._endTime=0,this.IsLooping=!1,this.EndTick=0,this.PlaybackSpeed=0,this._synthesizer=synthesizer;this._firstProgramEventPerChannel={};this._tempoChanges=[],this.PlaybackSpeed=1},alphaTab.audio.synth.MidiFileSequencer.__name__=["alphaTab","audio","synth","MidiFileSequencer"],alphaTab.audio.synth.MidiFileSequencer.prototype={get_PlaybackRange:function(){return this._playbackRange},set_PlaybackRange:function(value){return this._playbackRange=value,null!=value&&(this._playbackRangeStartTime=this.TickPositionToTimePositionWithSpeed(value.StartTick,1),this._playbackRangeEndTime=this.TickPositionToTimePositionWithSpeed(value.EndTick,1)),this.get_PlaybackRange()},get_EndTime:function(){return this._endTime/this.PlaybackSpeed},Seek:function(timePosition){timePosition*=this.PlaybackSpeed,null!=this.get_PlaybackRange()&&(timePositionthis._playbackRangeEndTime&&(timePosition=this._playbackRangeEndTime)),(timePosition-=25)<0&&(timePosition=0),timePosition>this._currentTime?this.SilentProcess(timePosition-this._currentTime):timePosition0)for(;metronomeTickb.Time?1:a.Time0&&maxMilliseconds=this._endTime)this._currentTime=0,this._eventIndex=0,this._synthesizer.NoteOffAll(!0),this._synthesizer.ResetPrograms(),this._synthesizer.ResetSynthControls(),this.OnFinished();else if(null!=this.get_PlaybackRange()&&this._currentTime>=this._playbackRangeEndTime){var this1=this.get_PlaybackRange().StartTick;this._currentTime=this1,this._eventIndex=0,this._synthesizer.NoteOffAll(!0),this._synthesizer.ResetPrograms(),this._synthesizer.ResetSynthControls(),this.OnFinished()}},SetChannelProgram:function(channel,program){this._firstProgramEventPerChannel.hasOwnProperty(channel)&&this._firstProgramEventPerChannel[channel].Event.set_Data1(program)},__class__:alphaTab.audio.synth.MidiFileSequencer},alphaTab.rendering={},alphaTab.rendering.layout={},alphaTab.rendering.layout.ScoreLayout=$hx_exports.alphaTab.rendering.layout.ScoreLayout=function(renderer){this._barRendererLookup=null,this.Renderer=null,this.Width=0,this.Height=0,this.ScoreInfoGlyphs=null,this.TuningGlyph=null,this.FirstBarIndex=0,this.LastBarIndex=0,this.Renderer=renderer;this._barRendererLookup={}},alphaTab.rendering.layout.ScoreLayout.__name__=["alphaTab","rendering","layout","ScoreLayout"],alphaTab.rendering.layout.ScoreLayout.prototype={get_Name:function(){throw new js._Boot.HaxeError("abstract")},get_SupportsResize:function(){throw new js._Boot.HaxeError("abstract")},Resize:function(){throw new js._Boot.HaxeError("abstract")},LayoutAndRender:function(){var score=this.Renderer.Score,startIndex=this.Renderer.Settings.Layout.Get("start",1);--startIndex,startIndex=Math.min(score.MasterBars.length-1,Math.max(0,startIndex)),this.FirstBarIndex=startIndex;var endBarIndex=this.Renderer.Settings.Layout.Get("count",score.MasterBars.length);endBarIndex<0&&(endBarIndex=score.MasterBars.length),endBarIndex=startIndex+endBarIndex-1,endBarIndex=Math.min(score.MasterBars.length-1,Math.max(0,endBarIndex)),this.LastBarIndex=endBarIndex,this.CreateScoreInfoGlyphs(),this.DoLayoutAndRender()},DoLayoutAndRender:function(){throw new js._Boot.HaxeError("abstract")},CreateScoreInfoGlyphs:function(){alphaTab.util.Logger.Info("ScoreLayout","Creating score info glyphs",null);var flags=this.Renderer.Settings.Layout.Get("hideInfo",!1)?0:511,score=this.Renderer.Score,res=this.Renderer.RenderingResources;this.ScoreInfoGlyphs={};var s=score.Title;null!=s&&0!=s.length&&0!=(1&flags)&&(this.ScoreInfoGlyphs[1]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.Title,res.TitleFont,1));var s1=score.SubTitle;null!=s1&&0!=s1.length&&0!=(2&flags)&&(this.ScoreInfoGlyphs[2]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.SubTitle,res.SubTitleFont,1));var s2=score.Artist;null!=s2&&0!=s2.length&&0!=(4&flags)&&(this.ScoreInfoGlyphs[4]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.Artist,res.SubTitleFont,1));var s3=score.Album;null!=s3&&0!=s3.length&&0!=(8&flags)&&(this.ScoreInfoGlyphs[8]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.Album,res.SubTitleFont,1));var s4=score.Music;if(!!(null!=s4&&0!=s4.length&&score.Music==score.Words)&&0!=(64&flags))this.ScoreInfoGlyphs[64]=new alphaTab.rendering.glyphs.TextGlyph(0,0,"Music and Words by "+score.Words,res.WordsFont,1);else{var s5=score.Music;null!=s5&&0!=s5.length&&0!=(32&flags)&&(this.ScoreInfoGlyphs[32]=new alphaTab.rendering.glyphs.TextGlyph(0,0,"Music by "+score.Music,res.WordsFont,2));var s6=score.Words;null!=s6&&0!=s6.length&&0!=(16&flags)&&(this.ScoreInfoGlyphs[16]=new alphaTab.rendering.glyphs.TextGlyph(0,0,"Words by "+score.Words,res.WordsFont,0))}if(!this.Renderer.Settings.Layout.Get("hideTuning",!1)){for(var staffWithTuning=null,track=HxOverrides.iter(this.Renderer.Tracks);track.hasNext();){for(var staff=$iterator(track.next().Staves)();staff.hasNext();){var staff1=staff.next();if(2!=staff1.StaffKind&&staff1.get_IsStringed()&&staff1.Tuning.length>0){staffWithTuning=staff1;break}}if(null!=staffWithTuning)break}if(null!=staffWithTuning){var tuning=alphaTab.model.Tuning.FindTuning(staffWithTuning.Tuning);null!=tuning&&(this.TuningGlyph=new alphaTab.rendering.glyphs.TuningGlyph(0,0,this.get_Scale(),this.Renderer.RenderingResources,tuning))}}},get_Scale:function(){return this.Renderer.Settings.Scale},CreateEmptyStaveGroup:function(){var group=new alphaTab.rendering.staves.StaveGroup;group.Layout=this;for(var trackIndex=0;trackIndex1;)renderers=group1.RevertLastBar(),--currentIndex;group1.IsFull=!0,group1.IsLast=this.LastBarIndex==group1.get_LastBarIndex(),this._groups.push(group1),this.FitGroup(group1),group1.FinalizeGroup(),y+=this.PaintGroup(group1,oldHeight,canvas),(group1=this.CreateEmptyStaveGroup()).Index=this._groups.length,group1.X=x,group1.Y=y}}group1.IsLast=this.LastBarIndex==group1.get_LastBarIndex(),this.FitGroup(group1),group1.FinalizeGroup(),y+=this.PaintGroup(group1,oldHeight,canvas)}return y},LayoutAndRenderScore:function(x,y){var canvas=this.Renderer.Canvas,currentBarIndex=this.FirstBarIndex,endBarIndex=this.LastBarIndex;for(this._groups=[];currentBarIndex<=endBarIndex;){var group=this.CreateStaveGroup(currentBarIndex,endBarIndex);this._groups.push(group),group.X=x,group.Y=y,currentBarIndex=group.get_LastBarIndex()+1,this.FitGroup(group),group.FinalizeGroup(),alphaTab.util.Logger.Info(this.get_Name(),"Rendering partial from bar "+group.get_FirstBarIndex()+" to "+group.get_LastBarIndex(),null),y+=this.PaintGroup(group,y,canvas)}return y},PaintGroup:function(group,totalHeight,canvas){var height=group.get_Height()+20*this.get_Scale();canvas.BeginRender(this.Width,height),this.Renderer.Canvas.set_Color(this.Renderer.RenderingResources.MainGlyphColor),this.Renderer.Canvas.set_TextAlign(0),group.Paint(0,-group.Y,canvas),totalHeight+=height;var result=canvas.EndRender(),args=new alphaTab.rendering.RenderFinishedEventArgs;return args.TotalWidth=this.Width,args.TotalHeight=totalHeight,args.Width=this.Width,args.Height=height,args.RenderResult=result,args.FirstMasterBarIndex=group.get_FirstBarIndex(),args.LastMasterBarIndex=group.get_LastBarIndex(),this.Renderer.OnPartialRenderFinished(args),height},FitGroup:function(group){(group.IsFull||group.Width>this.get_MaxWidth())&&group.ScaleToWidth(this.get_MaxWidth()),this.Width=Math.max(this.Width,group.Width)},CreateStaveGroup:function(currentBarIndex,endIndex){var group=this.CreateEmptyStaveGroup();group.Index=this._groups.length;for(var barsPerRow=this.Renderer.Settings.Layout.Get("barsPerRow",-1),maxWidth=this.get_MaxWidth(),end=endIndex+1,i=currentBarIndex;i0)for(var renderer=$iterator(this._barsFromPreviousGroup)();renderer.hasNext();){var renderer1=renderer.next();group.AddMasterBarRenderers(this.Renderer.Tracks,renderer1),i=renderer1.MasterBar.Index}else{var renderers=group.AddBars(this.Renderer.Tracks,i);this._allMasterBarRenderers.push(renderers)}this._barsFromPreviousGroup=[];var groupIsFull=!1;if(-1==barsPerRow&&group.Width>=maxWidth&&0!=group.MasterBarsRenderers.length?groupIsFull=!0:group.MasterBarsRenderers.length==barsPerRow+1&&(groupIsFull=!0),groupIsFull){var reverted=group.RevertLastBar();if(null!=reverted)for(this._barsFromPreviousGroup.push(reverted);null!=reverted&&!reverted.CanWrap&&group.MasterBarsRenderers.length>1;)reverted=group.RevertLastBar(),this._barsFromPreviousGroup.push(reverted);return group.IsFull=!0,group.IsLast=!1,this._barsFromPreviousGroup.reverse(),group}group.X=0,++i}return group.IsLast=endIndex==group.get_LastBarIndex(),group},get_MaxWidth:function(){return this.Renderer.Settings.Width-this._pagePadding[0]-this._pagePadding[2]},__class__:alphaTab.rendering.layout.PageViewLayout}),alphaTab.rendering.layout.HorizontalScreenLayout=$hx_exports.alphaTab.rendering.layout.HorizontalScreenLayout=function(renderer){alphaTab.rendering.layout.ScoreLayout.call(this,renderer),this._group=null,this._pagePadding=null},alphaTab.rendering.layout.HorizontalScreenLayout.__name__=["alphaTab","rendering","layout","HorizontalScreenLayout"],alphaTab.rendering.layout.HorizontalScreenLayout.__super__=alphaTab.rendering.layout.ScoreLayout,alphaTab.rendering.layout.HorizontalScreenLayout.prototype=$extend(alphaTab.rendering.layout.ScoreLayout.prototype,{get_Name:function(){return"HorizontalScreen"},get_SupportsResize:function(){return!1},Resize:function(){},DoLayoutAndRender:function(){this._pagePadding=this.Renderer.Settings.Layout.Get("padding",alphaTab.rendering.layout.HorizontalScreenLayout.PagePadding),1==this._pagePadding.length?this._pagePadding=new Float32Array([this._pagePadding[0],this._pagePadding[0],this._pagePadding[0],this._pagePadding[0]]):2==this._pagePadding.length&&(this._pagePadding=new Float32Array([this._pagePadding[0],this._pagePadding[1],this._pagePadding[0],this._pagePadding[1]]));var score=this.Renderer.Score,canvas=this.Renderer.Canvas,startIndex=this.Renderer.Settings.Layout.Get("start",1);--startIndex;var currentBarIndex=startIndex=Math.min(score.MasterBars.length-1,Math.max(0,startIndex)),endBarIndex=this.Renderer.Settings.Layout.Get("count",score.MasterBars.length);endBarIndex<0&&(endBarIndex=score.MasterBars.length),endBarIndex=startIndex+endBarIndex-1,endBarIndex=Math.min(score.MasterBars.length-1,Math.max(0,endBarIndex)),this._group=this.CreateEmptyStaveGroup(),this._group.IsLast=!0,this._group.X=this._pagePadding[0],this._group.Y=this._pagePadding[1];for(var countPerPartial=this.Renderer.Settings.Layout.Get("countPerPartial",10),partials=[],currentPartial=new alphaTab.rendering.layout.HorizontalScreenLayoutPartialInfo;currentBarIndex<=endBarIndex;){var result=this._group.AddBars(this.Renderer.Tracks,currentBarIndex);if(0==currentPartial.MasterBars.length&&result.IsLinkedToPrevious&&partials.length>0){var previousPartial=partials[partials.length-1];previousPartial.MasterBars.push(score.MasterBars[currentBarIndex]),previousPartial.Width=previousPartial.Width+result.Width}else currentPartial.MasterBars.push(score.MasterBars[currentBarIndex]),currentPartial.Width=currentPartial.Width+result.Width,currentPartial.MasterBars.length>=countPerPartial&&(0==partials.length&&(currentPartial.Width=currentPartial.Width+(this._group.X+this._group.AccoladeSpacing)),partials.push(currentPartial),alphaTab.util.Logger.Info(this.get_Name(),"Finished partial from bar "+currentPartial.MasterBars[0].Index+" to "+currentPartial.MasterBars[currentPartial.MasterBars.length-1].Index,null),currentPartial=new alphaTab.rendering.layout.HorizontalScreenLayoutPartialInfo);++currentBarIndex}currentPartial.MasterBars.length>0&&(0==partials.length&&(currentPartial.Width=currentPartial.Width+(this._group.X+this._group.AccoladeSpacing)),partials.push(currentPartial),alphaTab.util.Logger.Info(this.get_Name(),"Finished partial from bar "+currentPartial.MasterBars[0].Index+" to "+currentPartial.MasterBars[currentPartial.MasterBars.length-1].Index,null)),this._group.FinalizeGroup(),this.Height=this._group.Y+this._group.get_Height()+this._pagePadding[3],this.Width=this._group.X+this._group.Width+this._pagePadding[2],currentBarIndex=0;for(var i=0;i0&&beat.Voice.Bar.get_MasterBar().TripletFeel!=beat.Voice.Bar.get_MasterBar().PreviousMasterBar.TripletFeel)},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TripletFeelGlyph(beat.Voice.Bar.get_MasterBar().TripletFeel)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.TripletFeelEffectInfo},alphaTab.rendering.effects.MarkerEffectInfo=$hx_exports.alphaTab.rendering.effects.MarkerEffectInfo=function(){},alphaTab.rendering.effects.MarkerEffectInfo.__name__=["alphaTab","rendering","effects","MarkerEffectInfo"],alphaTab.rendering.effects.MarkerEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.MarkerEffectInfo.prototype={get_EffectId:function(){return"marker"},get_HideOnMultiTrack:function(){return!0},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 0},ShouldCreateGlyph:function(settings,beat){return 0==beat.Voice.Bar.Staff.Index&&0==beat.Voice.Index&&0==beat.Index&&beat.Voice.Bar.get_MasterBar().get_IsSectionStart()},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TextGlyph(0,0,beat.Voice.Bar.get_MasterBar().Section.Text,renderer.get_Resources().MarkerFont,0)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.MarkerEffectInfo},alphaTab.rendering.effects.TextEffectInfo=$hx_exports.alphaTab.rendering.effects.TextEffectInfo=function(){},alphaTab.rendering.effects.TextEffectInfo.__name__=["alphaTab","rendering","effects","TextEffectInfo"],alphaTab.rendering.effects.TextEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.TextEffectInfo.prototype={get_EffectId:function(){return"text"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){var s=beat.Text;return!(null==s||0==StringTools.trim(s).length)},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TextGlyph(0,0,beat.Text,renderer.get_Resources().EffectFont,0)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.TextEffectInfo},alphaTab.rendering.effects.ChordsEffectInfo=$hx_exports.alphaTab.rendering.effects.ChordsEffectInfo=function(){},alphaTab.rendering.effects.ChordsEffectInfo.__name__=["alphaTab","rendering","effects","ChordsEffectInfo"],alphaTab.rendering.effects.ChordsEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.ChordsEffectInfo.prototype={get_EffectId:function(){return"chords"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){return beat.get_HasChord()},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TextGlyph(0,0,beat.get_Chord().Name,renderer.get_Resources().EffectFont,1)},CanExpand:function(from,to){return!1},__class__:alphaTab.rendering.effects.ChordsEffectInfo},alphaTab.rendering.effects.FermataEffectInfo=$hx_exports.alphaTab.rendering.effects.FermataEffectInfo=function(){},alphaTab.rendering.effects.FermataEffectInfo.__name__=["alphaTab","rendering","effects","FermataEffectInfo"],alphaTab.rendering.effects.FermataEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.FermataEffectInfo.prototype={get_EffectId:function(){return"fermata"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){return null!=beat.Fermata},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.FermataGlyph(0,0,beat.Fermata.Type)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.FermataEffectInfo},alphaTab.rendering.effects.WhammyBarEffectInfo=$hx_exports.alphaTab.rendering.effects.WhammyBarEffectInfo=function(){},alphaTab.rendering.effects.WhammyBarEffectInfo.__name__=["alphaTab","rendering","effects","WhammyBarEffectInfo"],alphaTab.rendering.effects.WhammyBarEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.WhammyBarEffectInfo.prototype={get_EffectId:function(){return"whammy"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 4},ShouldCreateGlyph:function(settings,beat){return beat.get_HasWhammyBar()},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.LineRangedGlyph("w/bar")},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.WhammyBarEffectInfo},alphaTab.rendering.effects.NoteEffectInfoBase=$hx_exports.alphaTab.rendering.effects.NoteEffectInfoBase=function(){this.LastCreateInfo=null},alphaTab.rendering.effects.NoteEffectInfoBase.__name__=["alphaTab","rendering","effects","NoteEffectInfoBase"],alphaTab.rendering.effects.NoteEffectInfoBase.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.NoteEffectInfoBase.prototype={ShouldCreateGlyph:function(settings,beat){this.LastCreateInfo=[];for(var i=0,j=beat.Notes.length;i0},ShouldCreateGlyphForNote:function(note){throw new js._Boot.HaxeError("abstract")},get_EffectId:function(){throw new js._Boot.HaxeError("abstract")},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){throw new js._Boot.HaxeError("abstract")},CreateNewGlyph:function(renderer,beat){throw new js._Boot.HaxeError("abstract")},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.NoteEffectInfoBase},alphaTab.rendering.effects.TrillEffectInfo=$hx_exports.alphaTab.rendering.effects.TrillEffectInfo=function(){alphaTab.rendering.effects.NoteEffectInfoBase.call(this)},alphaTab.rendering.effects.TrillEffectInfo.__name__=["alphaTab","rendering","effects","TrillEffectInfo"],alphaTab.rendering.effects.TrillEffectInfo.__super__=alphaTab.rendering.effects.NoteEffectInfoBase,alphaTab.rendering.effects.TrillEffectInfo.prototype=$extend(alphaTab.rendering.effects.NoteEffectInfoBase.prototype,{get_EffectId:function(){return"trill"},ShouldCreateGlyphForNote:function(note){return note.get_IsTrill()},get_SizingMode:function(){return 1},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TrillGlyph(0,0)},__class__:alphaTab.rendering.effects.TrillEffectInfo}),alphaTab.rendering.effects.OttaviaEffectInfo=$hx_exports.alphaTab.rendering.effects.OttaviaEffectInfo=function(aboveStaff){this._aboveStaff=!1,this._aboveStaff=aboveStaff},alphaTab.rendering.effects.OttaviaEffectInfo.__name__=["alphaTab","rendering","effects","OttaviaEffectInfo"],alphaTab.rendering.effects.OttaviaEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.OttaviaEffectInfo.prototype={get_EffectId:function(){return"ottavia-"+(this._aboveStaff?"above":"below")},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 4},ShouldCreateGlyph:function(settings,beat){switch(beat.Ottava){case 0:case 1:return this._aboveStaff;case 3:case 4:return!this._aboveStaff}return!1},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.OttavaGlyph(beat.Ottava,this._aboveStaff)},CanExpand:function(from,to){return from.Ottava==to.Ottava},__class__:alphaTab.rendering.effects.OttaviaEffectInfo},alphaTab.rendering.effects.WideBeatVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.WideBeatVibratoEffectInfo=function(){},alphaTab.rendering.effects.WideBeatVibratoEffectInfo.__name__=["alphaTab","rendering","effects","WideBeatVibratoEffectInfo"],alphaTab.rendering.effects.WideBeatVibratoEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.WideBeatVibratoEffectInfo.prototype={get_EffectId:function(){return"wide-beat-vibrato"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 5},ShouldCreateGlyph:function(settings,beat){return 2==beat.Vibrato},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.BeatVibratoGlyph(2)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.WideBeatVibratoEffectInfo},alphaTab.rendering.effects.SlightBeatVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.SlightBeatVibratoEffectInfo=function(){},alphaTab.rendering.effects.SlightBeatVibratoEffectInfo.__name__=["alphaTab","rendering","effects","SlightBeatVibratoEffectInfo"],alphaTab.rendering.effects.SlightBeatVibratoEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.SlightBeatVibratoEffectInfo.prototype={get_EffectId:function(){return"slight-beat-vibrato"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 5},ShouldCreateGlyph:function(settings,beat){return 1==beat.Vibrato},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.BeatVibratoGlyph(1)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.SlightBeatVibratoEffectInfo},alphaTab.rendering.effects.WideNoteVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.WideNoteVibratoEffectInfo=function(){alphaTab.rendering.effects.NoteEffectInfoBase.call(this)},alphaTab.rendering.effects.WideNoteVibratoEffectInfo.__name__=["alphaTab","rendering","effects","WideNoteVibratoEffectInfo"],alphaTab.rendering.effects.WideNoteVibratoEffectInfo.__super__=alphaTab.rendering.effects.NoteEffectInfoBase,alphaTab.rendering.effects.WideNoteVibratoEffectInfo.prototype=$extend(alphaTab.rendering.effects.NoteEffectInfoBase.prototype,{get_EffectId:function(){return"wide-note-vibrato"},ShouldCreateGlyphForNote:function(note){return 2==note.Vibrato||!!note.IsTieDestination&&2==note.TieOrigin.Vibrato},get_SizingMode:function(){return 5},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,2,1.2)},__class__:alphaTab.rendering.effects.WideNoteVibratoEffectInfo}),alphaTab.rendering.effects.SlightNoteVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.SlightNoteVibratoEffectInfo=function(){alphaTab.rendering.effects.NoteEffectInfoBase.call(this)},alphaTab.rendering.effects.SlightNoteVibratoEffectInfo.__name__=["alphaTab","rendering","effects","SlightNoteVibratoEffectInfo"],alphaTab.rendering.effects.SlightNoteVibratoEffectInfo.__super__=alphaTab.rendering.effects.NoteEffectInfoBase,alphaTab.rendering.effects.SlightNoteVibratoEffectInfo.prototype=$extend(alphaTab.rendering.effects.NoteEffectInfoBase.prototype,{get_EffectId:function(){return"slight-note-vibrato"},ShouldCreateGlyphForNote:function(note){return 1==note.Vibrato||!!note.IsTieDestination&&1==note.TieOrigin.Vibrato},get_SizingMode:function(){return 5},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2)},__class__:alphaTab.rendering.effects.SlightNoteVibratoEffectInfo}),alphaTab.rendering.effects.AlternateEndingsEffectInfo=$hx_exports.alphaTab.rendering.effects.AlternateEndingsEffectInfo=function(){},alphaTab.rendering.effects.AlternateEndingsEffectInfo.__name__=["alphaTab","rendering","effects","AlternateEndingsEffectInfo"],alphaTab.rendering.effects.AlternateEndingsEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.AlternateEndingsEffectInfo.prototype={get_EffectId:function(){return"alternate-feel"},get_HideOnMultiTrack:function(){return!0},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 6},ShouldCreateGlyph:function(settings,beat){return 0==beat.Index&&0!=beat.Voice.Bar.get_MasterBar().AlternateEndings},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.AlternateEndingsGlyph(0,0,beat.Voice.Bar.get_MasterBar().AlternateEndings)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.AlternateEndingsEffectInfo},alphaTab.rendering.BarRendererFactory=$hx_exports.alphaTab.rendering.BarRendererFactory=function(){this.IsInAccolade=!1,this.HideOnMultiTrack=!1,this.HideOnPercussionTrack=!1,this.IsInAccolade=!0,this.HideOnPercussionTrack=!1,this.HideOnMultiTrack=!1},alphaTab.rendering.BarRendererFactory.__name__=["alphaTab","rendering","BarRendererFactory"],alphaTab.rendering.BarRendererFactory.prototype={get_StaffId:function(){throw new js._Boot.HaxeError("abstract")},CanCreate:function(track,staff){return!this.HideOnPercussionTrack||2!=staff.StaffKind},Create:function(renderer,bar,staveSettings){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.rendering.BarRendererFactory},alphaTab.rendering.EffectBarRendererFactory=$hx_exports.alphaTab.rendering.EffectBarRendererFactory=function(staffId,infos){alphaTab.rendering.BarRendererFactory.call(this),this._infos=null,this._staffId=null,this._infos=infos,this._staffId=staffId,this.IsInAccolade=!1},alphaTab.rendering.EffectBarRendererFactory.__name__=["alphaTab","rendering","EffectBarRendererFactory"],alphaTab.rendering.EffectBarRendererFactory.__super__=alphaTab.rendering.BarRendererFactory,alphaTab.rendering.EffectBarRendererFactory.prototype=$extend(alphaTab.rendering.BarRendererFactory.prototype,{get_StaffId:function(){return this._staffId},Create:function(renderer,bar,staveSettings){return new alphaTab.rendering.EffectBarRenderer(renderer,bar,this._infos)},__class__:alphaTab.rendering.EffectBarRendererFactory}),alphaTab.rendering.ScoreBarRendererFactory=$hx_exports.alphaTab.rendering.ScoreBarRendererFactory=function(){alphaTab.rendering.BarRendererFactory.call(this)},alphaTab.rendering.ScoreBarRendererFactory.__name__=["alphaTab","rendering","ScoreBarRendererFactory"],alphaTab.rendering.ScoreBarRendererFactory.__super__=alphaTab.rendering.BarRendererFactory,alphaTab.rendering.ScoreBarRendererFactory.prototype=$extend(alphaTab.rendering.BarRendererFactory.prototype,{get_StaffId:function(){return"score"},Create:function(renderer,bar,staveSettings){return new alphaTab.rendering.ScoreBarRenderer(renderer,bar)},__class__:alphaTab.rendering.ScoreBarRendererFactory}),alphaTab.rendering.effects.CrescendoEffectInfo=$hx_exports.alphaTab.rendering.effects.CrescendoEffectInfo=function(){},alphaTab.rendering.effects.CrescendoEffectInfo.__name__=["alphaTab","rendering","effects","CrescendoEffectInfo"],alphaTab.rendering.effects.CrescendoEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.CrescendoEffectInfo.prototype={get_EffectId:function(){return"crescendo"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 5},ShouldCreateGlyph:function(settings,beat){return 0!=beat.Crescendo},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.CrescendoGlyph(0,0,beat.Crescendo)},CanExpand:function(from,to){return from.Crescendo==to.Crescendo},__class__:alphaTab.rendering.effects.CrescendoEffectInfo},alphaTab.rendering.effects.DynamicsEffectInfo=$hx_exports.alphaTab.rendering.effects.DynamicsEffectInfo=function(){},alphaTab.rendering.effects.DynamicsEffectInfo.__name__=["alphaTab","rendering","effects","DynamicsEffectInfo"],alphaTab.rendering.effects.DynamicsEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.DynamicsEffectInfo.prototype={get_EffectId:function(){return"dynamics"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){return this.InternalShouldCreateGlyph(settings,beat,!0)},InternalShouldCreateGlyph:function(settings,beat,checkForDuplicates){if(beat.Voice.Bar.Staff.Track.Score.Stylesheet.HideDynamics||beat.IsEmpty||beat.Voice.IsEmpty)return!1;var show=0==beat.Voice.Index&&0==beat.Index&&0==beat.Voice.Bar.Index||null!=beat.PreviousBeat&&beat.Dynamic!=beat.PreviousBeat.Dynamic;if(show&&beat.Voice.Index>0)for(var voice=$iterator(beat.Voice.Bar.Voices)();voice.hasNext();){var voice1=voice.next();if(voice1.Index0&&alphaTab.rendering.BarRendererFactory.prototype.CanCreate.call(this,track,staff)},Create:function(renderer,bar,staveSettings){var tabBarRenderer=new alphaTab.rendering.TabBarRenderer(renderer,bar);return tabBarRenderer.ShowRests=this._showRests,tabBarRenderer.ShowTimeSignature=this._showTimeSignature,tabBarRenderer.ShowTiedNotes=this._showTiedNotes,tabBarRenderer.RenderRhythm=staveSettings.Get("rhythm",tabBarRenderer.RenderRhythm),tabBarRenderer.RhythmHeight=staveSettings.Get("rhythmHeight",tabBarRenderer.RhythmHeight),tabBarRenderer.RhythmBeams=staveSettings.Get("rhythmBeams",tabBarRenderer.RhythmBeams),tabBarRenderer},__class__:alphaTab.rendering.TabBarRendererFactory}),alphaTab.Environment=$hx_exports.alphaTab.Environment=function(){},alphaTab.Environment.__name__=["alphaTab","Environment"],alphaTab.Environment.PlatformInit=function(){if(alphaTab.Environment.RenderEngines.svg=function(){return new alphaTab.platform.svg.CssFontSvgCanvas},alphaTab.Environment.RenderEngines.default=function(){return new alphaTab.platform.svg.CssFontSvgCanvas},alphaTab.Environment.RenderEngines.html5=function(){return new alphaTab.platform.javaScript.Html5Canvas},alphaTab.Environment.RegisterJQueryPlugin(),Math.log2=Math.log2||function(x){return Math.log(x)*Math.LOG2E},$global.document){window.AudioContext=window.AudioContext||window.webkitAudioContext;var document=window.document,vbAjaxLoader="";vbAjaxLoader+="Function VbAjaxLoader(method, fileName)\r\n",vbAjaxLoader+=" Dim xhr\r\n",vbAjaxLoader+=' Set xhr = CreateObject("Microsoft.XMLHTTP")\r\n',vbAjaxLoader+=" xhr.Open method, fileName, False\r\n",vbAjaxLoader+=' xhr.setRequestHeader "Accept-Charset", "x-user-defined"\r\n',vbAjaxLoader+=" xhr.send\r\n",vbAjaxLoader+=" Dim byteArray()\r\n",vbAjaxLoader+=" if xhr.Status = 200 Then\r\n",vbAjaxLoader+=" Dim byteString\r\n",vbAjaxLoader+=" Dim i\r\n",vbAjaxLoader+=" byteString=xhr.responseBody\r\n",vbAjaxLoader+=" ReDim byteArray(LenB(byteString))\r\n",vbAjaxLoader+=" For i = 1 To LenB(byteString)\r\n",vbAjaxLoader+=" byteArray(i-1) = AscB(MidB(byteString, i, 1))\r\n",vbAjaxLoader+=" Next\r\n",vbAjaxLoader+=" End If\r\n",vbAjaxLoader+=" VbAjaxLoader=byteArray\r\n",vbAjaxLoader+="End Function\r\n";var vbAjaxLoaderScript=document.createElement("script");vbAjaxLoaderScript.setAttribute("type","text/vbscript");var inlineScript=document.createTextNode(vbAjaxLoader);vbAjaxLoaderScript.appendChild(inlineScript),document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(vbAjaxLoaderScript)},!1);var scriptElement=document.currentScript;if(!scriptElement)try{var error=new Error,stack=error.stack;if(!stack)throw error;alphaTab.Environment.ScriptFile=alphaTab.Environment.ScriptFileFromStack(stack)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,Error))throw e;var stack1=e.stack;stack1?alphaTab.Environment.ScriptFile=alphaTab.Environment.ScriptFileFromStack(stack1):scriptElement=document.querySelector("script[data-alphatab]")}var s=alphaTab.Environment.ScriptFile;null!=s&&0!=s.length||(scriptElement?alphaTab.Environment.ScriptFile=scriptElement.src:alphaTab.util.Logger.Warning("Environment","Could not automatically find alphaTab script file for worker, please add the data-alphatab attribute to the script tag that includes alphaTab or provide it when initializing alphaTab",null)),alphaTab.Environment.CheckForFontAvailability()}else{"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&(alphaTab.platform.javaScript.AlphaTabWebWorker.Init(),alphaTab.platform.javaScript.AlphaSynthWebWorker.Init())}},alphaTab.Environment.RegisterJQueryPlugin=function(){if($global&&"jQuery"in $global){var jquery=window.jQuery,api=new alphaTab.platform.javaScript.JQueryAlphaTab;jquery.fn.alphaTab=function(method){if(1==this.length){var _this1=this[0],tmp=Array.prototype.slice.call(arguments,1);return api.Exec(_this1,method,tmp)}return this.each(function(){var tmp1=Array.prototype.slice.call(arguments,1);api.Exec(this,method,tmp1)})},jquery.alphaTab={restore:alphaTab.platform.javaScript.JQueryAlphaTab.Restore},jquery.fn.alphaTab.fn=api}},alphaTab.Environment.ScriptFileFromStack=function(stack){var matches=stack.match("(data:text\\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?");return matches||(matches=stack.match("^(?:|[^:@]*@|.+\\)@(?=data:text\\/javascript|blob|http[s]?|file)|.+?\\s+(?: at |@)(?:[^:\\(]+ )*[\\(]?)(data:text\\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?"))||(matches=stack.match("\\)@(data:text\\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?"))?matches[1]:null},alphaTab.Environment.CheckForFontAvailability=function(){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope)alphaTab.Environment.IsFontLoaded=!1;else{if(!!window.document.fonts&&!!window.document.fonts.load){var checkFont=null;(checkFont=function(){window.document.fonts.load("1em alphaTab").then(function(_){return window.document.fonts.check("1em alphaTab")?(alphaTab.util.Logger.Info("Rendering","Font available",null),alphaTab.Environment.IsFontLoaded=!0):window.setTimeout(function(){checkFont()},250),!0})})()}else{var checkFont1=null;checkFont1=function(){var document=window.document,testItem=document.getElementById("alphaTabFontChecker");null==testItem&&((testItem=document.createElement("div")).setAttribute("id","alphaTabFontChecker"),testItem.style.opacity="0",testItem.style.position="absolute",testItem.style.left="0",testItem.style.top="0",testItem.style.fontSize="100px",testItem.classList.add("at"),testItem.innerHTML="",document.body.appendChild(testItem));var width=testItem.offsetWidth;width>30&&width<100?(alphaTab.Environment.IsFontLoaded=!0,document.body.removeChild(testItem)):window.setTimeout(function(){checkFont1()},250)},window.addEventListener("DOMContentLoaded",function(){checkFont1()})}}},alphaTab.Environment.CreateScoreRenderer=function(settings){return new alphaTab.rendering.ScoreRenderer(settings)},alphaTab.Environment.Init=function(){alphaTab.Environment.RenderEngines={};alphaTab.Environment.LayoutEngines={};alphaTab.Environment.StaveProfiles={},alphaTab.Environment.PlatformInit(),alphaTab.Environment.LayoutEngines.default=function(r){return new alphaTab.rendering.layout.PageViewLayout(r)},alphaTab.Environment.LayoutEngines.page=function(r1){return new alphaTab.rendering.layout.PageViewLayout(r1)},alphaTab.Environment.LayoutEngines.horizontal=function(r2){return new alphaTab.rendering.layout.HorizontalScreenLayout(r2)},alphaTab.Environment.StaveProfiles.default=alphaTab.Environment.StaveProfiles["score-tab"]=[new alphaTab.rendering.EffectBarRendererFactory("score-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.FermataEffectInfo,new alphaTab.rendering.effects.WhammyBarEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!0),new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.ScoreBarRendererFactory,new alphaTab.rendering.EffectBarRendererFactory("tab-effects",[new alphaTab.rendering.effects.CrescendoEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!1),new alphaTab.rendering.effects.DynamicsEffectInfo,new alphaTab.rendering.effects.LyricsEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.TapEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.HarmonicsEffectInfo(1),new alphaTab.rendering.effects.HarmonicsEffectInfo(2),new alphaTab.rendering.effects.HarmonicsEffectInfo(3),new alphaTab.rendering.effects.HarmonicsEffectInfo(4),new alphaTab.rendering.effects.HarmonicsEffectInfo(5),new alphaTab.rendering.effects.HarmonicsEffectInfo(6),new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.CapoEffectInfo,new alphaTab.rendering.effects.FingeringEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo]),new alphaTab.rendering.TabBarRendererFactory(!1,!1,!1)],alphaTab.Environment.StaveProfiles.score=[new alphaTab.rendering.EffectBarRendererFactory("score-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.FermataEffectInfo,new alphaTab.rendering.effects.WhammyBarEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!0),new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.ScoreBarRendererFactory,new alphaTab.rendering.EffectBarRendererFactory("score-bottom-effects",[new alphaTab.rendering.effects.CrescendoEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!1),new alphaTab.rendering.effects.DynamicsEffectInfo,new alphaTab.rendering.effects.LyricsEffectInfo])],alphaTab.Environment.StaveProfiles.tab=[new alphaTab.rendering.EffectBarRendererFactory("tab-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.FermataEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.TapEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.HarmonicsEffectInfo(2),new alphaTab.rendering.effects.HarmonicsEffectInfo(3),new alphaTab.rendering.effects.HarmonicsEffectInfo(4),new alphaTab.rendering.effects.HarmonicsEffectInfo(5),new alphaTab.rendering.effects.HarmonicsEffectInfo(6),new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.CapoEffectInfo,new alphaTab.rendering.effects.FingeringEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.TabBarRendererFactory(!0,!0,!0),new alphaTab.rendering.EffectBarRendererFactory("tab-bottom-effects",[new alphaTab.rendering.effects.LyricsEffectInfo])],alphaTab.Environment.StaveProfiles["tab-mixed"]=[new alphaTab.rendering.EffectBarRendererFactory("tab-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.TapEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.HarmonicsEffectInfo(2),new alphaTab.rendering.effects.HarmonicsEffectInfo(3),new alphaTab.rendering.effects.HarmonicsEffectInfo(4),new alphaTab.rendering.effects.HarmonicsEffectInfo(5),new alphaTab.rendering.effects.HarmonicsEffectInfo(6),new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.CapoEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.TabBarRendererFactory(!1,!1,!1),new alphaTab.rendering.EffectBarRendererFactory("tab-bottom-effects",[new alphaTab.rendering.effects.LyricsEffectInfo])]},alphaTab.Environment.prototype={__class__:alphaTab.Environment},alphaTab._FingeringMode={},alphaTab._FingeringMode.FingeringMode_Impl_=$hx_exports.alphaTab._FingeringMode.FingeringMode_Impl_={},alphaTab._FingeringMode.FingeringMode_Impl_.__name__=["alphaTab","_FingeringMode","FingeringMode_Impl_"],alphaTab._FingeringMode.FingeringMode_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.toString=function(this1){switch(this1){case 0:return"Score";case 1:return"SingleNoteEffectBand"}return""},alphaTab.LayoutSettings=$hx_exports.alphaTab.LayoutSettings=function(){this.Mode=null,this.AdditionalSettings=null;this.AdditionalSettings={}},alphaTab.LayoutSettings.__name__=["alphaTab","LayoutSettings"],alphaTab.LayoutSettings.get_Defaults=function(){var settings=new alphaTab.LayoutSettings;return settings.Mode="page",settings},alphaTab.LayoutSettings.prototype={Get:function(key,def){var this1=this.AdditionalSettings,key1=key.toLowerCase();return this1.hasOwnProperty(key1)?this.AdditionalSettings[key.toLowerCase()]:def},__class__:alphaTab.LayoutSettings},alphaTab.Main=$hx_exports.alphaTab.Main=function(){},alphaTab.Main.__name__=["alphaTab","Main"],alphaTab.Main.main=function(){},alphaTab.Settings=$hx_exports.alphaTab.Settings=function(){this.ScriptFile=null,this.FontDirectory=null,this.DisableLazyLoading=!1,this.UseWebWorker=!1,this.EnablePlayer=!1,this.SoundFontFile=null,this.EnableCursor=!1,this.ScrollOffsetX=0,this.ScrollOffsetY=0,this.EnableSeekByClick=!1,this.ScrollMode=null,this.ScrollSpeed=0,this.ScrollElement=null,this.BeatCursorWidth=0,this.Scale=0,this.Width=0,this.Engine=null,this.Layout=null,this.ImporterSettings=null,this.StretchForce=0,this.ForcePianoFingering=!1,this.Staves=null,this.TranspositionPitches=null,this.DisplayTranspositionPitches=null,this.LogLevel=0,this.SmallGraceTabNotes=!1,this.ExtendBendArrowsOnTiedNotes=!1,this.ShowParenthesisForTiedBends=!1,this.ShowTabNoteOnTiedBend=!1,this.DisplayMode=0,this.FingeringMode=0,this.ShowZeroOnDiveWhammy=!1,this.ExtendLineEffectsToBeatEnd=!1,this.Vibrato=null,this.SlurHeightFactor=0,this.SongBookBendDuration=0},alphaTab.Settings.__name__=["alphaTab","Settings"],alphaTab.Settings.SetDefaults=function(settings){settings.UseWebWorker=!0,settings.ScrollMode="vertical",settings.ScrollSpeed=300,settings.ScrollElement="html,body",settings.BeatCursorWidth=3},alphaTab.Settings.FillPlayerOptions=function(settings,json,setDefaults,dataAttributes){json&&"cursor"in json?settings.EnableCursor=json.cursor:null!=dataAttributes&&dataAttributes.hasOwnProperty("cursor")?settings.EnableCursor=dataAttributes.cursor:setDefaults&&(settings.EnableCursor=!0),settings.EnableCursor&&(json&&"playerOffset"in json?alphaTab.Settings.FillCursorOffset(settings,json.playerOffset):null!=dataAttributes&&dataAttributes.hasOwnProperty("playerOffset")&&alphaTab.Settings.FillCursorOffset(settings,dataAttributes.playerOffset)),json&&"handleClick"in json?settings.EnableSeekByClick=json.handleClick:setDefaults&&(settings.EnableSeekByClick=!0),json&&"autoScroll"in json?settings.ScrollMode=json.autoScroll:setDefaults&&(settings.ScrollMode="vertical"),json&&"scrollSpeed"in json?settings.ScrollSpeed=json.scrollSpeed:setDefaults&&(settings.ScrollSpeed=300),json&&"scrollSpeed"in json?settings.ScrollElement=json.scrollSpeed:setDefaults&&(settings.ScrollElement="html,body"),json&&"beatCursorWidth"in json?settings.BeatCursorWidth=json.beatCursorWidth:setDefaults&&(settings.BeatCursorWidth=3)},alphaTab.Settings.FromJson=function(json,dataAttributes){if(js.Boot.__instanceof(json,alphaTab.Settings))return js.Boot.__cast(json,alphaTab.Settings);var settings=alphaTab.Settings.get_Defaults();return settings.ScriptFile=alphaTab.Environment.ScriptFile,alphaTab.Settings.FillFromJson(settings,json,dataAttributes),settings},alphaTab.Settings.FillFromJson=function(settings,json,dataAttributes){var global=$global;if(global.document&&global.ALPHATAB_ROOT?(settings.ScriptFile=global.ALPHATAB_ROOT,settings.ScriptFile=alphaTab.Settings.EnsureFullUrl(settings.ScriptFile),settings.ScriptFile=alphaTab.Settings.AppendScriptName(settings.ScriptFile)):settings.ScriptFile=alphaTab.Environment.ScriptFile,global.document&&global.ALPHATAB_FONT)settings.FontDirectory=global.ALPHATAB_FONT,settings.FontDirectory=alphaTab.Settings.EnsureFullUrl(settings.FontDirectory);else{settings.FontDirectory=settings.ScriptFile;var s=settings.FontDirectory;if(null!=s&&0!=s.length){var this1=settings.FontDirectory,this2=system.Convert.ToUInt16(47),lastSlash=this1.lastIndexOf(String.fromCharCode(this2));lastSlash>=0&&(settings.FontDirectory=HxOverrides.substr(settings.FontDirectory,0,lastSlash)+"/Font/")}}if(json&&"logging"in json?settings.LogLevel=alphaTab.Settings.DecodeLogLevel(json.log):null!=dataAttributes&&dataAttributes.hasOwnProperty("logging")&&(settings.LogLevel=alphaTab.Settings.DecodeLogLevel(dataAttributes.logging)),json&&"useWorker"in json?settings.UseWebWorker=json.useWorker:null!=dataAttributes&&dataAttributes.hasOwnProperty("useWorker")&&(settings.UseWebWorker=!!dataAttributes.useWorker),json&&"displayMode"in json?settings.DisplayMode=alphaTab.Settings.DecodeDisplayMode(json.displayMode):null!=dataAttributes&&dataAttributes.hasOwnProperty("displayMode")&&(settings.DisplayMode=alphaTab.Settings.DecodeDisplayMode(dataAttributes.displayMode)),1==settings.DisplayMode&&settings.ApplySongBookDefaults(),json&&"scale"in json?settings.Scale=json.scale:null!=dataAttributes&&dataAttributes.hasOwnProperty("scale")&&(settings.Scale=dataAttributes.scale),json&&"slurHeight"in json?settings.SlurHeightFactor=json.slurHeight:null!=dataAttributes&&dataAttributes.hasOwnProperty("slurHeight")&&(settings.SlurHeightFactor=dataAttributes.slurHeight),json&&"width"in json?settings.Width=json.width:null!=dataAttributes&&dataAttributes.hasOwnProperty("width")&&(settings.Width=dataAttributes.width),json&&"engine"in json?settings.Engine=json.engine:null!=dataAttributes&&dataAttributes.hasOwnProperty("engine")&&(settings.Engine=dataAttributes.engine),json&&"stretchForce"in json?settings.StretchForce=json.stretchForce:null!=dataAttributes&&dataAttributes.hasOwnProperty("stretchForce")&&(settings.StretchForce=dataAttributes.stretchForce),json&&"forcePianoFingering"in json?settings.ForcePianoFingering=json.forcePianoFingering:null!=dataAttributes&&dataAttributes.hasOwnProperty("forcePianoFingering")&&(settings.ForcePianoFingering=dataAttributes.forcePianoFingering),json&&"lazy"in json?settings.DisableLazyLoading=!json.lazy:null!=dataAttributes&&dataAttributes.hasOwnProperty("lazy")&&(settings.DisableLazyLoading=!dataAttributes.lazy),json&&"transpositionPitches"in json)settings.TranspositionPitches=json.transpositionPitches;else if(null!=dataAttributes&&dataAttributes.hasOwnProperty("transpositionPitches")){var pitchOffsets=dataAttributes.transpositionPitches;null!=pitchOffsets&&pitchOffsets.length&&(settings.TranspositionPitches=pitchOffsets)}if(json&&"displayTranspositionPitches"in json)settings.DisplayTranspositionPitches=json.displayTranspositionPitches;else if(null!=dataAttributes&&dataAttributes.hasOwnProperty("displayTranspositionPitches")){var pitchOffsets1=dataAttributes.displayTranspositionPitches;null!=pitchOffsets1&&pitchOffsets1.length&&(settings.DisplayTranspositionPitches=pitchOffsets1)}if(json&&"scriptFile"in json&&(settings.ScriptFile=alphaTab.Settings.EnsureFullUrl(json.scriptFile),settings.ScriptFile=alphaTab.Settings.AppendScriptName(settings.ScriptFile)),json&&"fontDirectory"in json&&(settings.FontDirectory=alphaTab.Settings.EnsureFullUrl(json.fontDirectory)),json&&"smallGraceTabNotes"in json?settings.SmallGraceTabNotes=json.smallGraceTabNotes:null!=dataAttributes&&dataAttributes.hasOwnProperty("smallGraceTabNotes")&&(settings.SmallGraceTabNotes=dataAttributes.smallGraceTabNotes),json&&"fingeringMode"in json?settings.FingeringMode=alphaTab.Settings.DecodeFingeringMode(json.fingeringMode):null!=dataAttributes&&dataAttributes.hasOwnProperty("fingeringMode")&&(settings.FingeringMode=alphaTab.Settings.DecodeFingeringMode(dataAttributes.fingeringMode)),json&&"extendBendArrowsOnTiedNotes"in json?settings.ExtendBendArrowsOnTiedNotes=json.extendBendArrowsOnTiedNotes:null!=dataAttributes&&dataAttributes.hasOwnProperty("extendBendArrowsOnTiedNotes")&&(settings.ExtendBendArrowsOnTiedNotes=dataAttributes.extendBendArrowsOnTiedNotes),json&&"showParenthesisForTiedBends"in json?settings.ShowParenthesisForTiedBends=json.showParenthesisForTiedBends:null!=dataAttributes&&dataAttributes.hasOwnProperty("showParenthesisForTiedBends")&&(settings.ShowParenthesisForTiedBends=dataAttributes.showParenthesisForTiedBends),json&&"showTabNoteOnTiedBend"in json?settings.ShowTabNoteOnTiedBend=json.showTabNoteOnTiedBend:null!=dataAttributes&&dataAttributes.hasOwnProperty("showTabNoteOnTiedBend")&&(settings.ShowTabNoteOnTiedBend=dataAttributes.showTabNoteOnTiedBend),json&&"showZeroOnDiveWhammy"in json?settings.ShowZeroOnDiveWhammy=json.showZeroOnDiveWhammy:null!=dataAttributes&&dataAttributes.hasOwnProperty("showZeroOnDiveWhammy")&&(settings.ShowZeroOnDiveWhammy=dataAttributes.showZeroOnDiveWhammy),json&&"extendLineEffectsToBeatEnd"in json?settings.ExtendLineEffectsToBeatEnd=json.extendLineEffectsToBeatEnd:null!=dataAttributes&&dataAttributes.hasOwnProperty("extendLineEffectsToBeatEnd")&&(settings.ExtendLineEffectsToBeatEnd=dataAttributes.extendLineEffectsToBeatEnd),json&&"songBookBendDuration"in json?settings.SongBookBendDuration=json.songBookBendDuration:null!=dataAttributes&&dataAttributes.hasOwnProperty("songBookBendDuration")&&(settings.SongBookBendDuration=dataAttributes.songBookBendDuration),json&&"layout"in json?settings.Layout=alphaTab.Settings.LayoutFromJson(json.layout):null!=dataAttributes&&dataAttributes.hasOwnProperty("layout")&&(settings.Layout=alphaTab.Settings.LayoutFromJson(dataAttributes.layout)),json&&"vibrato"in json){var vibrato=json.vibrato;vibrato.noteSlightAmplitude&&(settings.Vibrato.NoteSlightAmplitude=vibrato.noteSlightAmplitude),vibrato.noteWideAmplitude&&(settings.Vibrato.NoteWideAmplitude=vibrato.noteWideAmplitude),vibrato.noteSlightLength&&(settings.Vibrato.NoteSlightLength=vibrato.noteSlightLength),vibrato.noteWideLength&&(settings.Vibrato.NoteWideLength=vibrato.noteWideLength),vibrato.beatSlightAmplitude&&(settings.Vibrato.BeatSlightAmplitude=vibrato.beatSlightAmplitude),vibrato.beatWideAmplitude&&(settings.Vibrato.BeatWideAmplitude=vibrato.beatWideAmplitude),vibrato.beatSlightLength&&(settings.Vibrato.BeatSlightLength=vibrato.beatSlightLength),vibrato.beatWideLength&&(settings.Vibrato.BeatWideLength=vibrato.beatWideLength)}else null!=dataAttributes&&(dataAttributes.hasOwnProperty("vibratoNoteSlightLength")&&(settings.Vibrato.NoteSlightLength=dataAttributes.vibratoNoteSlightLength),dataAttributes.hasOwnProperty("vibratoNoteSlightAmplitude")&&(settings.Vibrato.NoteSlightAmplitude=dataAttributes.vibratoNoteSlightAmplitude),dataAttributes.hasOwnProperty("vibratoNoteWideLength")&&(settings.Vibrato.NoteWideLength=dataAttributes.vibratoNoteWideLength),dataAttributes.hasOwnProperty("vibratoNoteWideAmplitude")&&(settings.Vibrato.NoteWideAmplitude=dataAttributes.vibratoNoteWideAmplitude),dataAttributes.hasOwnProperty("vibratoBeatSlightLength")&&(settings.Vibrato.BeatSlightLength=dataAttributes.vibratoBeatSlightLength),dataAttributes.hasOwnProperty("vibratoBeatSlightAmplitude")&&(settings.Vibrato.BeatSlightAmplitude=dataAttributes.vibratoBeatSlightAmplitude),dataAttributes.hasOwnProperty("vibratoBeatWideLength")&&(settings.Vibrato.BeatWideLength=dataAttributes.vibratoBeatWideLength),dataAttributes.hasOwnProperty("vibratoBeatWideAmplitude")&&(settings.Vibrato.BeatWideAmplitude=dataAttributes.vibratoBeatWideAmplitude));if(null!=dataAttributes)for(var key=$iterator(Object.keys(dataAttributes))();key.hasNext();){var key1=key.next();if(StringTools.startsWith(key1,"layout")){var property=HxOverrides.substr(key1,6,null);settings.Layout.AdditionalSettings[property.toLowerCase()]=dataAttributes[key1]}}if(json&&"staves"in json?settings.Staves=alphaTab.Settings.StavesFromJson(json.staves):null!=dataAttributes&&dataAttributes.hasOwnProperty("staves")&&(settings.Staves=alphaTab.Settings.StavesFromJson(dataAttributes.staves)),null!=dataAttributes)for(var key2=$iterator(Object.keys(dataAttributes))();key2.hasNext();){var key3=key2.next();if(StringTools.startsWith(key3,"staves")){var property1=HxOverrides.substr(key3,6,null);settings.Staves.AdditionalSettings[property1.toLowerCase()]=dataAttributes[key3]}}if(json&&"player"in json?(settings.EnablePlayer=!0,settings.SoundFontFile=json.player):null!=dataAttributes&&dataAttributes.hasOwnProperty("player")&&(settings.EnablePlayer=!0,settings.SoundFontFile=dataAttributes.player),settings.EnablePlayer&&alphaTab.Settings.FillPlayerOptions(settings,json,!0,dataAttributes),json&&"importer"in json)for(var json1=json.importer,keys2=Object.keys(json1),key21=HxOverrides.iter(keys2);key21.hasNext();){var key22=key21.next();settings.ImporterSettings[key22.toLowerCase()]=json.importer[key22]}else if(null!=dataAttributes)for(var key4=$iterator(Object.keys(dataAttributes))();key4.hasNext();){var key5=key4.next();if(StringTools.startsWith(key5,"importer")){var property2=HxOverrides.substr(key5,8,null);settings.ImporterSettings[property2.toLowerCase()]=dataAttributes[key5]}}},alphaTab.Settings.DecodeDisplayMode=function(mode){if("number"==typeof mode)return mode;if("string"==typeof mode){switch(mode.toLowerCase()){case"guitarpro":return 0;case"songbook":return 1}}return 0},alphaTab.Settings.DecodeFingeringMode=function(mode){if("number"==typeof mode)return mode;if("string"==typeof mode){switch(mode.toLowerCase()){case"effectband":return 1;case"score":return 0}}return 0},alphaTab.Settings.DecodeLogLevel=function(log){if("number"==typeof log)return log;if("string"==typeof log){switch(log.toLowerCase()){case"debug":return 1;case"error":return 4;case"info":return 2;case"none":return 0;case"warning":return 3}}return 2},alphaTab.Settings.FillCursorOffset=function(settings,playerOffset){if("number"==typeof playerOffset)settings.ScrollOffsetX=playerOffset,settings.ScrollOffsetY=playerOffset;else if(playerOffset&&"length"in playerOffset){var offsets=playerOffset;settings.ScrollOffsetX=offsets[0],settings.ScrollOffsetY=offsets[1]}},alphaTab.Settings.StavesFromJson=function(json){var staveSettings;if("string"==typeof json)staveSettings=new alphaTab.StaveSettings(json);else{if(!json.id)return new alphaTab.StaveSettings("score-tab");if(staveSettings=new alphaTab.StaveSettings(json.id),json.additionalSettings)for(var json1=json.additionalSettings,keys2=Object.keys(json1),key2=HxOverrides.iter(keys2);key2.hasNext();){var key21=key2.next();staveSettings.AdditionalSettings[key21.toLowerCase()]=json.additionalSettings[key21]}}return staveSettings},alphaTab.Settings.LayoutFromJson=function(json){var layout=new alphaTab.LayoutSettings;if("string"==typeof json)layout.Mode=json;else if(json.mode&&(layout.Mode=json.mode),json.additionalSettings)for(var json1=json.additionalSettings,keys=Object.keys(json1),key=HxOverrides.iter(keys);key.hasNext();){var key1=key.next();layout.AdditionalSettings[key1.toLowerCase()]=json.additionalSettings[key1]}return layout},alphaTab.Settings.AppendScriptName=function(url){return null==url||0==url.length||StringTools.endsWith(url,".js")||(StringTools.endsWith(url,"/")||(url+="/"),url+="AlphaTab.js"),url},alphaTab.Settings.EnsureFullUrl=function(relativeUrl){var global=$global;if(!StringTools.startsWith(relativeUrl,"http")&&!StringTools.startsWith(relativeUrl,"https")&&!StringTools.startsWith(relativeUrl,"file")){var root="";root+=Std.string(global.location.protocol),root+=Std.string("//"),global.location.hostname&&(root+=Std.string(global.location.hostname)),global.location.port&&(root+=Std.string(":"),root+=Std.string(global.location.port));var directory=global.location.pathname.split("/").slice(0,-1).join("/");return directory.length>0&&(StringTools.startsWith(directory,"/")||(root+=Std.string("/")),root+=Std.string(directory)),StringTools.startsWith(relativeUrl,"/")||(root+=Std.string("/")),root+=Std.string(relativeUrl)}return relativeUrl},alphaTab.Settings.get_SongBook=function(){var settings=alphaTab.Settings.get_Defaults();return settings.DisplayMode=1,settings.ApplySongBookDefaults(),settings},alphaTab.Settings.get_Defaults=function(){var settings=new alphaTab.Settings;settings.Scale=1,settings.StretchForce=1,settings.Width=-1,settings.Engine="default";var this1=new Int32Array(0);settings.TranspositionPitches=this1;var this2=new Int32Array(0);settings.DisplayTranspositionPitches=this2,settings.SmallGraceTabNotes=!0,settings.ExtendBendArrowsOnTiedNotes=!0,settings.ShowParenthesisForTiedBends=!0,settings.ShowTabNoteOnTiedBend=!0,settings.DisplayMode=0,settings.FingeringMode=0,settings.ShowZeroOnDiveWhammy=!1,settings.ExtendLineEffectsToBeatEnd=!1,settings.SlurHeightFactor=.3;return settings.ImporterSettings={},settings.Layout=alphaTab.LayoutSettings.get_Defaults(),settings.Staves=new alphaTab.StaveSettings("default"),settings.LogLevel=2,settings.Vibrato=new alphaTab.VibratoPlaybackSettings,settings.Vibrato.NoteSlightAmplitude=2,settings.Vibrato.NoteWideAmplitude=2,settings.Vibrato.NoteSlightLength=480,settings.Vibrato.NoteWideLength=480,settings.Vibrato.BeatSlightAmplitude=3,settings.Vibrato.BeatWideAmplitude=3,settings.Vibrato.BeatSlightLength=240,settings.Vibrato.BeatWideLength=240,settings.SongBookBendDuration=75,alphaTab.Settings.SetDefaults(settings),settings},alphaTab.Settings.prototype={ToJson:function(){var json={};json.useWorker=this.UseWebWorker,json.scale=this.Scale,json.slurHeight=this.SlurHeightFactor,json.width=this.Width,json.engine=this.Engine,json.stretchForce=this.StretchForce,json.forcePianoFingering=this.ForcePianoFingering,json.transpositionPitches=this.TranspositionPitches,json.displayTranspositionPitches=this.DisplayTranspositionPitches,json.logging=this.LogLevel,json.smallGraceTabNotes=this.SmallGraceTabNotes,json.extendBendArrowsOnTiedNotes=this.ExtendBendArrowsOnTiedNotes,json.showParenthesisForTiedBends=this.ShowParenthesisForTiedBends,json.showTabNoteOnTiedBend=this.ShowTabNoteOnTiedBend,json.displayMode=this.DisplayMode,json.fingeringMode=this.FingeringMode,json.showZeroOnDiveWhammy=this.ShowZeroOnDiveWhammy,json.extendLineEffectsToBeatEnd=this.ExtendLineEffectsToBeatEnd,json.songBookBendDuration=this.SongBookBendDuration,json.scriptFile=this.ScriptFile,json.fontDirectory=this.FontDirectory,json.lazy=this.DisableLazyLoading,json.vibrato={},json.noteSlightAmplitude=this.Vibrato.NoteSlightAmplitude,json.noteWideAmplitude=this.Vibrato.NoteWideAmplitude,json.noteSlightLength=this.Vibrato.NoteSlightLength,json.noteWideLength=this.Vibrato.NoteWideLength,json.beatSlightAmplitude=this.Vibrato.BeatSlightAmplitude,json.beatWideAmplitude=this.Vibrato.BeatWideAmplitude,json.beatSlightLength=this.Vibrato.BeatSlightLength,json.beatWideLength=this.Vibrato.BeatWideLength,json.layout={},json.layout.mode=this.Layout.Mode,json.layout.additionalSettings={};for(var this1=this.Layout.AdditionalSettings,setting=$iterator(Object.keys(this1))();setting.hasNext();){var setting1=setting.next();json.layout.additionalSettings[setting1]=this.Layout.AdditionalSettings[setting1]}json.importer={};for(var this2=this.ImporterSettings,setting2=$iterator(Object.keys(this2))();setting2.hasNext();){var setting3=setting2.next();json.importer[setting3]=this.ImporterSettings[setting3]}json.staves={},json.staves.id=this.Staves.Id,json.staves.additionalSettings={};for(var this3=this.Staves.AdditionalSettings,additionalSetting=$iterator(Object.keys(this3))();additionalSetting.hasNext();){var additionalSetting1=additionalSetting.next();json.staves.additionalSettings[additionalSetting1]=this.Staves.AdditionalSettings[additionalSetting1]}return json},ApplySongBookDefaults:function(){this.SmallGraceTabNotes=!1,this.FingeringMode=1,this.ExtendBendArrowsOnTiedNotes=!1,this.ShowParenthesisForTiedBends=!1,this.ShowTabNoteOnTiedBend=!1,this.ShowZeroOnDiveWhammy=!0},__class__:alphaTab.Settings},alphaTab.StaveSettings=$hx_exports.alphaTab.StaveSettings=function(id){this.Id=null,this.AdditionalSettings=null,this.Id=id;this.AdditionalSettings={}},alphaTab.StaveSettings.__name__=["alphaTab","StaveSettings"],alphaTab.StaveSettings.prototype={Get:function(key,def){var this1=this.AdditionalSettings,key1=key.toLowerCase();return this1.hasOwnProperty(key1)?this.AdditionalSettings[key.toLowerCase()]:def},__class__:alphaTab.StaveSettings},alphaTab.VibratoPlaybackSettings=$hx_exports.alphaTab.VibratoPlaybackSettings=function(){this.NoteWideLength=0,this.NoteWideAmplitude=0,this.NoteSlightLength=0,this.NoteSlightAmplitude=0,this.BeatWideLength=0,this.BeatWideAmplitude=0,this.BeatSlightLength=0,this.BeatSlightAmplitude=0},alphaTab.VibratoPlaybackSettings.__name__=["alphaTab","VibratoPlaybackSettings"],alphaTab.VibratoPlaybackSettings.prototype={__class__:alphaTab.VibratoPlaybackSettings},alphaTab.audio.BeatTickLookup=$hx_exports.alphaTab.audio.BeatTickLookup=function(){this.Start=0,this.End=0,this.Beat=null,this.IsEmptyBar=!1},alphaTab.audio.BeatTickLookup.__name__=["alphaTab","audio","BeatTickLookup"],alphaTab.audio.BeatTickLookup.prototype={__class__:alphaTab.audio.BeatTickLookup},alphaTab.audio.GeneralMidi=$hx_exports.alphaTab.audio.GeneralMidi=function(){},alphaTab.audio.GeneralMidi.__name__=["alphaTab","audio","GeneralMidi"],alphaTab.audio.GeneralMidi.GetValue=function(name){if(null==alphaTab.audio.GeneralMidi._values){alphaTab.audio.GeneralMidi._values={},alphaTab.audio.GeneralMidi._values.acousticgrandpiano=0,alphaTab.audio.GeneralMidi._values.brightacousticpiano=1,alphaTab.audio.GeneralMidi._values.electricgrandpiano=2,alphaTab.audio.GeneralMidi._values.honkytonkpiano=3,alphaTab.audio.GeneralMidi._values.electricpiano1=4,alphaTab.audio.GeneralMidi._values.electricpiano2=5,alphaTab.audio.GeneralMidi._values.harpsichord=6,alphaTab.audio.GeneralMidi._values.clavinet=7,alphaTab.audio.GeneralMidi._values.celesta=8,alphaTab.audio.GeneralMidi._values.glockenspiel=9,alphaTab.audio.GeneralMidi._values.musicbox=10,alphaTab.audio.GeneralMidi._values.vibraphone=11,alphaTab.audio.GeneralMidi._values.marimba=12,alphaTab.audio.GeneralMidi._values.xylophone=13,alphaTab.audio.GeneralMidi._values.tubularbells=14,alphaTab.audio.GeneralMidi._values.dulcimer=15,alphaTab.audio.GeneralMidi._values.drawbarorgan=16,alphaTab.audio.GeneralMidi._values.percussiveorgan=17,alphaTab.audio.GeneralMidi._values.rockorgan=18,alphaTab.audio.GeneralMidi._values.churchorgan=19,alphaTab.audio.GeneralMidi._values.reedorgan=20,alphaTab.audio.GeneralMidi._values.accordion=21,alphaTab.audio.GeneralMidi._values.harmonica=22,alphaTab.audio.GeneralMidi._values.tangoaccordion=23,alphaTab.audio.GeneralMidi._values.acousticguitarnylon=24,alphaTab.audio.GeneralMidi._values.acousticguitarsteel=25,alphaTab.audio.GeneralMidi._values.electricguitarjazz=26,alphaTab.audio.GeneralMidi._values.electricguitarclean=27,alphaTab.audio.GeneralMidi._values.electricguitarmuted=28,alphaTab.audio.GeneralMidi._values.overdrivenguitar=29,alphaTab.audio.GeneralMidi._values.distortionguitar=30,alphaTab.audio.GeneralMidi._values.guitarharmonics=31,alphaTab.audio.GeneralMidi._values.acousticbass=32,alphaTab.audio.GeneralMidi._values.electricbassfinger=33,alphaTab.audio.GeneralMidi._values.electricbasspick=34,alphaTab.audio.GeneralMidi._values.fretlessbass=35,alphaTab.audio.GeneralMidi._values.slapbass1=36,alphaTab.audio.GeneralMidi._values.slapbass2=37,alphaTab.audio.GeneralMidi._values.synthbass1=38,alphaTab.audio.GeneralMidi._values.synthbass2=39,alphaTab.audio.GeneralMidi._values.violin=40,alphaTab.audio.GeneralMidi._values.viola=41,alphaTab.audio.GeneralMidi._values.cello=42,alphaTab.audio.GeneralMidi._values.contrabass=43,alphaTab.audio.GeneralMidi._values.tremolostrings=44,alphaTab.audio.GeneralMidi._values.pizzicatostrings=45,alphaTab.audio.GeneralMidi._values.orchestralharp=46,alphaTab.audio.GeneralMidi._values.timpani=47,alphaTab.audio.GeneralMidi._values.stringensemble1=48,alphaTab.audio.GeneralMidi._values.stringensemble2=49,alphaTab.audio.GeneralMidi._values.synthstrings1=50,alphaTab.audio.GeneralMidi._values.synthstrings2=51,alphaTab.audio.GeneralMidi._values.choiraahs=52,alphaTab.audio.GeneralMidi._values.voiceoohs=53,alphaTab.audio.GeneralMidi._values.synthvoice=54,alphaTab.audio.GeneralMidi._values.orchestrahit=55,alphaTab.audio.GeneralMidi._values.trumpet=56,alphaTab.audio.GeneralMidi._values.trombone=57,alphaTab.audio.GeneralMidi._values.tuba=58,alphaTab.audio.GeneralMidi._values.mutedtrumpet=59,alphaTab.audio.GeneralMidi._values.frenchhorn=60,alphaTab.audio.GeneralMidi._values.brasssection=61,alphaTab.audio.GeneralMidi._values.synthbrass1=62,alphaTab.audio.GeneralMidi._values.synthbrass2=63,alphaTab.audio.GeneralMidi._values.sopranosax=64,alphaTab.audio.GeneralMidi._values.altosax=65,alphaTab.audio.GeneralMidi._values.tenorsax=66,alphaTab.audio.GeneralMidi._values.baritonesax=67,alphaTab.audio.GeneralMidi._values.oboe=68,alphaTab.audio.GeneralMidi._values.englishhorn=69,alphaTab.audio.GeneralMidi._values.bassoon=70,alphaTab.audio.GeneralMidi._values.clarinet=71,alphaTab.audio.GeneralMidi._values.piccolo=72,alphaTab.audio.GeneralMidi._values.flute=73,alphaTab.audio.GeneralMidi._values.recorder=74,alphaTab.audio.GeneralMidi._values.panflute=75,alphaTab.audio.GeneralMidi._values.blownbottle=76,alphaTab.audio.GeneralMidi._values.shakuhachi=77,alphaTab.audio.GeneralMidi._values.whistle=78,alphaTab.audio.GeneralMidi._values.ocarina=79,alphaTab.audio.GeneralMidi._values.lead1square=80,alphaTab.audio.GeneralMidi._values.lead2sawtooth=81,alphaTab.audio.GeneralMidi._values.lead3calliope=82,alphaTab.audio.GeneralMidi._values.lead4chiff=83,alphaTab.audio.GeneralMidi._values.lead5charang=84,alphaTab.audio.GeneralMidi._values.lead6voice=85,alphaTab.audio.GeneralMidi._values.lead7fifths=86,alphaTab.audio.GeneralMidi._values.lead8bassandlead=87,alphaTab.audio.GeneralMidi._values.pad1newage=88,alphaTab.audio.GeneralMidi._values.pad2warm=89,alphaTab.audio.GeneralMidi._values.pad3polysynth=90,alphaTab.audio.GeneralMidi._values.pad4choir=91,alphaTab.audio.GeneralMidi._values.pad5bowed=92,alphaTab.audio.GeneralMidi._values.pad6metallic=93,alphaTab.audio.GeneralMidi._values.pad7halo=94,alphaTab.audio.GeneralMidi._values.pad8sweep=95,alphaTab.audio.GeneralMidi._values.fx1rain=96,alphaTab.audio.GeneralMidi._values.fx2soundtrack=97,alphaTab.audio.GeneralMidi._values.fx3crystal=98,alphaTab.audio.GeneralMidi._values.fx4atmosphere=99,alphaTab.audio.GeneralMidi._values.fx5brightness=100,alphaTab.audio.GeneralMidi._values.fx6goblins=101,alphaTab.audio.GeneralMidi._values.fx7echoes=102,alphaTab.audio.GeneralMidi._values.fx8scifi=103,alphaTab.audio.GeneralMidi._values.sitar=104,alphaTab.audio.GeneralMidi._values.banjo=105,alphaTab.audio.GeneralMidi._values.shamisen=106,alphaTab.audio.GeneralMidi._values.koto=107,alphaTab.audio.GeneralMidi._values.kalimba=108,alphaTab.audio.GeneralMidi._values.bagpipe=109,alphaTab.audio.GeneralMidi._values.fiddle=110,alphaTab.audio.GeneralMidi._values.shanai=111,alphaTab.audio.GeneralMidi._values.tinklebell=112,alphaTab.audio.GeneralMidi._values.agogo=113,alphaTab.audio.GeneralMidi._values.steeldrums=114,alphaTab.audio.GeneralMidi._values.woodblock=115,alphaTab.audio.GeneralMidi._values.taikodrum=116,alphaTab.audio.GeneralMidi._values.melodictom=117,alphaTab.audio.GeneralMidi._values.synthdrum=118,alphaTab.audio.GeneralMidi._values.reversecymbal=119,alphaTab.audio.GeneralMidi._values.guitarfretnoise=120,alphaTab.audio.GeneralMidi._values.breathnoise=121,alphaTab.audio.GeneralMidi._values.seashore=122,alphaTab.audio.GeneralMidi._values.birdtweet=123,alphaTab.audio.GeneralMidi._values.telephonering=124,alphaTab.audio.GeneralMidi._values.helicopter=125,alphaTab.audio.GeneralMidi._values.applause=126,alphaTab.audio.GeneralMidi._values.gunshot=127}return name=StringTools.replace(name.toLowerCase()," ",""),alphaTab.audio.GeneralMidi._values.hasOwnProperty(name)?alphaTab.audio.GeneralMidi._values[name]:0},alphaTab.audio.GeneralMidi.IsPiano=function(program){return program<=7||program>=16&&program<=23},alphaTab.audio.GeneralMidi.IsGuitar=function(program){return program>=24&&program<=39||105==program||43==program},alphaTab.audio.GeneralMidi.prototype={__class__:alphaTab.audio.GeneralMidi},alphaTab.audio.MasterBarTickLookup=$hx_exports.alphaTab.audio.MasterBarTickLookup=function(){this.Start=0,this.End=0,this.Tempo=0,this.MasterBar=null,this.Beats=null,this.NextMasterBar=null;this.Beats=[]},alphaTab.audio.MasterBarTickLookup.__name__=["alphaTab","audio","MasterBarTickLookup"],alphaTab.audio.MasterBarTickLookup.prototype={Finish:function(){this.Beats.sort(function(a1,b1){return b=b1,a1.Start-b.Start;var b})},AddBeat:function(beat){this.Beats.push(beat)},__class__:alphaTab.audio.MasterBarTickLookup},alphaTab.audio.MidiTickLookup=$hx_exports.alphaTab.audio.MidiTickLookup=function(){this._currentMasterBar=null,this.MasterBarLookup=null,this.MasterBars=null;this.MasterBars=[];this.MasterBarLookup={}},alphaTab.audio.MidiTickLookup.__name__=["alphaTab","audio","MidiTickLookup"],alphaTab.audio.MidiTickLookup.prototype={Finish:function(){for(var previous=null,bar=$iterator(this.MasterBars)();bar.hasNext();){var bar1=bar.next();bar1.Finish(),null!=previous&&(previous.NextMasterBar=bar1),previous=bar1}},FindBeat:function(tracks,tick){var masterBar=this.FindMasterBar(tick);if(null==masterBar)return null;for(var trackLookup={},track=HxOverrides.iter(tracks);track.hasNext();){trackLookup[track.next().Index]=!0}for(var beat=null,index=0,beats=masterBar.Beats,b=0;btick)break;++b}else++b}if(null==beat)return null;for(var nextBeat=null,b1=index+1;b1beat.Start&&trackLookup.hasOwnProperty(currentBeat1.Beat.Voice.Bar.Staff.Track.Index)){nextBeat=currentBeat1;break}++b1}if(null==nextBeat&&null!=masterBar.NextMasterBar){beats=masterBar.NextMasterBar.Beats;for(var b2=0;b2=bar.Start&&tick127?127:value},alphaTab.audio.generator.AlphaSynthMidiFileHandler.prototype={AddTimeSignature:function(tick,timeSignatureNumerator,timeSignatureDenominator){for(var denominatorIndex=0;(timeSignatureDenominator>>=1)>0;)++denominatorIndex;var message=new alphaTab.audio.synth.midi.event.MetaDataEvent(tick,255,system.Convert.ToUInt8(88),new Uint8Array([system.Convert.ToUInt8(255&timeSignatureNumerator),system.Convert.ToUInt8(255&denominatorIndex),48,8]));this._midiFile.AddEvent(message)},AddRest:function(track,tick,channel){var message=new alphaTab.audio.synth.midi.event.SystemExclusiveEvent(tick,system.Convert.ToUInt8(240),0,new Uint8Array([255]));this._midiFile.AddEvent(message)},AddNote:function(track,start,length,key,dynamicValue,channel){var velocity=alphaTab.audio.MidiUtils.DynamicToVelocity(dynamicValue),noteOn=new alphaTab.audio.synth.midi.event.MidiEvent(start,this.MakeCommand(system.Convert.ToUInt8(144),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(key),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(system.Convert.ToUInt8(velocity)));this._midiFile.AddEvent(noteOn);var noteOff=new alphaTab.audio.synth.midi.event.MidiEvent(start+length,this.MakeCommand(system.Convert.ToUInt8(128),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(key),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(system.Convert.ToUInt8(velocity)));this._midiFile.AddEvent(noteOff)},MakeCommand:function(command,channel){return system.Convert.ToUInt8(240&command|15&channel)},AddControlChange:function(track,tick,channel,controller,value){var message=new alphaTab.audio.synth.midi.event.MidiEvent(tick,this.MakeCommand(system.Convert.ToUInt8(176),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(controller),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(value));this._midiFile.AddEvent(message)},AddProgramChange:function(track,tick,channel,program){var message=new alphaTab.audio.synth.midi.event.MidiEvent(tick,this.MakeCommand(system.Convert.ToUInt8(192),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(program),0);this._midiFile.AddEvent(message)},AddTempo:function(tick,tempo){var tempoInUsq=6e7/tempo|0,message=new alphaTab.audio.synth.midi.event.MetaNumberEvent(tick,255,system.Convert.ToUInt8(81),tempoInUsq);this._midiFile.AddEvent(message)},AddBend:function(track,tick,channel,value){var message=new alphaTab.audio.synth.midi.event.MidiEvent(tick,this.MakeCommand(system.Convert.ToUInt8(224),channel),0,alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(value));this._midiFile.AddEvent(message)},FinishTrack:function(track,tick){var message=system.Convert.ToUInt8(47),this1=new Uint8Array(0),message1=new alphaTab.audio.synth.midi.event.MetaDataEvent(tick,255,message,this1);this._midiFile.AddEvent(message1)},__class__:alphaTab.audio.generator.AlphaSynthMidiFileHandler},alphaTab.audio.generator.MidiFileGenerator=$hx_exports.alphaTab.audio.generator.MidiFileGenerator=function(score,settings,handler){this._score=null,this._settings=null,this._handler=null,this._currentTempo=0,this._currentBarRepeatLookup=null,this.TickLookup=null,this._score=score,this._settings=settings,this._currentTempo=this._score.Tempo,this._handler=handler,this.TickLookup=new alphaTab.audio.MidiTickLookup},alphaTab.audio.generator.MidiFileGenerator.__name__=["alphaTab","audio","generator","MidiFileGenerator"],alphaTab.audio.generator.MidiFileGenerator.ToChannelShort=function(data){var value=Math.max(-32768,Math.min(32767,8*data-1));return Math.max(value,-1)+1},alphaTab.audio.generator.MidiFileGenerator.prototype={Generate:function(){for(var i=0,j=this._score.Tracks.length;iaudioDuration?realTickOffset:audioDuration),realBar==beat.Voice.Bar?(beatLookup.Beat=beat,this.TickLookup.AddBeat(beatLookup)):(beatLookup.IsEmptyBar=!0,beatLookup.Beat=realBar.Voices[0].Beats[0],null==this._currentBarRepeatLookup?(this._currentBarRepeatLookup=beatLookup,this.TickLookup.AddBeat(this._currentBarRepeatLookup)):this._currentBarRepeatLookup.End=beatLookup.End);for(var track=beat.Voice.Bar.Staff.Track,i=0,j=beat.Automations.length;i0&&this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(initialBend)),note.Beat.FadeIn&&this.GenerateFadeIn(note,noteStart,noteDuration,noteKey,dynamicValue),note.get_IsTrill()&&2!=staff.StaffKind)this.GenerateTrill(note,noteStart,noteDuration,noteKey,dynamicValue,channel);else if(note.Beat.get_IsTremolo())this.GenerateTremoloPicking(note,noteStart,noteDuration,noteKey,dynamicValue,channel);else if(note.get_HasBend()?this.GenerateBend(note,noteStart,noteDuration,noteKey,dynamicValue,channel):note.Beat.get_HasWhammyBar()&&0==note.Index?this.GenerateWhammy(note.Beat,noteStart,noteDuration,noteKey,dynamicValue,channel):0!=note.SlideType?this.GenerateSlide(note,noteStart,noteDuration,noteKey,dynamicValue,channel):0!=note.Vibrato&&this.GenerateVibrato(note,noteStart,noteDuration,noteKey,dynamicValue,channel),!note.IsTieDestination){var noteSoundDuration=Math.max(noteDuration.UntilTieEnd,noteDuration.LetRingEnd);this._handler.AddNote(track.Index,noteStart,noteSoundDuration,system.Convert.ToUInt8(noteKey),dynamicValue,system.Convert.ToUInt8(channel))}},GetNoteDuration:function(note,duration){var durationWithEffects=new alphaTab.audio.generator.MidiNoteDuration;if(durationWithEffects.NoteOnly=duration,durationWithEffects.UntilTieEnd=duration,durationWithEffects.LetRingEnd=duration,note.IsDead)return durationWithEffects.NoteOnly=this.ApplyStaticDuration(30,duration),durationWithEffects.UntilTieEnd=durationWithEffects.NoteOnly,durationWithEffects.LetRingEnd=durationWithEffects.NoteOnly,durationWithEffects;if(note.IsPalmMute)return durationWithEffects.NoteOnly=this.ApplyStaticDuration(80,duration),durationWithEffects.UntilTieEnd=durationWithEffects.NoteOnly,durationWithEffects.LetRingEnd=durationWithEffects.NoteOnly,durationWithEffects;if(note.IsStaccato)return durationWithEffects.NoteOnly=duration/2|0,durationWithEffects.UntilTieEnd=durationWithEffects.NoteOnly,durationWithEffects.LetRingEnd=durationWithEffects.NoteOnly,durationWithEffects;if(note.IsTieOrigin){var endNote=note.TieDestination;if(null!=endNote)if(note.IsTieDestination){var tieDestinationDuration1=this.GetNoteDuration(endNote,endNote.Beat.PlaybackDuration);durationWithEffects.UntilTieEnd=duration+tieDestinationDuration1.UntilTieEnd}else{var startTick=note.Beat.get_AbsolutePlaybackStart(),tieDestinationDuration=this.GetNoteDuration(endNote,endNote.Beat.PlaybackDuration),endTick=endNote.Beat.get_AbsolutePlaybackStart()+tieDestinationDuration.UntilTieEnd;durationWithEffects.UntilTieEnd=endTick-startTick}}if(note.IsLetRing&&0==this._settings.DisplayMode){for(var lastLetRingBeat=note.Beat,letRingEnd=0,maxDuration=note.Beat.Voice.Bar.get_MasterBar().CalculateDuration();null!=lastLetRingBeat.NextBeat;){var next=lastLetRingBeat.NextBeat;if(next.get_IsRest())break;if(note.get_IsStringed()&&next.HasNoteOnString(note.String))break;if((letRingEnd=(lastLetRingBeat=lastLetRingBeat.NextBeat).get_AbsolutePlaybackStart()-note.Beat.get_AbsolutePlaybackStart()+lastLetRingBeat.PlaybackDuration)>maxDuration){letRingEnd=maxDuration;break}}lastLetRingBeat==note.Beat?durationWithEffects.LetRingEnd=duration:durationWithEffects.LetRingEnd=letRingEnd}else durationWithEffects.LetRingEnd=durationWithEffects.UntilTieEnd;return durationWithEffects},ApplyStaticDuration:function(duration,maximum){var value=this._currentTempo*duration/60|0;return Math.min(value,maximum)},GetDynamicValue:function(note){var dynamicValue=note.Dynamic;2!=note.Beat.Voice.Bar.Staff.StaffKind&&null!=note.HammerPullOrigin&&--dynamicValue,note.IsGhost&&--dynamicValue;switch(note.Accentuated){case 1:++dynamicValue;break;case 2:dynamicValue+=2}return dynamicValue},GenerateFadeIn:function(note,noteStart,noteDuration,noteKey,dynamicValue){for(var track=note.Beat.Voice.Bar.Staff.Track,endVolume=alphaTab.audio.generator.MidiFileGenerator.ToChannelShort(track.PlaybackInfo.Volume),volumeFactor=js.Boot.__cast(endVolume,Float)/noteDuration.NoteOnly,steps=noteDuration.NoteOnly/120|0,endTick=noteStart+noteDuration.NoteOnly,i=steps-1;i>=0;){var tick=endTick-120*i,volume=(tick-noteStart)*volumeFactor;i==steps-1&&(this._handler.AddControlChange(track.Index,noteStart,system.Convert.ToUInt8(track.PlaybackInfo.PrimaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume))),this._handler.AddControlChange(track.Index,noteStart,system.Convert.ToUInt8(track.PlaybackInfo.SecondaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume)))),this._handler.AddControlChange(track.Index,tick,system.Convert.ToUInt8(track.PlaybackInfo.PrimaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume))),this._handler.AddControlChange(track.Index,tick,system.Convert.ToUInt8(track.PlaybackInfo.SecondaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume))),--i}},GenerateVibrato:function(note,noteStart,noteDuration,noteKey,dynamicValue,channel){var phaseLength,bendAmplitude;switch(note.Vibrato){case 1:phaseLength=this._settings.Vibrato.NoteSlightLength,bendAmplitude=this._settings.Vibrato.NoteSlightAmplitude;break;case 2:phaseLength=this._settings.Vibrato.NoteWideLength,bendAmplitude=this._settings.Vibrato.NoteWideAmplitude;break;default:return}var track=note.Beat.Voice.Bar.Staff.Track;this.GenerateVibratorWithParams(track,noteStart,noteDuration.NoteOnly,phaseLength,bendAmplitude,channel)},GenerateVibratorWithParams:function(track,noteStart,noteDuration,phaseLength,bendAmplitude,channel){for(var phaseHalf=phaseLength/2|0,noteEnd=(noteStart+=phaseLength)+noteDuration;noteStart0&&!note.IsContinuedBend&&--noteStart;var playedBendPoints=[];switch(note.BendType){case 1:playedBendPoints=bendPoints;break;case 2:case 3:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[1].Value));break;case 2:return void(3==note.Beat.GraceType?this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!0,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value])):this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value])))}break;case 4:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,note.BendPoints[1].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[2].Value));break;case 2:return void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value,note.BendPoints[2].Value]))}break;case 5:case 6:playedBendPoints=bendPoints;break;case 7:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[1].Value));break;case 2:var preBendValue=64+2.75*note.BendPoints[0].Value;return this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Single(preBendValue))),void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value]))}break;case 8:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[1].Value));break;case 2:var preBendValue1=64+2.75*note.BendPoints[0].Value;return this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Single(preBendValue1))),void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!0,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value]))}}this.GenerateWhammyOrBend(noteStart,channel,duration,playedBendPoints,track)},GenerateSongBookWhammyOrBend:function(noteStart,channel,duration,track,bendAtBeginning,bendValues){var durationBySetting;if(null==this._settings)durationBySetting=duration;else{var this1=alphaTab.audio.MidiUtils.MillisToTicks(this._settings.SongBookBendDuration,this._currentTempo);durationBySetting=Math.min(duration,this1)}var startTick;if(bendAtBeginning){startTick=noteStart}else startTick=noteStart+duration-durationBySetting;for(var ticksBetweenPoints=durationBySetting/(bendValues.length-1),i=0;i0&&!beat.IsContinuedWhammy&&--noteStart;var playedBendPoints=[];switch(beat.WhammyBarType){case 1:playedBendPoints=bendPoints;break;case 2:switch(beat.WhammyStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,bendPoints[1].Value));break;case 2:return void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([bendPoints[0].Value,bendPoints[1].Value]))}break;case 3:switch(beat.WhammyStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,bendPoints[1].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,bendPoints[2].Value));break;case 2:return void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!0,new Int32Array([bendPoints[0].Value,bendPoints[1].Value,bendPoints[2].Value]))}break;case 4:case 5:playedBendPoints=bendPoints;break;case 6:switch(beat.WhammyStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,bendPoints[1].Value));break;case 2:var preDiveValue=64+2.75*bendPoints[0].Value;return this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Single(preDiveValue))),void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([bendPoints[0].Value,bendPoints[1].Value]))}}this.GenerateWhammyOrBend(noteStart,channel,duration,playedBendPoints,track)},GenerateWhammyOrBend:function(noteStart,channel,duration,playedBendPoints,track){for(var ticksPerPosition=duration/60,i=0;inextBendValue)for(;currentBendValue>=nextBendValue;){var this2=currentBendValue;this._handler.AddBend(track.Index,system.Convert.ToInt32_Double(currentTick),system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Double(Math.round(this2)))),--currentBendValue,currentTick+=ticksPerValue}else{var this3=currentBendValue;this._handler.AddBend(track.Index,system.Convert.ToInt32_Double(currentTick),system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Double(Math.round(this3))))}},GenerateTrill:function(note,noteStart,noteDuration,noteKey,dynamicValue,channel){for(var track=note.Beat.Voice.Bar.Staff.Track,trillKey=note.get_StringTuning()+note.get_TrillFret(),trillLength=alphaTab.audio.MidiUtils.ToTicks(note.TrillSpeed),realKey=!0,tick=noteStart,end=noteStart+noteDuration.UntilTieEnd;tick+10=end&&(trillLength=end-tick),this._handler.AddNote(track.Index,tick,trillLength,system.Convert.ToUInt8(realKey?trillKey:noteKey),dynamicValue,system.Convert.ToUInt8(channel)),realKey=!realKey,tick+=trillLength},GenerateTremoloPicking:function(note,noteStart,noteDuration,noteKey,dynamicValue,channel){for(var track=note.Beat.Voice.Bar.Staff.Track,tpLength=alphaTab.audio.MidiUtils.ToTicks(note.Beat.TremoloSpeed),tick=noteStart,end=noteStart+noteDuration.UntilTieEnd;tick+10=end&&(tpLength=end-tick),this._handler.AddNote(track.Index,tick,tpLength,system.Convert.ToUInt8(noteKey),dynamicValue,system.Convert.ToUInt8(channel)),tick+=tpLength},GetBrushInfo:function(beat){var brushInfo=new Int32Array(beat.Voice.Bar.Staff.Tuning.length);if(0!=beat.BrushType){for(var stringUsed=0,stringCount=0,i=0,j=beat.Notes.length;i0)for(var brushMove=0,brushIncrement=beat.BrushDuration/(stringCount-1)|0,i1=0,j1=beat.Voice.Bar.Staff.Tuning.length;i1=this._score.MasterBars.length},ProcessCurrent:function(){var masterBar=this._score.MasterBars[this.Index],masterBarAlternateEndings=masterBar.AlternateEndings;masterBar.RepeatGroup.IsClosed||masterBar.RepeatGroup.Openings[masterBar.RepeatGroup.Openings.length-1]!=masterBar||(this._repeatNumber=0,this._repeatOpen=!1),!masterBar.IsRepeatStart&&0!=masterBar.Index||0!=this._repeatNumber?masterBar.IsRepeatStart&&(this.ShouldPlay=!0):(this._repeatStartIndex=this.Index,this._repeatOpen=!0),this._repeatOpen&&masterBarAlternateEndings>0&&(0==(masterBarAlternateEndings&1<0?this._repeatNumber>8&255),p1.Zones[i].Generators.length>1&&44==p1.Zones[i].Generators[1].GeneratorType&&(presetLoVel=alphaTab.platform.Platform.ToUInt8(255&p1.Zones[i].Generators[1].get_AmountInt16()),presetHiVel=alphaTab.platform.Platform.ToUInt8(p1.Zones[i].Generators[1].get_AmountInt16()>>8&255))):44==p1.Zones[i].Generators[0].GeneratorType&&(presetLoVel=alphaTab.platform.Platform.ToUInt8(255&p1.Zones[i].Generators[0].get_AmountInt16()),presetHiVel=alphaTab.platform.Platform.ToUInt8(p1.Zones[i].Generators[0].get_AmountInt16()>>8&255)),41==p1.Zones[i].Generators[p1.Zones[i].Generators.length-1].GeneratorType)for(var insts=sfinsts[p1.Zones[i].Generators[p1.Zones[i].Generators.length-1].get_AmountInt16()],inst=HxOverrides.iter(insts);inst.hasNext();){var instLoKey,instHiKey,instLoVel,instHiVel,inst1=inst.next();if(instLoKey=alphaTab.platform.Platform.ToUInt8(255&inst1.Generators[43]),instHiKey=alphaTab.platform.Platform.ToUInt8(inst1.Generators[43]>>8&255),instLoVel=alphaTab.platform.Platform.ToUInt8(255&inst1.Generators[44]),instHiVel=alphaTab.platform.Platform.ToUInt8(inst1.Generators[44]>>8&255),instLoKey<=presetHiKey&&presetLoKey<=instHiKey&&instLoVel<=presetHiVel&&presetLoVel<=instHiVel){var r=new alphaTab.audio.synth.sf2.Sf2Region,src=inst1.Generators,dst=r.Generators,count=r.Generators.length;dst.set(src.subarray(0,0+count),0),this.ReadSf2Region(r,globalGens,p1.Zones[i].Generators,!0),regionList.push(r)}}++i}var mp=new alphaTab.audio.synth.bank.patch.MultiPatch(p1.Name);mp.LoadSf2(regionList,this._assets),this._assets.PatchAssets.push(new alphaTab.audio.synth.bank.PatchAsset(mp.Name,mp)),this.AssignPatchToBank(mp,p1.BankNumber,p1.PatchNumber,p1.PatchNumber)}},ReadSf2Instruments:function(instruments){for(var size=instruments.length,regions=new Array(size),x=0;x>8&255),lo_b=alphaTab.platform.Platform.ToUInt8(255&genList[x3].get_AmountInt16()),hi_b=alphaTab.platform.Platform.ToUInt8(genList[x3].get_AmountInt16()>>8&255),(lo_a=Math.max(lo_a,lo_b))>(hi_a=Math.min(hi_a,hi_b)))throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid sf2 region. The range generators do not intersect."));region.Generators[value]=alphaTab.platform.Platform.ToInt16(lo_a|hi_a<<8)}else region.Generators[value]=alphaTab.platform.Platform.ToInt16(region.Generators[value]+genList[x3].get_AmountInt16());++x3}}}else{if(null!=globals)for(var x=0;xendRange){var range=startRange;startRange=endRange,endRange=range}if(startRange<0||startRange>=128)throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("startRange out of range"));if(endRange<0||endRange>=128)throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("endRange out of range"));var patches;if(this._bank.hasOwnProperty(bankNumber))patches=this._bank[bankNumber];else{patches=new Array(128),this._bank[bankNumber]=patches}for(var x=startRange;x<=endRange;)patches[x]=patch,++x}},__class__:alphaTab.audio.synth.bank.PatchBank},alphaTab.audio.synth.bank.PcmData=$hx_exports.alphaTab.audio.synth.bank.PcmData=function(bits,pcmData,isDataInLittleEndianFormat){this.Data=null,this.Length=0,this.BytesPerSample=0,this.BytesPerSample=system.Convert.ToUInt8(bits/8|0),this.Data=pcmData,this.Length=this.Data.length/this.BytesPerSample|0,isDataInLittleEndianFormat||alphaTab.audio.synth.util.SynthHelper.SwapEndianess(this.Data,bits)},alphaTab.audio.synth.bank.PcmData.__name__=["alphaTab","audio","synth","bank","PcmData"],alphaTab.audio.synth.bank.PcmData.Create=function(bits,pcmData,isDataInLittleEndianFormat){switch(bits){case 8:return new alphaTab.audio.synth.bank.PcmData8Bit(bits,pcmData,isDataInLittleEndianFormat);case 16:return new alphaTab.audio.synth.bank.PcmData16Bit(bits,pcmData,isDataInLittleEndianFormat);case 24:return new alphaTab.audio.synth.bank.PcmData24Bit(bits,pcmData,isDataInLittleEndianFormat);case 32:return new alphaTab.audio.synth.bank.PcmData32Bit(bits,pcmData,isDataInLittleEndianFormat);default:throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid PCM format. "+bits+"bit pcm data is not supported."))}},alphaTab.audio.synth.bank.PcmData.prototype={get_BitsPerSample:function(){return 8*this.BytesPerSample},get_Item:function(index){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.audio.synth.bank.PcmData},alphaTab.audio.synth.bank.PcmData16Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData16Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData16Bit.__name__=["alphaTab","audio","synth","bank","PcmData16Bit"],alphaTab.audio.synth.bank.PcmData16Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData16Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){index*=2;return((this.Data[index]|this.Data[index+1]<<8)<<16>>16)/32768},__class__:alphaTab.audio.synth.bank.PcmData16Bit}),alphaTab.audio.synth.bank.PcmData24Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData24Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData24Bit.__name__=["alphaTab","audio","synth","bank","PcmData24Bit"],alphaTab.audio.synth.bank.PcmData24Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData24Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){index*=3;return((this.Data[index]|this.Data[index+1]<<8|this.Data[index+2]<<16)<<12>>12)/8388608},__class__:alphaTab.audio.synth.bank.PcmData24Bit}),alphaTab.audio.synth.bank.PcmData32Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData32Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData32Bit.__name__=["alphaTab","audio","synth","bank","PcmData32Bit"],alphaTab.audio.synth.bank.PcmData32Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData32Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){index*=4;return(this.Data[index]|this.Data[index+1]<<8|this.Data[index+2]<<16|this.Data[index+3]<<24)/2147483648},__class__:alphaTab.audio.synth.bank.PcmData32Bit}),alphaTab.audio.synth.bank.PcmData8Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData8Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData8Bit.__name__=["alphaTab","audio","synth","bank","PcmData8Bit"],alphaTab.audio.synth.bank.PcmData8Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData8Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){return this.Data[index]/255*2-1},__class__:alphaTab.audio.synth.bank.PcmData8Bit}),alphaTab.audio.synth.bank.SampleDataAsset=$hx_exports.alphaTab.audio.synth.bank.SampleDataAsset=function(sample,sampleData){this.Name=null,this.Channels=0,this.SampleRate=0,this.RootKey=0,this.Tune=0,this.Start=0,this.End=0,this.LoopStart=0,this.LoopEnd=0,this.SampleData=null,this.Channels=1,this.Name=sample.Name,this.SampleRate=sample.SampleRate,this.RootKey=sample.RootKey,this.Tune=sample.Tune;var this1=sample.Start;this.Start=this1;var this2=sample.End;this.End=this2;var this3=sample.StartLoop;this.LoopStart=this3;var this4=sample.EndLoop;if(this.LoopEnd=this4,0!=(16&sample.SoundFontSampleLink))throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Ogg Vobis encoded soundfonts not supported"));this.SampleData=alphaTab.audio.synth.bank.PcmData.Create(sampleData.BitsPerSample,sampleData.SampleData,!0)},alphaTab.audio.synth.bank.SampleDataAsset.__name__=["alphaTab","audio","synth","bank","SampleDataAsset"],alphaTab.audio.synth.bank.SampleDataAsset.prototype={__class__:alphaTab.audio.synth.bank.SampleDataAsset},alphaTab.audio.synth.bank.components._EnvelopeState={},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_={},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.__name__=["alphaTab","audio","synth","bank","components","_EnvelopeState","EnvelopeState_Impl_"],alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.toString=function(this1){switch(this1){case 0:return"Delay";case 1:return"Attack";case 2:return"Hold";case 3:return"Decay";case 4:return"Sustain";case 5:return"Release";case 6:return"None"}return""},alphaTab.audio.synth.bank.components._FilterType={},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_={},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.__name__=["alphaTab","audio","synth","bank","components","_FilterType","FilterType_Impl_"],alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"BiquadLowpass";case 2:return"BiquadHighpass";case 3:return"OnePoleLowpass"}return""},alphaTab.audio.synth.bank.components._LfoState={},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_={},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.__name__=["alphaTab","audio","synth","bank","components","_LfoState","LfoState_Impl_"],alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.toString=function(this1){switch(this1){case 0:return"Delay";case 1:return"Sustain"}return""},alphaTab.audio.synth.bank.components._PanFormulaEnum={},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_={},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.__name__=["alphaTab","audio","synth","bank","components","_PanFormulaEnum","PanFormulaEnum_Impl_"],alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.toString=function(this1){switch(this1){case 0:return"Neg3dBCenter";case 1:return"Neg6dBCenter";case 2:return"ZeroCenter"}return""},alphaTab.audio.synth.bank.components.generators._GeneratorState={},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_=$hx_exports.alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_={},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.__name__=["alphaTab","audio","synth","bank","components","generators","_GeneratorState","GeneratorState_Impl_"],alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.toString=function(this1){switch(this1){case 0:return"PreLoop";case 1:return"Loop";case 2:return"PostLoop";case 3:return"Finished"}return""},alphaTab.audio.synth.bank.components.generators._LoopMode={},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_=$hx_exports.alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_={},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.__name__=["alphaTab","audio","synth","bank","components","generators","_LoopMode","LoopMode_Impl_"],alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.toString=function(this1){switch(this1){case 0:return"NoLoop";case 1:return"OneShot";case 2:return"Continuous";case 3:return"LoopUntilNoteOff"}return""},alphaTab.audio.synth.bank.components.generators.SampleGenerator=$hx_exports.alphaTab.audio.synth.bank.components.generators.SampleGenerator=function(){alphaTab.audio.synth.bank.components.generators.Generator.call(this,new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),this.Samples=null},alphaTab.audio.synth.bank.components.generators.SampleGenerator.__name__=["alphaTab","audio","synth","bank","components","generators","SampleGenerator"],alphaTab.audio.synth.bank.components.generators.SampleGenerator.__super__=alphaTab.audio.synth.bank.components.generators.Generator,alphaTab.audio.synth.bank.components.generators.SampleGenerator.prototype=$extend(alphaTab.audio.synth.bank.components.generators.Generator.prototype,{GetValue:function(phase){return this.Samples.get_Item(system.Convert.ToInt32_Double(phase))},GetValues:function(generatorParams,blockBuffer,increment){for(var proccessed=0;;){var samplesAvailable=system.Convert.ToInt32_Double(Math.ceil((generatorParams.CurrentEnd-generatorParams.Phase)/increment));if(samplesAvailable>blockBuffer.length-proccessed)return void this.Interpolate(generatorParams,blockBuffer,increment,proccessed,blockBuffer.length);var endProccessed=proccessed+samplesAvailable;this.Interpolate(generatorParams,blockBuffer,increment,proccessed,endProccessed),proccessed=endProccessed;switch(generatorParams.CurrentState){case 0:generatorParams.CurrentStart=this.LoopStartPhase,generatorParams.CurrentEnd=this.LoopEndPhase,generatorParams.CurrentState=1;break;case 1:generatorParams.Phase=generatorParams.Phase+(generatorParams.CurrentStart-generatorParams.CurrentEnd);break;case 2:for(generatorParams.CurrentState=3;proccessed>8&255),loVel=alphaTab.platform.Platform.ToUInt8(255®ions[x].Generators[44]),hiVel=alphaTab.platform.Platform.ToUInt8(regions[x].Generators[44]>>8&255);var sf2=new alphaTab.audio.synth.bank.patch.Sf2Patch(this.Name+"_"+Std.string(x));sf2.Load(regions[x],assets),this._intervalList[x]=new alphaTab.audio.synth.bank.patch.PatchInterval(sf2,0,15,loKey,hiKey,loVel,hiVel),++x}this.DetermineIntervalType()},DetermineIntervalType:function(){for(var checkChannel=!1,checkVelocity=!1,x=0;x=this.StartChannel&&channel<=this.EndChannel&&key>=this.StartKey&&key<=this.EndKey&&(velocity>=this.StartVelocity&&velocity<=this.EndVelocity)},CheckChannelAndKey:function(channel,key){return channel>=this.StartChannel&&channel<=this.EndChannel&&(key>=this.StartKey&&key<=this.EndKey)},CheckKeyAndVelocity:function(key,velocity){return key>=this.StartKey&&key<=this.EndKey&&(velocity>=this.StartVelocity&&velocity<=this.EndVelocity)},CheckKey:function(key){return key>=this.StartKey&&key<=this.EndKey},__class__:alphaTab.audio.synth.bank.patch.PatchInterval},alphaTab.audio.synth.bank.patch.Sf2Patch=$hx_exports.alphaTab.audio.synth.bank.patch.Sf2Patch=function(name){alphaTab.audio.synth.bank.patch.Patch.call(this,name),this.iniFilterFc=0,this.filterQ=0,this.initialAttn=0,this.keyOverride=0,this.velOverride=0,this.keynumToModEnvHold=0,this.keynumToModEnvDecay=0,this.keynumToVolEnvHold=0,this.keynumToVolEnvDecay=0,this.pan=null,this.modLfoToPitch=0,this.vibLfoToPitch=0,this.modEnvToPitch=0,this.modLfoToFilterFc=0,this.modEnvToFilterFc=0,this.modLfoToVolume=0,this.gen=null,this.mod_env=null,this.vel_env=null,this.mod_lfo=null,this.vib_lfo=null,this.fltr=null},alphaTab.audio.synth.bank.patch.Sf2Patch.__name__=["alphaTab","audio","synth","bank","patch","Sf2Patch"],alphaTab.audio.synth.bank.patch.Sf2Patch.CalculateModulator=function(s,t,d,p,value,min,max){var i,output=0;switch(value-=min,max-=min,1==d&&(value=max-value),s){case 0:output=value/max|0;break;case 1:i=127-value,output=Math.log(i*i/js.Boot.__cast(max*max,Float))/Math.log(10)*-.20833333333333334;break;case 2:i=value,output=1+Math.log(i*i/js.Boot.__cast(max*max,Float))/Math.log(10)*.20833333333333334;break;case 3:output=value<=(max/2|0)?0:1}return 1==p&&(output=2*output-1),2==t&&(output=Math.abs(output)),output},alphaTab.audio.synth.bank.patch.Sf2Patch.__super__=alphaTab.audio.synth.bank.patch.Patch,alphaTab.audio.synth.bank.patch.Sf2Patch.prototype=$extend(alphaTab.audio.synth.bank.patch.Patch.prototype,{Start:function(voiceparams){var note=this.keyOverride>-1?this.keyOverride:voiceparams.Note;this.velOverride>-1?this.velOverride:voiceparams.Velocity;voiceparams.GeneratorParams[0].QuickSetup(this.gen),voiceparams.Envelopes[0].QuickSetupSf2(voiceparams.SynthParams.Synth.SampleRate,note,this.keynumToModEnvHold,this.keynumToModEnvDecay,!1,this.mod_env),voiceparams.Envelopes[1].QuickSetupSf2(voiceparams.SynthParams.Synth.SampleRate,note,this.keynumToVolEnvHold,this.keynumToVolEnvDecay,!0,this.vel_env),voiceparams.Filters[0].Disable(),voiceparams.Lfos[0].QuickSetup(voiceparams.SynthParams.Synth.SampleRate,this.mod_lfo),voiceparams.Lfos[1].QuickSetup(voiceparams.SynthParams.Synth.SampleRate,this.vib_lfo),voiceparams.PitchOffset=(note-this.gen.RootKey)*this.gen.KeyTrack+this.gen.Tune,voiceparams.PitchOffset=voiceparams.PitchOffset+(100*(voiceparams.SynthParams.MasterCoarseTune+(voiceparams.SynthParams.MasterFineTune.get_Combined()-8192)/8192)|0),voiceparams.VolOffset=this.initialAttn;voiceparams.VolOffset=voiceparams.VolOffset-96*js.Boot.__cast(alphaTab.audio.synth.bank.patch.Sf2Patch.CalculateModulator(1,0,1,0,voiceparams.Velocity,0,127),Float);return voiceparams.VolOffset=voiceparams.VolOffset-96*js.Boot.__cast(alphaTab.audio.synth.bank.patch.Sf2Patch.CalculateModulator(1,0,1,0,voiceparams.SynthParams.Volume.get_Coarse(),0,127),Float),3!=voiceparams.GeneratorParams[0].CurrentState&&6!=voiceparams.Envelopes[1].CurrentStage},Stop:function(voiceparams){this.gen.Release(voiceparams.GeneratorParams[0]),1!=this.gen.LoopMode&&(voiceparams.Envelopes[0].Release(1e-38),voiceparams.Envelopes[1].ReleaseSf2VolumeEnvelope())},Process:function(voiceparams,startIndex,endIndex,isMuted,isSilentProcess){var basePitch=alphaTab.audio.synth.util.SynthHelper.CentsToPitch(voiceparams.SynthParams.CurrentPitch)*this.gen.Frequency*alphaTab.audio.synth.util.SynthHelper.CentsToPitch(voiceparams.PitchOffset)/voiceparams.SynthParams.Synth.SampleRate,baseVolume=voiceparams.SynthParams.Synth.MasterVolume*voiceparams.SynthParams.CurrentVolume*.35*voiceparams.SynthParams.MixVolume;if(isSilentProcess)voiceparams.State=0;else for(var x=startIndex;x13500&&(centsFc=13500),voiceparams.Filters[0].set_CutOff(alphaTab.audio.synth.util.SynthHelper.KeyToFrequency(centsFc/100,69)),voiceparams.Filters[0].CoeffNeedsUpdating?voiceparams.Filters[0].ApplyFilterInterp(voiceparams.BlockBuffer,voiceparams.SynthParams.Synth.SampleRate):voiceparams.Filters[0].ApplyFilter_SampleArray(voiceparams.BlockBuffer)}var this1=voiceparams.VolOffset+voiceparams.Envelopes[1].Value+voiceparams.Lfos[0].Value*this.modLfoToVolume,volume=js.Boot.__cast(alphaTab.audio.synth.util.SynthHelper.DBtoLinear(this1),Float)*baseVolume;if(isMuted||voiceparams.MixMonoToStereoInterp(x,volume*this.pan.Left*voiceparams.SynthParams.CurrentPan.Left,volume*this.pan.Right*voiceparams.SynthParams.CurrentPan.Right),voiceparams.Envelopes[1].CurrentStage>2&&volume<=1e-5||3==voiceparams.GeneratorParams[0].CurrentState)return void(voiceparams.State=0);x+=128}},Load:function(region,assets){this.ExclusiveGroup=region.Generators[57],this.ExclusiveGroupTarget=this.ExclusiveGroup,this.iniFilterFc=region.Generators[8],this.filterQ=alphaTab.audio.synth.util.SynthHelper.DBtoLinear(region.Generators[9]/10);this.initialAttn=-region.Generators[48]/10,this.keyOverride=region.Generators[46],this.velOverride=region.Generators[47],this.keynumToModEnvHold=region.Generators[31],this.keynumToModEnvDecay=region.Generators[32],this.keynumToVolEnvHold=region.Generators[39],this.keynumToVolEnvDecay=region.Generators[40],this.pan=new alphaTab.audio.synth.bank.components.PanComponent;this.pan.SetValue(region.Generators[17]/500,0),this.modLfoToPitch=region.Generators[5],this.vibLfoToPitch=region.Generators[6],this.modEnvToPitch=region.Generators[7],this.modLfoToFilterFc=region.Generators[10],this.modEnvToFilterFc=region.Generators[11];this.modLfoToVolume=region.Generators[13]/10,this.LoadGen(region,assets),this.LoadEnvelopes(region),this.LoadLfos(region),this.LoadFilter(region)},LoadGen:function(region,assets){var this1=region.Generators[53],sda=assets.SampleAssets[this1];this.gen=new alphaTab.audio.synth.bank.components.generators.SampleGenerator;var this2=sda.End+region.Generators[1]+32768*region.Generators[12];this.gen.EndPhase=this2;var this3=sda.SampleRate;this.gen.Frequency=this3,this.gen.KeyTrack=region.Generators[56];var this4=sda.LoopEnd+region.Generators[3]+32768*region.Generators[50];this.gen.LoopEndPhase=this4;switch(3®ion.Generators[54]){case 1:this.gen.LoopMode=2;break;case 0:case 2:this.gen.LoopMode=0;break;case 3:this.gen.LoopMode=3}var this5=sda.LoopStart+region.Generators[2]+32768*region.Generators[45];this.gen.LoopStartPhase=this5,this.gen.Offset=0,this.gen.Period=1,region.Generators[58]>-1?this.gen.RootKey=region.Generators[58]:this.gen.RootKey=sda.RootKey;var this6=sda.Start+region.Generators[0]+32768*region.Generators[4];this.gen.StartPhase=this6;var this7=region.Generators[52],tmp=system.Convert.ToInt16(sda.Tune+this7+100*region.Generators[51]);this.gen.Tune=tmp,this.gen.VelocityTrack=0,js.Boot.__cast(this.gen,alphaTab.audio.synth.bank.components.generators.SampleGenerator).Samples=sda.SampleData},LoadEnvelopes:function(region){this.mod_env=new alphaTab.audio.synth.bank.descriptors.EnvelopeDescriptor,this.mod_env.AttackTime=js.Boot.__cast(Math.pow(2,region.Generators[26]/1200),Float),this.mod_env.AttackGraph=3,this.mod_env.DecayTime=js.Boot.__cast(Math.pow(2,region.Generators[28]/1200),Float),this.mod_env.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[25]/1200),Float),this.mod_env.HoldTime=js.Boot.__cast(Math.pow(2,region.Generators[27]/1200),Float),this.mod_env.PeakLevel=1,this.mod_env.ReleaseTime=js.Boot.__cast(Math.pow(2,region.Generators[30]/1200),Float),this.mod_env.StartLevel=0;var tmp=alphaTab.audio.synth.util.SynthHelper.ClampS(region.Generators[29],0,1e3);this.mod_env.SustainLevel=1-tmp/1e3;if(this.mod_env.AttackTime<.001)this.mod_env.AttackTime=.001;else{this.mod_env.AttackTime>100&&(this.mod_env.AttackTime=100)}if(this.mod_env.DecayTime<.001)this.mod_env.DecayTime=0;else{this.mod_env.DecayTime>100&&(this.mod_env.DecayTime=100)}if(this.mod_env.DelayTime<.001)this.mod_env.DelayTime=0;else{this.mod_env.DelayTime>20&&(this.mod_env.DelayTime=20)}if(this.mod_env.HoldTime<.001)this.mod_env.HoldTime=0;else{this.mod_env.HoldTime>20&&(this.mod_env.HoldTime=20)}if(this.mod_env.ReleaseTime<.001)this.mod_env.ReleaseTime=.001;else{this.mod_env.ReleaseTime>100&&(this.mod_env.ReleaseTime=100)}this.vel_env=new alphaTab.audio.synth.bank.descriptors.EnvelopeDescriptor,this.vel_env.AttackTime=js.Boot.__cast(Math.pow(2,region.Generators[34]/1200),Float),this.vel_env.AttackGraph=3,this.vel_env.DecayTime=js.Boot.__cast(Math.pow(2,region.Generators[36]/1200),Float),this.vel_env.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[33]/1200),Float),this.vel_env.HoldTime=js.Boot.__cast(Math.pow(2,region.Generators[35]/1200),Float),this.vel_env.PeakLevel=0,this.vel_env.ReleaseTime=js.Boot.__cast(Math.pow(2,region.Generators[38]/1200),Float),this.vel_env.StartLevel=-100;var this13=alphaTab.audio.synth.util.SynthHelper.ClampS(region.Generators[37],0,1e3)/-10|0;this.vel_env.SustainLevel=this13;if(this.vel_env.AttackTime<.001)this.vel_env.AttackTime=.001;else{this.vel_env.AttackTime>100&&(this.vel_env.AttackTime=100)}if(this.vel_env.DecayTime<.001)this.vel_env.DecayTime=0;else{this.vel_env.DecayTime>100&&(this.vel_env.DecayTime=100)}if(this.vel_env.DelayTime<.001)this.vel_env.DelayTime=0;else{this.vel_env.DelayTime>20&&(this.vel_env.DelayTime=20)}if(this.vel_env.HoldTime<.001)this.vel_env.HoldTime=0;else{this.vel_env.HoldTime>20&&(this.vel_env.HoldTime=20)}if(this.vel_env.ReleaseTime<.001)this.vel_env.ReleaseTime=.001;else{this.vel_env.ReleaseTime>100&&(this.vel_env.ReleaseTime=100)}},LoadLfos:function(region){this.mod_lfo=new alphaTab.audio.synth.bank.descriptors.LfoDescriptor,this.mod_lfo.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[21]/1200),Float),this.mod_lfo.Frequency=js.Boot.__cast(8.176*Math.pow(2,region.Generators[22]/1200),Float),this.mod_lfo.Generator=alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSine,this.vib_lfo=new alphaTab.audio.synth.bank.descriptors.LfoDescriptor,this.vib_lfo.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[23]/1200),Float),this.vib_lfo.Frequency=js.Boot.__cast(8.176*Math.pow(2,region.Generators[24]/1200),Float),this.vib_lfo.Generator=alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSine},LoadFilter:function(region){this.fltr=new alphaTab.audio.synth.bank.descriptors.FilterDescriptor,this.fltr.FilterMethod=1,this.fltr.CutOff=js.Boot.__cast(alphaTab.audio.synth.util.SynthHelper.KeyToFrequency(region.Generators[8]/100,69),Float),this.fltr.Resonance=js.Boot.__cast(alphaTab.audio.synth.util.SynthHelper.DBtoLinear(region.Generators[9]/10),Float)},__class__:alphaTab.audio.synth.bank.patch.Sf2Patch}),alphaTab.audio.synth.ds.CircularSampleBuffer=$hx_exports.alphaTab.audio.synth.ds.CircularSampleBuffer=function(size){this._buffer=null,this._writePosition=0,this._readPosition=0,this.Count=0;var this1=new Float32Array(size);this._buffer=this1,this._writePosition=0,this._readPosition=0,this.Count=0},alphaTab.audio.synth.ds.CircularSampleBuffer.__name__=["alphaTab","audio","synth","ds","CircularSampleBuffer"],alphaTab.audio.synth.ds.CircularSampleBuffer.prototype={Clear:function(){this._readPosition=0,this._writePosition=0,this.Count=0;var this1=new Float32Array(this._buffer.length);this._buffer=this1},Write:function(data,offset,count){var samplesWritten=0;count>this._buffer.length-this.Count&&(count=this._buffer.length-this.Count);var writeToEnd=Math.min(this._buffer.length-this._writePosition,count),destPos=this._writePosition;if(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(this._buffer).set(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(data).subarray(offset,offset+writeToEnd),destPos),this._writePosition=this._writePosition+writeToEnd,this._writePosition=this._writePosition%this._buffer.length,(samplesWritten+=writeToEnd)this.Count&&(count=this.Count);var samplesRead=0,readToEnd=Math.min(this._buffer.length-this._readPosition,count),src=this._buffer,srcPos=this._readPosition;if(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(data).set(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(src).subarray(srcPos,srcPos+readToEnd),offset),samplesRead+=readToEnd,this._readPosition=this._readPosition+readToEnd,this._readPosition=this._readPosition%this._buffer.length,samplesRead>=7)>0;);for(;n>0;)--n>0?s.WriteByte(system.Convert.ToUInt8(128|array[n])):s.WriteByte(array[n])},alphaTab.audio.synth.midi.MidiFile.prototype={AddEvent:function(e){if(0==this.Events.length)this.Events.push(e);else{for(var insertPos=this.Events.length;insertPos>0;){if(!(this.Events[insertPos-1].Tick>e.Tick))break;--insertPos}this.Events.splice(insertPos,0,e)}},ToBinary:function(){var data=alphaTab.io.ByteBuffer.Empty();return this.WriteTo(data),data.ToArray()},WriteTo:function(s){var b=new Uint8Array([77,84,104,100]);s.Write(b,0,b.length),b=new Uint8Array([0,0,0,6]),s.Write(b,0,b.length),b=new Uint8Array([0,0]),s.Write(b,0,b.length);var v=1;b=new Uint8Array([system.Convert.ToUInt8(v>>8&255),system.Convert.ToUInt8(255&v)]),s.Write(b,0,b.length),v=system.Convert.ToInt16(960),b=new Uint8Array([system.Convert.ToUInt8(v>>8&255),system.Convert.ToUInt8(255&v)]),s.Write(b,0,b.length);for(var trackData=alphaTab.io.ByteBuffer.Empty(),previousTick=0,midiEvent=$iterator(this.Events)();midiEvent.hasNext();){var midiEvent1=midiEvent.next(),delta=midiEvent1.Tick-previousTick;alphaTab.audio.synth.midi.MidiFile.WriteVariableInt(trackData,delta),midiEvent1.WriteTo(trackData),previousTick=midiEvent1.Tick}b=new Uint8Array([77,84,114,107]),s.Write(b,0,b.length);var data=trackData.ToArray(),l=data.length;b=new Uint8Array([system.Convert.ToUInt8(l>>24&255),system.Convert.ToUInt8(l>>16&255),system.Convert.ToUInt8(l>>8&255),system.Convert.ToUInt8(255&l)]),s.Write(b,0,b.length),s.Write(data,0,data.length)},__class__:alphaTab.audio.synth.midi.MidiFile},alphaTab.audio.synth.midi.MidiHelper=$hx_exports.alphaTab.audio.synth.midi.MidiHelper=function(){},alphaTab.audio.synth.midi.MidiHelper.__name__=["alphaTab","audio","synth","midi","MidiHelper"],alphaTab.audio.synth.midi.event={},alphaTab.audio.synth.midi.event._ControllerType={},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_={},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.__name__=["alphaTab","audio","synth","midi","event","_ControllerType","ControllerType_Impl_"],alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.toString=function(this1){switch(this1){case 0:return"BankSelectCoarse";case 1:return"ModulationCoarse";case 6:return"DataEntryCoarse";case 7:return"VolumeCoarse";case 10:return"PanCoarse";case 11:return"ExpressionControllerCoarse";case 33:return"ModulationFine";case 38:return"DataEntryFine";case 39:return"VolumeFine";case 42:return"PanFine";case 43:return"ExpressionControllerFine";case 64:return"HoldPedal";case 68:return"LegatoPedal";case 98:return"NonRegisteredParameterFine";case 99:return"NonRegisteredParameterCourse";case 100:return"RegisteredParameterFine";case 101:return"RegisteredParameterCourse";case 121:return"ResetControllers";case 123:return"AllNotesOff"}return""},alphaTab.audio.synth.midi.event.MidiEvent=$hx_exports.alphaTab.audio.synth.midi.event.MidiEvent=function(tick,status,data1,data2){this.Message=0,this.Tick=0,this.Tick=tick,this.Message=status|data1<<8|data2<<16},alphaTab.audio.synth.midi.event.MidiEvent.__name__=["alphaTab","audio","synth","midi","event","MidiEvent"],alphaTab.audio.synth.midi.event.MidiEvent.prototype={get_Channel:function(){return 15&this.Message},get_Command:function(){return js.Boot.__cast(240&this.Message,Int)},get_Data1:function(){return(65280&this.Message)>>8},set_Data1:function(value){return this.Message=-65281&this.Message,this.Message=this.Message|value<<8,this.get_Data1()},get_Data2:function(){return(16711680&this.Message)>>16},set_Data2:function(value){return this.Message=-16711681&this.Message,this.Message=this.Message|value<<16,this.get_Data2()},WriteTo:function(s){var b=new Uint8Array([system.Convert.ToUInt8(this.Message>>24&255),system.Convert.ToUInt8(this.Message>>16&255),system.Convert.ToUInt8(this.Message>>8&255),system.Convert.ToUInt8(255&this.Message)]);s.Write(b,0,b.length)},__class__:alphaTab.audio.synth.midi.event.MidiEvent},alphaTab.audio.synth.midi.event.MetaEvent=$hx_exports.alphaTab.audio.synth.midi.event.MetaEvent=function(delta,status,data1,data2){alphaTab.audio.synth.midi.event.MidiEvent.call(this,delta,status,data1,data2)},alphaTab.audio.synth.midi.event.MetaEvent.__name__=["alphaTab","audio","synth","midi","event","MetaEvent"],alphaTab.audio.synth.midi.event.MetaEvent.__super__=alphaTab.audio.synth.midi.event.MidiEvent,alphaTab.audio.synth.midi.event.MetaEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MidiEvent.prototype,{get_Channel:function(){return-1},get_Command:function(){return js.Boot.__cast(255&this.Message,Int)},get_MetaStatus:function(){return this.get_Data1()},__class__:alphaTab.audio.synth.midi.event.MetaEvent}),alphaTab.audio.synth.midi.event.MetaDataEvent=$hx_exports.alphaTab.audio.synth.midi.event.MetaDataEvent=function(delta,status,metaId,data){alphaTab.audio.synth.midi.event.MetaEvent.call(this,delta,status,metaId,0),this.Data=null,this.Data=data},alphaTab.audio.synth.midi.event.MetaDataEvent.__name__=["alphaTab","audio","synth","midi","event","MetaDataEvent"],alphaTab.audio.synth.midi.event.MetaDataEvent.__super__=alphaTab.audio.synth.midi.event.MetaEvent,alphaTab.audio.synth.midi.event.MetaDataEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MetaEvent.prototype,{WriteTo:function(s){s.WriteByte(255),s.WriteByte(system.Convert.ToUInt8(this.get_MetaStatus()));var l=this.Data.length;alphaTab.audio.synth.midi.MidiFile.WriteVariableInt(s,l),s.Write(this.Data,0,this.Data.length)},__class__:alphaTab.audio.synth.midi.event.MetaDataEvent}),alphaTab.audio.synth.midi.event._MetaEventTypeEnum={},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_={},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.__name__=["alphaTab","audio","synth","midi","event","_MetaEventTypeEnum","MetaEventTypeEnum_Impl_"],alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.toString=function(this1){switch(this1){case 0:return"SequenceNumber";case 1:return"TextEvent";case 2:return"CopyrightNotice";case 3:return"SequenceOrTrackName";case 4:return"InstrumentName";case 5:return"LyricText";case 6:return"MarkerText";case 7:return"CuePoint";case 8:return"PatchName";case 9:return"PortName";case 32:return"MidiChannel";case 33:return"MidiPort";case 47:return"EndOfTrack";case 81:return"Tempo";case 84:return"SmpteOffset";case 88:return"TimeSignature";case 89:return"KeySignature";case 127:return"SequencerSpecific"}return""},alphaTab.audio.synth.midi.event.MetaNumberEvent=$hx_exports.alphaTab.audio.synth.midi.event.MetaNumberEvent=function(delta,status,metaId,number){alphaTab.audio.synth.midi.event.MetaEvent.call(this,delta,status,metaId,0),this.Value=0,this.Value=number},alphaTab.audio.synth.midi.event.MetaNumberEvent.__name__=["alphaTab","audio","synth","midi","event","MetaNumberEvent"],alphaTab.audio.synth.midi.event.MetaNumberEvent.__super__=alphaTab.audio.synth.midi.event.MetaEvent,alphaTab.audio.synth.midi.event.MetaNumberEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MetaEvent.prototype,{WriteTo:function(s){s.WriteByte(255),s.WriteByte(system.Convert.ToUInt8(this.get_MetaStatus())),alphaTab.audio.synth.midi.MidiFile.WriteVariableInt(s,3);var b=new Uint8Array([system.Convert.ToUInt8(this.Value>>16&255),system.Convert.ToUInt8(this.Value>>8&255),system.Convert.ToUInt8(255&this.Value)]);s.Write(b,0,b.length)},__class__:alphaTab.audio.synth.midi.event.MetaNumberEvent}),alphaTab.audio.synth.midi.event._MidiEventType={},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_={},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.__name__=["alphaTab","audio","synth","midi","event","_MidiEventType","MidiEventType_Impl_"],alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.toString=function(this1){switch(this1){case 128:return"NoteOff";case 144:return"NoteOn";case 160:return"NoteAftertouch";case 176:return"Controller";case 192:return"ProgramChange";case 208:return"ChannelAftertouch";case 224:return"PitchBend";case 255:return"Meta"}return""},alphaTab.audio.synth.midi.event.SystemCommonEvent=$hx_exports.alphaTab.audio.synth.midi.event.SystemCommonEvent=function(delta,status,data1,data2){alphaTab.audio.synth.midi.event.MidiEvent.call(this,delta,status,data1,data2)},alphaTab.audio.synth.midi.event.SystemCommonEvent.__name__=["alphaTab","audio","synth","midi","event","SystemCommonEvent"],alphaTab.audio.synth.midi.event.SystemCommonEvent.__super__=alphaTab.audio.synth.midi.event.MidiEvent,alphaTab.audio.synth.midi.event.SystemCommonEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MidiEvent.prototype,{get_Channel:function(){return-1},get_Command:function(){return js.Boot.__cast(255&this.Message,Int)},__class__:alphaTab.audio.synth.midi.event.SystemCommonEvent}),alphaTab.audio.synth.midi.event._SystemCommonTypeEnum={},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_={},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.__name__=["alphaTab","audio","synth","midi","event","_SystemCommonTypeEnum","SystemCommonTypeEnum_Impl_"],alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.toString=function(this1){switch(this1){case 240:return"SystemExclusive";case 241:return"MtcQuarterFrame";case 242:return"SongPosition";case 243:return"SongSelect";case 246:return"TuneRequest";case 247:return"SystemExclusive2"}return""},alphaTab.audio.synth.midi.event.SystemExclusiveEvent=$hx_exports.alphaTab.audio.synth.midi.event.SystemExclusiveEvent=function(delta,status,id,data){alphaTab.audio.synth.midi.event.SystemCommonEvent.call(this,delta,status,system.Convert.ToUInt8(255&id),system.Convert.ToUInt8(id>>8)),this.Data=null,this.Data=data},alphaTab.audio.synth.midi.event.SystemExclusiveEvent.__name__=["alphaTab","audio","synth","midi","event","SystemExclusiveEvent"],alphaTab.audio.synth.midi.event.SystemExclusiveEvent.__super__=alphaTab.audio.synth.midi.event.SystemCommonEvent,alphaTab.audio.synth.midi.event.SystemExclusiveEvent.prototype=$extend(alphaTab.audio.synth.midi.event.SystemCommonEvent.prototype,{get_ManufacturerId:function(){return this.Message>>8},WriteTo:function(s){s.WriteByte(240);var l=this.Data.length+2;s.WriteByte(system.Convert.ToUInt8(this.get_ManufacturerId()));var b=new Uint8Array([system.Convert.ToUInt8(l>>24&255),system.Convert.ToUInt8(l>>16&255),system.Convert.ToUInt8(l>>8&255),system.Convert.ToUInt8(255&l)]);s.Write(b,0,b.length),s.WriteByte(247)},__class__:alphaTab.audio.synth.midi.event.SystemExclusiveEvent}),alphaTab.audio.synth.sf2={},alphaTab.audio.synth.sf2._DirectionEnum={},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_=$hx_exports.alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_={},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.__name__=["alphaTab","audio","synth","sf2","_DirectionEnum","DirectionEnum_Impl_"],alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.toString=function(this1){switch(this1){case 0:return"MinToMax";case 1:return"MaxToMin"}return""},alphaTab.audio.synth.sf2.Generator=$hx_exports.alphaTab.audio.synth.sf2.Generator=function(input){this._rawAmount=0,this.GeneratorType=0,this.GeneratorType=js.Boot.__cast(alphaTab.io.IOHelper.ReadUInt16LE(input),Int),this._rawAmount=alphaTab.io.IOHelper.ReadUInt16LE(input)},alphaTab.audio.synth.sf2.Generator.__name__=["alphaTab","audio","synth","sf2","Generator"],alphaTab.audio.synth.sf2.Generator.prototype={get_AmountInt16:function(){return alphaTab.platform.Platform.ToInt16(this._rawAmount)},set_AmountInt16:function(value){return this._rawAmount=alphaTab.platform.Platform.ToUInt16(value),this.get_AmountInt16()},get_LowByteAmount:function(){return alphaTab.platform.Platform.ToUInt8(255&this._rawAmount)},set_LowByteAmount:function(value){return this._rawAmount=alphaTab.platform.Platform.ToUInt16((65280&this._rawAmount)+alphaTab.platform.Platform.ToUInt8(value)),this.get_LowByteAmount()},get_HighByteAmount:function(){return alphaTab.platform.Platform.ToUInt8((65280&this._rawAmount)>>8)},set_HighByteAmount:function(value){return this._rawAmount=alphaTab.platform.Platform.ToUInt16((255&this._rawAmount)+(alphaTab.platform.Platform.ToUInt8(value)<<8)),this.get_HighByteAmount()},__class__:alphaTab.audio.synth.sf2.Generator},alphaTab.audio.synth.sf2._GeneratorEnum={},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_=$hx_exports.alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_={},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.__name__=["alphaTab","audio","synth","sf2","_GeneratorEnum","GeneratorEnum_Impl_"],alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.toString=function(this1){switch(this1){case 0:return"StartAddressOffset";case 1:return"EndAddressOffset";case 2:return"StartLoopAddressOffset";case 3:return"EndLoopAddressOffset";case 4:return"StartAddressCoarseOffset";case 5:return"ModulationLFOToPitch";case 6:return"VibratoLFOToPitch";case 7:return"ModulationEnvelopeToPitch";case 8:return"InitialFilterCutoffFrequency";case 9:return"InitialFilterQ";case 10:return"ModulationLFOToFilterCutoffFrequency";case 11:return"ModulationEnvelopeToFilterCutoffFrequency";case 12:return"EndAddressCoarseOffset";case 13:return"ModulationLFOToVolume";case 14:return"Unused1";case 15:return"ChorusEffectsSend";case 16:return"ReverbEffectsSend";case 17:return"Pan";case 18:return"Unused2";case 19:return"Unused3";case 20:return"Unused4";case 21:return"DelayModulationLFO";case 22:return"FrequencyModulationLFO";case 23:return"DelayVibratoLFO";case 24:return"FrequencyVibratoLFO";case 25:return"DelayModulationEnvelope";case 26:return"AttackModulationEnvelope";case 27:return"HoldModulationEnvelope";case 28:return"DecayModulationEnvelope";case 29:return"SustainModulationEnvelope";case 30:return"ReleaseModulationEnvelope";case 31:return"KeyNumberToModulationEnvelopeHold";case 32:return"KeyNumberToModulationEnvelopeDecay";case 33:return"DelayVolumeEnvelope";case 34:return"AttackVolumeEnvelope";case 35:return"HoldVolumeEnvelope";case 36:return"DecayVolumeEnvelope";case 37:return"SustainVolumeEnvelope";case 38:return"ReleaseVolumeEnvelope";case 39:return"KeyNumberToVolumeEnvelopeHold";case 40:return"KeyNumberToVolumeEnvelopeDecay";case 41:return"Instrument";case 42:return"Reserved1";case 43:return"KeyRange";case 44:return"VelocityRange";case 45:return"StartLoopAddressCoarseOffset";case 46:return"KeyNumber";case 47:return"Velocity";case 48:return"InitialAttenuation";case 49:return"Reserved2";case 50:return"EndLoopAddressCoarseOffset";case 51:return"CoarseTune";case 52:return"FineTune";case 53:return"SampleID";case 54:return"SampleModes";case 55:return"Reserved3";case 56:return"ScaleTuning";case 57:return"ExclusiveClass";case 58:return"OverridingRootKey";case 59:return"Unused5";case 60:return"UnusedEnd"}return""},alphaTab.audio.synth.sf2.Instrument=$hx_exports.alphaTab.audio.synth.sf2.Instrument=function(){this.Name=null,this.Zones=null},alphaTab.audio.synth.sf2.Instrument.__name__=["alphaTab","audio","synth","sf2","Instrument"],alphaTab.audio.synth.sf2.Instrument.prototype={__class__:alphaTab.audio.synth.sf2.Instrument},alphaTab.audio.synth.sf2.Modulator=$hx_exports.alphaTab.audio.synth.sf2.Modulator=function(input){this._sourceModulationData=null,this._destinationGenerator=0,this._amount=0,this._sourceModulationAmount=null,this._sourceTransform=0,this._sourceModulationData=new alphaTab.audio.synth.sf2.ModulatorType(input),this._destinationGenerator=alphaTab.io.IOHelper.ReadUInt16LE(input),this._amount=alphaTab.io.IOHelper.ReadInt16LE(input),this._sourceModulationAmount=new alphaTab.audio.synth.sf2.ModulatorType(input),this._sourceTransform=alphaTab.io.IOHelper.ReadUInt16LE(input)},alphaTab.audio.synth.sf2.Modulator.__name__=["alphaTab","audio","synth","sf2","Modulator"],alphaTab.audio.synth.sf2.Modulator.prototype={__class__:alphaTab.audio.synth.sf2.Modulator},alphaTab.audio.synth.sf2.ModulatorType=$hx_exports.alphaTab.audio.synth.sf2.ModulatorType=function(input){this._controllerSource=0,this.Polarity=0,this.Direction=0,this.SourceType=0,this.IsMidiContinuousController=!1;var raw=alphaTab.io.IOHelper.ReadUInt16LE(input);this.Polarity=512==(512&raw)?1:0,this.Direction=256==(256&raw)?1:0,this.IsMidiContinuousController=128==(128&raw),this.SourceType=(64512&raw)>>10,this._controllerSource=alphaTab.platform.Platform.ToUInt16(127&raw)},alphaTab.audio.synth.sf2.ModulatorType.__name__=["alphaTab","audio","synth","sf2","ModulatorType"],alphaTab.audio.synth.sf2.ModulatorType.prototype={__class__:alphaTab.audio.synth.sf2.ModulatorType},alphaTab.audio.synth.sf2._PolarityEnum={},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_=$hx_exports.alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_={},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.__name__=["alphaTab","audio","synth","sf2","_PolarityEnum","PolarityEnum_Impl_"],alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1};alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.toString=function(this1){switch(this1){case 0:return"Unipolar";case 1:return"Bipolar"}return""},alphaTab.audio.synth.sf2.PresetHeader=$hx_exports.alphaTab.audio.synth.sf2.PresetHeader=function(){this.Name=null,this.PatchNumber=0,this.BankNumber=0,this.Library=0,this.Genre=0,this.Morphology=0,this.Zones=null},alphaTab.audio.synth.sf2.PresetHeader.__name__=["alphaTab","audio","synth","sf2","PresetHeader"],alphaTab.audio.synth.sf2.PresetHeader.prototype={__class__:alphaTab.audio.synth.sf2.PresetHeader},alphaTab.audio.synth.sf2._SFSampleLink={},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_=$hx_exports.alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_={},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.__name__=["alphaTab","audio","synth","sf2","_SFSampleLink","SFSampleLink_Impl_"],alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.toString=function(this1){switch(this1){case 1:return"MonoSample";case 2:return"RightSample";case 4:return"LeftSample";case 8:return"LinkedSample";case 16:return"OggVobis";case 32769:return"RomMonoSample";case 32770:return"RomRightSample";case 32772:return"RomLeftSample";case 32776:return"RomLinkedSample"}return""},alphaTab.audio.synth.sf2.SampleHeader=$hx_exports.alphaTab.audio.synth.sf2.SampleHeader=function(input){this.Name=null,this.Start=0,this.End=0,this.StartLoop=0,this.EndLoop=0,this.SampleRate=0,this.RootKey=0,this.Tune=0,this.SampleLink=0,this.SoundFontSampleLink=1,this.Name=alphaTab.io.IOHelper.Read8BitStringLength(input,20),this.Start=alphaTab.io.IOHelper.ReadInt32LE(input),this.End=alphaTab.io.IOHelper.ReadInt32LE(input),this.StartLoop=alphaTab.io.IOHelper.ReadInt32LE(input),this.EndLoop=alphaTab.io.IOHelper.ReadInt32LE(input),this.SampleRate=alphaTab.io.IOHelper.ReadInt32LE(input),this.RootKey=system.Convert.ToUInt8(input.ReadByte()),this.Tune=alphaTab.platform.Platform.ToInt16(input.ReadByte()),this.SampleLink=alphaTab.io.IOHelper.ReadUInt16LE(input),this.SoundFontSampleLink=js.Boot.__cast(alphaTab.io.IOHelper.ReadUInt16LE(input),Int)},alphaTab.audio.synth.sf2.SampleHeader.__name__=["alphaTab","audio","synth","sf2","SampleHeader"],alphaTab.audio.synth.sf2.SampleHeader.prototype={__class__:alphaTab.audio.synth.sf2.SampleHeader},alphaTab.audio.synth.sf2.Sf2Region=$hx_exports.alphaTab.audio.synth.sf2.Sf2Region=function(){this.Generators=null;var this1=new Int16Array(61);this.Generators=this1},alphaTab.audio.synth.sf2.Sf2Region.__name__=["alphaTab","audio","synth","sf2","Sf2Region"],alphaTab.audio.synth.sf2.Sf2Region.prototype={ApplyDefaultValues:function(){this.Generators[0]=0,this.Generators[1]=0,this.Generators[2]=0,this.Generators[3]=0,this.Generators[4]=0,this.Generators[5]=0,this.Generators[6]=0,this.Generators[7]=0,this.Generators[8]=13500,this.Generators[9]=0,this.Generators[10]=0,this.Generators[11]=0,this.Generators[12]=0,this.Generators[13]=0,this.Generators[15]=0,this.Generators[16]=0,this.Generators[17]=0,this.Generators[21]=-12e3,this.Generators[22]=0,this.Generators[23]=-12e3,this.Generators[24]=0,this.Generators[25]=-12e3,this.Generators[26]=-12e3,this.Generators[27]=-12e3,this.Generators[28]=-12e3,this.Generators[29]=0,this.Generators[30]=-12e3,this.Generators[31]=0,this.Generators[32]=0,this.Generators[33]=-12e3,this.Generators[34]=-12e3,this.Generators[35]=-12e3,this.Generators[36]=-12e3,this.Generators[37]=0,this.Generators[38]=-12e3,this.Generators[39]=0,this.Generators[40]=0,this.Generators[43]=32512,this.Generators[44]=32512,this.Generators[45]=0,this.Generators[46]=-1,this.Generators[47]=-1,this.Generators[48]=0,this.Generators[50]=0,this.Generators[51]=0,this.Generators[52]=0,this.Generators[54]=0,this.Generators[56]=100,this.Generators[57]=0,this.Generators[58]=-1},__class__:alphaTab.audio.synth.sf2.Sf2Region},alphaTab.audio.synth.sf2.SoundFont=$hx_exports.alphaTab.audio.synth.sf2.SoundFont=function(){this.Info=null,this.SampleData=null,this.Presets=null},alphaTab.audio.synth.sf2.SoundFont.__name__=["alphaTab","audio","synth","sf2","SoundFont"],alphaTab.audio.synth.sf2.SoundFont.prototype={Load:function(input){var id=alphaTab.io.IOHelper.Read8BitChars(input,4);alphaTab.io.IOHelper.ReadInt32LE(input);if("riff"!=id.toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. Could not find RIFF header."));if("sfbk"!=(id=alphaTab.io.IOHelper.Read8BitChars(input,4)).toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. Riff type is invalid."));alphaTab.util.Logger.Debug("SF2","Reading info chunk",null),this.Info=new alphaTab.audio.synth.sf2.SoundFontInfo(input),alphaTab.util.Logger.Debug("SF2","Reading sampledata chunk",null),this.SampleData=new alphaTab.audio.synth.sf2.SoundFontSampleData(input),alphaTab.util.Logger.Debug("SF2","Reading preset chunk",null),this.Presets=new alphaTab.audio.synth.sf2.SoundFontPresets(input)},__class__:alphaTab.audio.synth.sf2.SoundFont},alphaTab.audio.synth.sf2.SoundFontInfo=$hx_exports.alphaTab.audio.synth.sf2.SoundFontInfo=function(input){this.RomVersionMajor=0,this.RomVersionMinor=0,this.SfVersionMajor=0,this.SfVersionMinor=0,this.SoundEngine=null,this.BankName=null,this.DataRom=null,this.CreationDate=null,this.Author=null,this.TargetProduct=null,this.Copyright=null,this.Comments=null,this.Tools=null,this.Tools="",this.Comments="",this.Copyright="",this.TargetProduct="",this.Author="",this.DataRom="",this.CreationDate="",this.BankName="",this.SoundEngine="";var id=alphaTab.io.IOHelper.Read8BitChars(input,4),size=alphaTab.io.IOHelper.ReadInt32LE(input);if("list"!=id.toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. Could not find INFO LIST chunk."));var readTo=input.get_Position()+size;if("info"!=(id=alphaTab.io.IOHelper.Read8BitChars(input,4)).toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. The LIST chunk is not of type INFO."));for(;input.get_Position()0&&(this._builder+=Std.string("\\capo "),this._builder+=Std.string(staff.Capo),this._builder=this._builder+"\r\n"),this._builder+=Std.string("\\tuning");for(var i=0;i0&&(this._builder+=Std.string(" |"),this._builder=this._builder+"\r\n"),this.Bar(track.Staves[i].Bars[j]),++j;++i}},Bar:function(bar){this.BarMeta(bar),this.Voice(bar.Voices[0])},Voice:function(voice){for(var i=0;i1&&(this._builder+=Std.string("("));for(var i=0;i1&&(this._builder+=Std.string(")"))}this._builder+=Std.string("."),this._builder+=Std.string(beat.Duration),this._builder+=Std.string(" "),this.BeatEffects(beat)},Note:function(note){note.IsDead?this._builder+=Std.string("x"):note.IsTieDestination?this._builder+=Std.string("-"):this._builder+=Std.string(note.Fret),this._builder+=Std.string("."),this._builder+=Std.string(note.Beat.Voice.Bar.Staff.Tuning.length-note.String+1),this._builder+=Std.string(" "),this.NoteEffects(note)},NoteEffects:function(note){var hasEffectOpen=!1;if(note.get_HasBend()){hasEffectOpen=this.EffectOpen(hasEffectOpen),this._builder+=Std.string("be (");for(var i=0;i0){var previousMasterBar=masterBar.PreviousMasterBar,previousBar=bar.PreviousBar;if(previousMasterBar.TimeSignatureDenominator==masterBar.TimeSignatureDenominator&&previousMasterBar.TimeSignatureNumerator==masterBar.TimeSignatureNumerator||(this._builder+=Std.string("\\ts "),this._builder+=Std.string(masterBar.TimeSignatureNumerator),this._builder+=Std.string(" "),this._builder+=Std.string(masterBar.TimeSignatureDenominator),this._builder=this._builder+"\r\n"),previousMasterBar.KeySignature!=masterBar.KeySignature){this._builder+=Std.string("\\ks ");switch(masterBar.KeySignature){case-7:this._builder+=Std.string("cb");break;case-6:this._builder+=Std.string("gb");break;case-5:this._builder+=Std.string("db");break;case-4:this._builder+=Std.string("ab");break;case-3:this._builder+=Std.string("eb");break;case-2:this._builder+=Std.string("bb");break;case-1:this._builder+=Std.string("f");break;case 0:this._builder+=Std.string("c");break;case 1:this._builder+=Std.string("g");break;case 2:this._builder+=Std.string("d");break;case 3:this._builder+=Std.string("a");break;case 4:this._builder+=Std.string("e");break;case 5:this._builder+=Std.string("b");break;case 6:this._builder+=Std.string("f#");break;case 7:this._builder+=Std.string("c#")}this._builder=this._builder+"\r\n"}if(bar.Clef!=previousBar.Clef){this._builder+=Std.string("\\clef ");switch(bar.Clef){case 0:this._builder+=Std.string("n");break;case 1:this._builder+=Std.string("c3");break;case 2:this._builder+=Std.string("c4");break;case 3:this._builder+=Std.string("f4");break;case 4:this._builder+=Std.string("g2")}this._builder=this._builder+"\r\n"}null!=masterBar.TempoAutomation&&(this._builder+=Std.string("\\tempo "),this._builder+=Std.string(masterBar.TempoAutomation.Value),this._builder=this._builder+"\r\n")}masterBar.IsRepeatStart&&(this._builder+=Std.string("\\ro "),this._builder=this._builder+"\r\n"),masterBar.get_IsRepeatEnd()&&(this._builder+=Std.string("\\rc "),this._builder+=Std.string(masterBar.RepeatCount+1),this._builder=this._builder+"\r\n")},__class__:alphaTab.exporter.AlphaTexExporter},alphaTab.importer={},alphaTab.importer.AlphaTexException=$hx_exports.alphaTab.importer.AlphaTexException=function(){alphaTab.AlphaTabException.call(this),this.Position=0,this.NonTerm=null,this.Expected=0,this.Symbol=0,this.SymbolData=null},alphaTab.importer.AlphaTexException.__name__=["alphaTab","importer","AlphaTexException"],alphaTab.importer.AlphaTexException.BuildMessage=function(position,nonTerm,expected,symbol,symbolData){return null==symbolData?"MalFormed AlphaTex: @"+position+": Error on block "+nonTerm+", expected a "+alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.toString(expected)+" found a "+alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.toString(symbol):"MalFormed AlphaTex: @"+position+": Error on block "+nonTerm+", invalid value: "+symbolData},alphaTab.importer.AlphaTexException.__super__=alphaTab.AlphaTabException,alphaTab.importer.AlphaTexException.prototype=$extend(alphaTab.AlphaTabException.prototype,{AlphaTexException:function(position,nonTerm,expected,symbol,symbolData){return this.AlphaTabException(alphaTab.importer.AlphaTexException.BuildMessage(position,nonTerm,expected,symbol,symbolData)),this.Position=0,this.NonTerm=null,this.Expected=0,this.Symbol=0,this.SymbolData=null,this.Position=position,this.NonTerm=nonTerm,this.Expected=expected,this.Symbol=symbol,this.SymbolData=symbolData,this},__class__:alphaTab.importer.AlphaTexException}),alphaTab.importer.ScoreImporter=$hx_exports.alphaTab.importer.ScoreImporter=function(){this.Data=null,this.Settings=null},alphaTab.importer.ScoreImporter.__name__=["alphaTab","importer","ScoreImporter"],alphaTab.importer.ScoreImporter.BuildImporters=function(){return[new alphaTab.importer.Gp3To5Importer,new alphaTab.importer.GpxImporter,new alphaTab.importer.Gp7Importer,new alphaTab.importer.AlphaTexImporter,new alphaTab.importer.MusicXmlImporter]},alphaTab.importer.ScoreImporter.prototype={Init:function(data,settings){this.Data=data,this.Settings=settings},GetSetting:function(key,defaultValue){return key=key.toLowerCase(),null!=this.Settings&&null!=this.Settings.ImporterSettings&&this.Settings.ImporterSettings.hasOwnProperty(key)?this.Settings.ImporterSettings[key]:defaultValue},get_Name:function(){throw new js._Boot.HaxeError("abstract")},ReadScore:function(){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.importer.ScoreImporter},alphaTab.importer.AlphaTexImporter=$hx_exports.alphaTab.importer.AlphaTexImporter=function(){alphaTab.importer.ScoreImporter.call(this)},alphaTab.importer.AlphaTexImporter.__name__=["alphaTab","importer","AlphaTexImporter"],alphaTab.importer.AlphaTexImporter.IsLetter=function(code){return!alphaTab.importer.AlphaTexImporter.IsTerminal(code)&&(code>=33&&code<=47||code>=58&&code<=126||code>128)},alphaTab.importer.AlphaTexImporter.IsTerminal=function(ch){return 46==ch||123==ch||125==ch||91==ch||93==ch||40==ch||41==ch||124==ch||39==ch||34==ch||92==ch},alphaTab.importer.AlphaTexImporter.__super__=alphaTab.importer.ScoreImporter,alphaTab.importer.AlphaTexImporter.prototype=$extend(alphaTab.importer.ScoreImporter.prototype,{get_Name:function(){return"AlphaTex"},ReadScore:function(){try{this.CreateDefaultScore(),this._curChPos=0,this._currentDuration=4;if(this._lyrics=[],this.NextChar(),this.NewSy(),14==this._sy)throw new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException("Unknown start sign <"));return this.Score(),this._score.Finish(this.Settings),this._track.ApplyLyrics(this._lyrics),this._score}catch(e){throw e instanceof js._Boot.HaxeError&&(e=e.val),js.Boot.__instanceof(e,alphaTab.importer.AlphaTexException)?new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException(e.Message)):e}},Error:function(nonterm,expected,symbolError){null==symbolError&&(symbolError=!0);var e;throw e=symbolError?(new alphaTab.importer.AlphaTexException).AlphaTexException(this._curChPos,nonterm,expected,this._sy,null):(new alphaTab.importer.AlphaTexException).AlphaTexException(this._curChPos,nonterm,expected,expected,this._syData),alphaTab.util.Logger.Error(this.get_Name(),e.Message,null),new js._Boot.HaxeError(e)},CreateDefaultScore:function(){this._score=new alphaTab.model.Score,this._score.Tempo=120,this._score.TempoLabel="",this._track=new alphaTab.model.Track(1),this._track.PlaybackInfo.Program=25,this._track.PlaybackInfo.PrimaryChannel=alphaTab.importer.AlphaTexImporter.TrackChannels[0],this._track.PlaybackInfo.SecondaryChannel=alphaTab.importer.AlphaTexImporter.TrackChannels[1],this._staff=this._track.Staves[0],this._staff.Tuning=alphaTab.model.Tuning.GetDefaultTuningFor(6).Tunings,this._score.AddTrack(this._track)},ParseClefFromString:function(str){switch(str.toLowerCase()){case"c3":case"tenor":return 1;case"alto":case"c4":return 2;case"bass":case"f4":return 3;case"n":case"neutral":return 0;case"g2":case"treble":default:return 4}},ParseClefFromInt:function(i){switch(i){case 43:return 4;case 48:return 1;case 60:return 2;case 65:return 3;default:return 4}},ParseKeySignature:function(str){switch(str.toLowerCase()){case"a":return 3;case"ab":return-4;case"b":return 5;case"bb":return-2;case"c":return 0;case"c#":return 7;case"cb":return-7;case"d":return 2;case"db":return-5;case"e":return 4;case"eb":return-3;case"f":return-1;case"f#":return 6;case"g":return 1;case"gb":return-6;default:return 0}},NextChar:function(){var b=this.Data.ReadByte();-1==b?this._ch=0:(this._ch=b,this._curChPos++)},NewSy:function(){for(this._sy=0;;){if(0==this._ch)this._sy=1;else if(alphaTab.platform.Platform.IsWhiteSpace(this._ch))this.NextChar();else if(47==this._ch)if(this.NextChar(),47==this._ch)for(;13!=this._ch&&10!=this._ch&&0!=this._ch;)this.NextChar();else if(42==this._ch)for(;0!=this._ch;)if(42==this._ch){if(this.NextChar(),47==this._ch){this.NextChar();break}}else this.NextChar();else this.Error("symbol",5,!1);else if(34==this._ch||39==this._ch){var startChar=this._ch;this.NextChar();var s="";for(this._sy=5;this._ch!=startChar&&0!=this._ch;)s+=String.fromCharCode(this._ch),this.NextChar();this._syData=s,this.NextChar()}else if(45==this._ch)if(this._allowNegatives&&this.IsDigit(this._ch)){var number=this.ReadNumber();this._sy=2,this._syData=number}else this._sy=5,this._syData=this.ReadName();else if(46==this._ch)this._sy=4,this.NextChar();else if(58==this._ch)this._sy=3,this.NextChar();else if(40==this._ch)this._sy=7,this.NextChar();else if(92==this._ch){this.NextChar();var name=this.ReadName();this._sy=12,this._syData=name}else if(41==this._ch)this._sy=8,this.NextChar();else if(123==this._ch)this._sy=9,this.NextChar();else if(125==this._ch)this._sy=10,this.NextChar();else if(124==this._ch)this._sy=11,this.NextChar();else if(42==this._ch)this._sy=13,this.NextChar();else if(60==this._ch)this._sy=14,this.NextChar();else if(this.IsDigit(this._ch)){var number1=this.ReadNumber();this._sy=2,this._syData=number1}else if(alphaTab.importer.AlphaTexImporter.IsLetter(this._ch)){var name1=this.ReadName(),tuning=alphaTab.model.TuningParser.Parse(name1);null!=tuning?(this._sy=6,this._syData=tuning):(this._sy=5,this._syData=name1)}else this.Error("symbol",5,!1);if(0!=this._sy)break}},IsDigit:function(code){return code>=48&&code<=57||45==code&&this._allowNegatives},ReadName:function(){for(var str="";str+=String.fromCharCode(this._ch),this.NextChar(),alphaTab.importer.AlphaTexImporter.IsLetter(this._ch)||this.IsDigit(this._ch)||35==this._ch;);return str},ReadNumber:function(){for(var str="";str+=String.fromCharCode(this._ch),this.NextChar(),this.IsDigit(this._ch););return alphaTab.platform.Platform.ParseInt(str)},Score:function(){this.MetaData(),this.Bars()},MetaData:function(){for(var anyMeta=!1;12==this._sy;){var syData=Std.string(this._syData).toLowerCase();if("title"==syData)this.NewSy(),5==this._sy?this._score.Title=Std.string(this._syData):this.Error("title",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("subtitle"==syData)this.NewSy(),5==this._sy?this._score.SubTitle=Std.string(this._syData):this.Error("subtitle",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("artist"==syData)this.NewSy(),5==this._sy?this._score.Artist=Std.string(this._syData):this.Error("artist",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("album"==syData)this.NewSy(),5==this._sy?this._score.Album=Std.string(this._syData):this.Error("album",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("words"==syData)this.NewSy(),5==this._sy?this._score.Words=Std.string(this._syData):this.Error("words",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("music"==syData)this.NewSy(),5==this._sy?this._score.Music=Std.string(this._syData):this.Error("music",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("copyright"==syData)this.NewSy(),5==this._sy?this._score.Copyright=Std.string(this._syData):this.Error("copyright",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("tempo"==syData)this.NewSy(),2==this._sy?this._score.Tempo=this._syData:this.Error("tempo",2,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("capo"==syData)this.NewSy(),2==this._sy?this._staff.Capo=this._syData:this.Error("capo",2,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("tuning"==syData){this.NewSy();switch(this._sy){case 5:var text=Std.string(this._syData).toLowerCase();if("piano"==text||"none"==text||"voice"==text){var this1=new Int32Array(0);this._staff.Tuning=this1}else this.Error("tuning",6,!0);this.NewSy();break;case 6:for(var tuning=[];;){var t=this._syData;if(tuning.push(t.get_RealValue()),this.NewSy(),6!=this._sy)break}this._staff.Tuning=new Int32Array(tuning);break;default:this.Error("tuning",6,!0)}anyMeta=!0,this._anyDataLoaded=anyMeta}else if("instrument"==syData){if(this.NewSy(),2==this._sy){var instrument=this._syData;instrument>=0&&instrument<=128?this._track.PlaybackInfo.Program=this._syData:this.Error("instrument",2,!1)}else if(5==this._sy){var instrumentName=Std.string(this._syData).toLowerCase();this._track.PlaybackInfo.Program=alphaTab.audio.GeneralMidi.GetValue(instrumentName)}else this.Error("instrument",2,!0);this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta}else if("lyrics"==syData){this.NewSy();var lyrics=new alphaTab.model.Lyrics;lyrics.StartBar=0,lyrics.Text="",2==this._sy&&(lyrics.StartBar=this._syData,this.NewSy()),5==this._sy?(lyrics.Text=this._syData,this.NewSy()):this.Error("lyrics",5,!0),this._lyrics.push(lyrics),anyMeta=!0,this._anyDataLoaded=anyMeta}else{if(!anyMeta)break;this.Error("metaDataTags",5,!1)}}anyMeta?(4!=this._sy&&this.Error("song",4,!0),this.NewSy()):4==this._sy&&this.NewSy()},Bars:function(){for(this.Bar();1!=this._sy;)11!=this._sy&&this.Error("bar",11,!0),this.NewSy(),this.Bar()},Bar:function(){var master=new alphaTab.model.MasterBar;this._score.AddMasterBar(master);var bar=new alphaTab.model.Bar;this._staff.AddBar(bar),master.Index>0&&(master.KeySignature=master.PreviousMasterBar.KeySignature,master.TimeSignatureDenominator=master.PreviousMasterBar.TimeSignatureDenominator,master.TimeSignatureNumerator=master.PreviousMasterBar.TimeSignatureNumerator,bar.Clef=bar.PreviousBar.Clef),this.BarMeta(bar);var voice=new alphaTab.model.Voice;for(bar.AddVoice(voice);11!=this._sy&&1!=this._sy;)this.Beat(voice);if(0==voice.Beats.length){var emptyBeat=new alphaTab.model.Beat;emptyBeat.IsEmpty=!0,voice.AddBeat(emptyBeat)}},Beat:function(voice){if(3==this._sy)return this._allowNegatives=!0,this.NewSy(),this._allowNegatives=!1,2!=this._sy&&this.Error("duration",2,!0),this._currentDuration=this.ParseDuration(this._syData),void this.NewSy();var beat=new alphaTab.model.Beat;if(voice.AddBeat(beat),null!=voice.Bar.get_MasterBar().TempoAutomation&&1==voice.Beats.length&&beat.Automations.push(voice.Bar.get_MasterBar().TempoAutomation),7==this._sy){for(this.NewSy(),this.Note(beat);8!=this._sy&&1!=this._sy;)this.Note(beat);8!=this._sy&&this.Error("note-list",8,!0),this.NewSy()}else 5==this._sy&&"r"==Std.string(this._syData).toLowerCase()?this.NewSy():this.Note(beat);4==this._sy&&(this._allowNegatives=!0,this.NewSy(),this._allowNegatives=!1,2!=this._sy&&this.Error("duration",2,!0),this._currentDuration=this.ParseDuration(this._syData),this.NewSy()),beat.Duration=this._currentDuration;var beatRepeat=1;13==this._sy&&(this.NewSy(),2!=this._sy?this.Error("multiplier",2,!0):beatRepeat=this._syData,this.NewSy()),this.BeatEffects(beat);for(var i=0;i60;)beat.RemoveWhammyBarPoint(beat.WhammyBarPoints.length-1);if(exact){beat.WhammyBarPoints.sort(function(a1,b1){return b=b1,a1.Offset-b.Offset;var b})}else for(var count=beat.WhammyBarPoints.length,step=60/count|0,i=0;i0,string=-1;isFretted&&(4!=this._sy&&this.Error("note",4,!0),this.NewSy(),2!=this._sy&&this.Error("note-string",2,!0),((string=this._syData)<1||string>this._staff.Tuning.length)&&this.Error("note-string",2,!1),this.NewSy());var note=new alphaTab.model.Note;beat.AddNote(note),isFretted?(note.String=this._staff.Tuning.length-(string-1),note.IsDead=isDead,note.IsTieDestination=isTie,isTie||(note.Fret=fret)):(note.Octave=octave,note.Tone=tone,note.IsTieDestination=isTie),this.NoteEffects(note)},NoteEffects:function(note){if(9==this._sy){for(this.NewSy();5==this._sy;){var syData=Std.string(this._syData).toLowerCase();if(this._syData=syData,"b"==syData||"be"==syData){var exact="be"==this._syData;for(this.NewSy(),7!=this._sy&&this.Error("bend-effect",7,!0),this.NewSy();8!=this._sy&&1!=this._sy;){var offset=0,value=0;exact?(2!=this._sy&&this.Error("bend-effect-value",2,!0),offset=this._syData,this.NewSy(),2!=this._sy&&this.Error("bend-effect-value",2,!0),value=this._syData):(2!=this._sy&&this.Error("bend-effect-value",2,!0),value=this._syData),note.AddBendPoint(new alphaTab.model.BendPoint(offset,value)),this.NewSy()}for(;note.BendPoints.length>60;){var index=note.BendPoints.length-1;-1!=index&¬e.BendPoints.splice(index,1)}if(exact)note.BendPoints.sort(function(comparison){return function(a,b){return comparison[0](a,b)}}([function(a1,b1){return a1.Offset-b1.Offset}]));else for(var count=note.BendPoints.length,step=60/(count-1)|0,i=0;i=400&&this.ReadLyrics(),this._versionNumber>=510&&this.Data.Skip(19),this._versionNumber>=500&&(this.ReadPageSetup(),this._score.TempoLabel=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data)),this._score.Tempo=alphaTab.io.IOHelper.ReadInt32LE(this.Data),this._versionNumber>=510&&alphaTab.importer.GpBinaryHelpers.GpReadBool(this.Data),alphaTab.io.IOHelper.ReadInt32LE(this.Data),this._versionNumber>=400&&this.Data.ReadByte(),this.ReadPlaybackInfos(),this._versionNumber>=500&&(this.Data.Skip(38),this.Data.Skip(4)),this._barCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data),this._trackCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data),this.ReadMasterBars(),this.ReadTracks(),this.ReadBars(),this._score.Finish(this.Settings),null!=this._lyrics&&this._lyricsTrack>=0&&this._score.Tracks[this._lyricsTrack].ApplyLyrics(this._lyrics),this._score},ReadVersion:function(){var version=alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength(this.Data,30);if(!StringTools.startsWith(version,"FICHIER GUITAR PRO "))throw new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException("Unsupported format"));version=HxOverrides.substr(version,"FICHIER GUITAR PRO ".length+1,null);var this1=system.Convert.ToUInt16(46),dot=version.indexOf(String.fromCharCode(this1));this._versionNumber=100*alphaTab.platform.Platform.ParseInt(HxOverrides.substr(version,0,dot))+alphaTab.platform.Platform.ParseInt(HxOverrides.substr(version,dot+1,null)),alphaTab.util.Logger.Info(this.get_Name(),"Guitar Pro version "+version+" detected",null)},ReadScoreInformation:function(){this._score.Title=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.SubTitle=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Artist=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Album=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Words=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data);var tmp=this._versionNumber>=500?alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data):this._score.Words;this._score.Music=tmp,this._score.Copyright=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Tab=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Instructions=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data);for(var noticeLines=alphaTab.io.IOHelper.ReadInt32LE(this.Data),notice="",i=0;i0&&(notice+="\r\n"),notice+=Std.string(alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data)),++i;this._score.Notices=notice},ReadLyrics:function(){this._lyrics=[],this._lyricsTrack=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1;for(var i=0;i<5;){var lyrics=new alphaTab.model.Lyrics;lyrics.StartBar=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1,lyrics.Text=alphaTab.importer.GpBinaryHelpers.GpReadStringInt(this.Data),this._lyrics.push(lyrics),++i}},ReadPageSetup:function(){this.Data.Skip(30);for(var i=0;i<10;)alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),++i},ReadPlaybackInfos:function(){this._playbackInfos=[];for(var i=0;i<64;){var info=new alphaTab.model.PlaybackInformation;info.PrimaryChannel=i,info.SecondaryChannel=i,info.Program=alphaTab.io.IOHelper.ReadInt32LE(this.Data),info.Volume=this.Data.ReadByte(),info.Balance=this.Data.ReadByte(),this.Data.Skip(6),this._playbackInfos.push(info),++i}},ReadMasterBars:function(){for(var i=0;i0&&(previousMasterBar=this._score.MasterBars[this._score.MasterBars.length-1]);var newMasterBar=new alphaTab.model.MasterBar,flags=this.Data.ReadByte();if(0!=(1&flags)?newMasterBar.TimeSignatureNumerator=this.Data.ReadByte():null!=previousMasterBar&&(newMasterBar.TimeSignatureNumerator=previousMasterBar.TimeSignatureNumerator),0!=(2&flags)?newMasterBar.TimeSignatureDenominator=this.Data.ReadByte():null!=previousMasterBar&&(newMasterBar.TimeSignatureDenominator=previousMasterBar.TimeSignatureDenominator),newMasterBar.IsRepeatStart=0!=(4&flags),0!=(8&flags)&&(newMasterBar.RepeatCount=this.Data.ReadByte()+(this._versionNumber>=500?0:1)),0!=(16&flags))if(this._versionNumber<500){for(var currentMasterBar=previousMasterBar,existentAlternatives=0;!(null==currentMasterBar||currentMasterBar.get_IsRepeatEnd()&¤tMasterBar!=previousMasterBar||currentMasterBar.IsRepeatStart);)existentAlternatives|=currentMasterBar.AlternateEndings,currentMasterBar=currentMasterBar.PreviousMasterBar;for(var repeatAlternative=0,repeatMask=this.Data.ReadByte(),i=0;i<8;){var repeating=1<i&&0==(existentAlternatives&repeating)&&(repeatAlternative|=repeating),++i}newMasterBar.AlternateEndings=system.Convert.ToUInt8(repeatAlternative)}else newMasterBar.AlternateEndings=system.Convert.ToUInt8(this.Data.ReadByte());if(0!=(32&flags)){var section=new alphaTab.model.Section;section.Text=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),section.Marker="",alphaTab.importer.GpBinaryHelpers.GpReadColor(this.Data,!1),newMasterBar.Section=section}if(0!=(64&flags)?(newMasterBar.KeySignature=js.Boot.__cast(alphaTab.platform.Platform.ReadSignedByte(this.Data),Int),newMasterBar.KeySignatureType=js.Boot.__cast(this.Data.ReadByte(),Int)):null!=previousMasterBar&&(newMasterBar.KeySignature=previousMasterBar.KeySignature,newMasterBar.KeySignatureType=previousMasterBar.KeySignatureType),this._versionNumber>=500&&0!=(3&flags)&&this.Data.Skip(4),this._versionNumber>=500&&0==(16&flags)&&(newMasterBar.AlternateEndings=system.Convert.ToUInt8(this.Data.ReadByte())),this._versionNumber>=500){switch(this.Data.ReadByte()){case 1:newMasterBar.TripletFeel=2;break;case 2:newMasterBar.TripletFeel=1}this.Data.ReadByte()}else newMasterBar.TripletFeel=this._globalTripletFeel;newMasterBar.IsDoubleBar=0!=(128&flags),this._score.AddMasterBar(newMasterBar)},ReadTracks:function(){for(var i=0;ii&&tuning.push(stringTuning),++i}mainStaff.Tuning=new Int32Array(tuning);var port=alphaTab.io.IOHelper.ReadInt32LE(this.Data),index=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1,effectChannel=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1;if(this.Data.Skip(4),index>=0&&index=500&&(this.Data.ReadByte(),this.Data.ReadByte(),this.Data.Skip(43)),this._versionNumber>=510&&(this.Data.Skip(4),alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data))},ReadBars:function(){for(var i=0;i=500&&(this.Data.ReadByte(),voiceCount=2);for(var v=0;v=0;)0!=(stringFlags&1<=500){this.Data.ReadByte();0!=(8&this.Data.ReadByte())&&this.Data.ReadByte()}},ReadChord:function(beat){var chord=new alphaTab.model.Chord,chordId=alphaTab.platform.Platform.NewGuid();if(this._versionNumber>=500){this.Data.Skip(17),chord.Name=alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength(this.Data,21),this.Data.Skip(4),chord.FirstFret=alphaTab.io.IOHelper.ReadInt32LE(this.Data);for(var i=0;i<7;){var fret=alphaTab.io.IOHelper.ReadInt32LE(this.Data);i=400){this.Data.Skip(16),chord.Name=alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength(this.Data,21),this.Data.Skip(4),chord.FirstFret=alphaTab.io.IOHelper.ReadInt32LE(this.Data);for(var i2=0;i2<7;){var fret1=alphaTab.io.IOHelper.ReadInt32LE(this.Data);i2=406?7:6;if(chord.Name=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),chord.FirstFret=alphaTab.io.IOHelper.ReadInt32LE(this.Data),chord.FirstFret>0)for(var i5=0;i5=400&&(flags2=this.Data.ReadByte()),beat.FadeIn=0!=(16&flags),(this._versionNumber<400&&0!=(1&flags)||0!=(2&flags))&&(beat.Vibrato=1),beat.HasRasgueado=0!=(1&flags2),0!=(32&flags)&&this._versionNumber>=400){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 1:beat.Tap=!0;break;case 2:beat.Slap=!0;break;case 3:beat.Pop=!0}}else if(0!=(32&flags)){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 1:beat.Tap=!0;break;case 2:beat.Slap=!0;break;case 3:beat.Pop=!0}this.Data.Skip(4)}if(0!=(4&flags2)&&this.ReadTremoloBarEffect(beat),0!=(64&flags)){var strokeUp,strokeDown;this._versionNumber<500?(strokeDown=this.Data.ReadByte(),strokeUp=this.Data.ReadByte()):(strokeUp=this.Data.ReadByte(),strokeDown=this.Data.ReadByte()),strokeUp>0?(beat.BrushType=1,beat.BrushDuration=alphaTab.importer.Gp3To5Importer.ToStrokeValue(strokeUp)):strokeDown>0&&(beat.BrushType=2,beat.BrushDuration=alphaTab.importer.Gp3To5Importer.ToStrokeValue(strokeDown))}if(0!=(2&flags2)){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 0:beat.PickStroke=0;break;case 1:beat.PickStroke=1;break;case 2:beat.PickStroke=2}}},ReadTremoloBarEffect:function(beat){this.Data.ReadByte(),alphaTab.io.IOHelper.ReadInt32LE(this.Data);var pointCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data);if(pointCount>0)for(var i=0;i=500&&this.Data.Skip(16),tableChange.Volume=alphaTab.platform.Platform.ReadSignedByte(this.Data),tableChange.Balance=alphaTab.platform.Platform.ReadSignedByte(this.Data);var chorus=alphaTab.platform.Platform.ReadSignedByte(this.Data),reverb=alphaTab.platform.Platform.ReadSignedByte(this.Data),phaser=alphaTab.platform.Platform.ReadSignedByte(this.Data),tremolo=alphaTab.platform.Platform.ReadSignedByte(this.Data);if(this._versionNumber>=500&&(tableChange.TempoName=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data)),tableChange.Tempo=alphaTab.io.IOHelper.ReadInt32LE(this.Data),tableChange.Volume>=0&&this.Data.ReadByte(),tableChange.Balance>=0&&this.Data.ReadByte(),chorus>=0&&this.Data.ReadByte(),reverb>=0&&this.Data.ReadByte(),phaser>=0&&this.Data.ReadByte(),tremolo>=0&&this.Data.ReadByte(),tableChange.Tempo>=0&&(tableChange.Duration=alphaTab.platform.Platform.ReadSignedByte(this.Data),this._versionNumber>=510&&this.Data.ReadByte()),this._versionNumber>=400&&this.Data.ReadByte(),this._versionNumber>=500&&this.Data.ReadByte(),this._versionNumber>=510&&(alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data)),tableChange.Volume>=0){var volumeAutomation=new alphaTab.model.Automation;volumeAutomation.IsLinear=!0,volumeAutomation.Type=1;var this1=tableChange.Volume;volumeAutomation.Value=this1,beat.Automations.push(volumeAutomation)}if(tableChange.Balance>=0){var balanceAutomation=new alphaTab.model.Automation;balanceAutomation.IsLinear=!0,balanceAutomation.Type=3;var this2=tableChange.Balance;balanceAutomation.Value=this2,beat.Automations.push(balanceAutomation)}if(tableChange.Instrument>=0){var instrumentAutomation=new alphaTab.model.Automation;instrumentAutomation.IsLinear=!0,instrumentAutomation.Type=2;var this3=tableChange.Instrument;instrumentAutomation.Value=this3,beat.Automations.push(instrumentAutomation)}if(tableChange.Tempo>=0){var tempoAutomation=new alphaTab.model.Automation;tempoAutomation.IsLinear=!0,tempoAutomation.Type=0;var this4=tableChange.Tempo;tempoAutomation.Value=this4,beat.Automations.push(tempoAutomation),beat.Voice.Bar.get_MasterBar().TempoAutomation=tempoAutomation}},ReadNote:function(track,bar,voice,beat,stringIndex){var newNote=new alphaTab.model.Note;newNote.String=bar.Staff.Tuning.length-stringIndex;var flags=this.Data.ReadByte();if(0!=(2&flags)?newNote.Accentuated=2:0!=(64&flags)&&(newNote.Accentuated=1),newNote.IsGhost=0!=(4&flags),0!=(32&flags)){var noteType=this.Data.ReadByte();3==noteType?newNote.IsDead=!0:2==noteType&&(newNote.IsTieDestination=!0)}if(0!=(1&flags)&&this._versionNumber<500&&(this.Data.ReadByte(),this.Data.ReadByte()),0!=(16&flags)){var dynamicNumber=alphaTab.platform.Platform.ReadSignedByte(this.Data);newNote.Dynamic=this.ToDynamicValue(dynamicNumber),beat.Dynamic=newNote.Dynamic}if(0!=(32&flags)&&(newNote.Fret=alphaTab.platform.Platform.ReadSignedByte(this.Data)),0!=(128&flags)&&(newNote.LeftHandFinger=js.Boot.__cast(alphaTab.platform.Platform.ReadSignedByte(this.Data),Int),newNote.RightHandFinger=js.Boot.__cast(alphaTab.platform.Platform.ReadSignedByte(this.Data),Int),newNote.IsFingering=!0),this._versionNumber>=500){0!=(1&flags)&&(newNote.DurationPercent=alphaTab.importer.GpBinaryHelpers.GpReadDouble(this.Data));var flags2=this.Data.ReadByte();newNote.AccidentalMode=0!=(2&flags2)?1:0}beat.AddNote(newNote),0!=(8&flags)&&this.ReadNoteEffects(track,voice,beat,newNote)},ToDynamicValue:function(value){switch(value){case 1:return 0;case 2:return 1;case 3:return 2;case 4:return 3;case 5:return 4;case 6:return 5;case 7:return 6;case 8:return 7;default:return 5}},ReadNoteEffects:function(track,voice,beat,note){var flags=this.Data.ReadByte(),flags2=0;this._versionNumber>=400&&(flags2=this.Data.ReadByte()),0!=(1&flags)&&this.ReadBend(note),0!=(16&flags)&&this.ReadGrace(voice,note),0!=(4&flags2)&&this.ReadTremoloPicking(beat),0!=(8&flags2)?this.ReadSlide(note):this._versionNumber<400&&0!=(4&flags)&&(note.SlideType=1),0!=(16&flags2)?this.ReadArtificialHarmonic(note):this._versionNumber<400&&(0!=(4&flags)&&(note.HarmonicType=1,note.HarmonicValue=this.DeltaFretToHarmonicValue(note.Fret)),0!=(8&flags)&&(note.HarmonicType=2)),0!=(32&flags2)&&this.ReadTrill(note),note.IsLetRing=0!=(8&flags),note.IsHammerPullOrigin=0!=(2&flags),0!=(64&flags2)&&(note.Vibrato=1),note.IsPalmMute=0!=(2&flags2),note.IsStaccato=0!=(1&flags2)},ReadBend:function(note){this.Data.ReadByte(),alphaTab.io.IOHelper.ReadInt32LE(this.Data);var pointCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data);if(pointCount>0)for(var i=0;i=500){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 1:note.SlideType=1;break;case 2:note.SlideType=2;break;case 4:note.SlideType=6;break;case 8:note.SlideType=5;break;case 16:note.SlideType=3;break;case 32:note.SlideType=4;break;default:note.SlideType=0}}else{switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case-2:note.SlideType=4;break;case-1:note.SlideType=3;break;case 1:note.SlideType=1;break;case 2:note.SlideType=2;break;case 3:note.SlideType=6;break;case 4:note.SlideType=5;break;default:note.SlideType=0}}},ReadArtificialHarmonic:function(note){var type=this.Data.ReadByte();if(this._versionNumber>=500)switch(type){case 1:note.HarmonicType=1,note.HarmonicValue=this.DeltaFretToHarmonicValue(note.Fret);break;case 2:this.Data.ReadByte(),this.Data.ReadByte(),this.Data.ReadByte();note.HarmonicType=2;break;case 3:note.HarmonicType=4,note.HarmonicValue=this.DeltaFretToHarmonicValue(this.Data.ReadByte());break;case 4:note.HarmonicType=3,note.HarmonicValue=12;break;case 5:note.HarmonicType=5,note.HarmonicValue=12}else if(this._versionNumber>=400)switch(type){case 1:note.HarmonicType=1;break;case 3:note.HarmonicType=4;break;case 4:note.HarmonicType=3;break;case 5:note.HarmonicType=5;break;case 15:case 17:case 22:note.HarmonicType=2}},DeltaFretToHarmonicValue:function(deltaFret){switch(deltaFret){case 2:return 2.4;case 3:return 3.2;case 8:return 8.2;case 10:return 9.6;case 14:case 15:return 14.7;case 21:case 22:return 21.7;case 4:case 5:case 7:case 9:case 12:case 16:case 17:case 19:case 24:return deltaFret;default:return 12}},ReadTrill:function(note){note.TrillValue=this.Data.ReadByte()+note.get_StringTuning();switch(this.Data.ReadByte()){case 1:note.TrillSpeed=16;break;case 2:note.TrillSpeed=32;break;case 3:note.TrillSpeed=64}},__class__:alphaTab.importer.Gp3To5Importer}),alphaTab.importer.Gp7Importer=$hx_exports.alphaTab.importer.Gp7Importer=function(){alphaTab.importer.ScoreImporter.call(this)},alphaTab.importer.Gp7Importer.__name__=["alphaTab","importer","Gp7Importer"],alphaTab.importer.Gp7Importer.__super__=alphaTab.importer.ScoreImporter,alphaTab.importer.Gp7Importer.prototype=$extend(alphaTab.importer.ScoreImporter.prototype,{get_Name:function(){return"Guitar Pro 7"},ReadScore:function(){alphaTab.util.Logger.Info(this.get_Name(),"Loading ZIP entries",null);var fileSystem=new alphaTab.io.ZipFile;fileSystem.FileFilter=function(s){return!!StringTools.endsWith(s,"score.gpif")||StringTools.endsWith(s,"BinaryStylesheet")};try{fileSystem.Load(this.Data)}catch(e){throw e instanceof js._Boot.HaxeError&&(e=e.val),js.Boot.__instanceof(e,system.Exception)?new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException(e.Message)):e}alphaTab.util.Logger.Info(this.get_Name(),"Zip entries loaded",null);for(var xml=null,binaryStylesheet=null,entry=$iterator(fileSystem.Entries)();entry.hasNext();){var entry1=entry.next();switch(entry1.FileName){case"BinaryStylesheet":binaryStylesheet=entry1.Data;break;case"score.gpif":xml=alphaTab.platform.Platform.ToString(entry1.Data)}}fileSystem.Entries=null,fileSystem=null,alphaTab.util.Logger.Info(this.get_Name(),"Start Parsing score.gpif",null);var gpifParser=new alphaTab.importer.GpifParser;gpifParser.ParseXml(xml,this.Settings),alphaTab.util.Logger.Info(this.get_Name(),"score.gpif parsed",null);var score=gpifParser.Score;if(null!=binaryStylesheet){alphaTab.util.Logger.Info(this.get_Name(),"Start Parsing BinaryStylesheet",null);var stylesheetParser=new alphaTab.importer.BinaryStylesheetParser;stylesheetParser.Parse(binaryStylesheet),null!=stylesheetParser.Stylesheet&&stylesheetParser.Stylesheet.Apply(score),alphaTab.util.Logger.Info(this.get_Name(),"BinaryStylesheet parsed",null)}return score},__class__:alphaTab.importer.Gp7Importer}),alphaTab.importer.GpBinaryHelpers=$hx_exports.alphaTab.importer.GpBinaryHelpers=function(){},alphaTab.importer.GpBinaryHelpers.__name__=["alphaTab","importer","GpBinaryHelpers"],alphaTab.importer.GpBinaryHelpers.GpReadDouble=function(data){var bytes=new Uint8Array(8);return data.Read(bytes,0,bytes.length),alphaTab.platform.Platform.ToDouble(bytes)},alphaTab.importer.GpBinaryHelpers.GpReadFloat=function(data){var bytes=new Uint8Array(4);return bytes[3]=system.Convert.ToUInt8(data.ReadByte()),bytes[2]=system.Convert.ToUInt8(data.ReadByte()),bytes[2]=system.Convert.ToUInt8(data.ReadByte()),bytes[1]=system.Convert.ToUInt8(data.ReadByte()),alphaTab.platform.Platform.ToFloat(bytes)},alphaTab.importer.GpBinaryHelpers.GpReadColor=function(data,readAlpha){null==readAlpha&&(readAlpha=!1);var r=system.Convert.ToUInt8(data.ReadByte()),g=system.Convert.ToUInt8(data.ReadByte()),b=system.Convert.ToUInt8(data.ReadByte()),a=255;return readAlpha?a=system.Convert.ToUInt8(data.ReadByte()):data.Skip(1),new alphaTab.platform.model.Color(r,g,b,a)},alphaTab.importer.GpBinaryHelpers.GpReadBool=function(data){return 0!=data.ReadByte()},alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused=function(data){return data.Skip(4),alphaTab.importer.GpBinaryHelpers.GpReadString(data,data.ReadByte())},alphaTab.importer.GpBinaryHelpers.GpReadStringInt=function(data){return alphaTab.importer.GpBinaryHelpers.GpReadString(data,alphaTab.io.IOHelper.ReadInt32LE(data))},alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte=function(data){var length=alphaTab.io.IOHelper.ReadInt32LE(data)-1;return data.ReadByte(),alphaTab.importer.GpBinaryHelpers.GpReadString(data,length)},alphaTab.importer.GpBinaryHelpers.GpReadString=function(data,length){var b=new Uint8Array(length);return data.Read(b,0,b.length),alphaTab.platform.Platform.ToString(b)},alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength=function(data,length){var stringLength=data.ReadByte(),s=alphaTab.importer.GpBinaryHelpers.GpReadString(data,stringLength);return stringLength0)for(var this18=this._lyricsByTrack,trackId=$iterator(Object.keys(this18))();trackId.hasNext();){var trackId1=trackId.next();this._tracksById[trackId1].ApplyLyrics(this._lyricsByTrack[trackId1])}},ParseDom:function(dom){var root=dom.DocumentElement;if(null!=root){if("GPIF"!=root.LocalName)throw new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException("Unsupported format"));this.Score=new alphaTab.model.Score;for(var n=$iterator(root.ChildNodes)();n.hasNext();){var n1=n.next();if(1==n1.NodeType){switch(n1.LocalName){case"Bars":this.ParseBars(n1);break;case"Beats":this.ParseBeats(n1);break;case"MasterBars":this.ParseMasterBarsNode(n1);break;case"MasterTrack":this.ParseMasterTrackNode(n1);break;case"Notes":this.ParseNotes(n1);break;case"Rhythms":this.ParseRhythms(n1);break;case"Score":this.ParseScoreNode(n1);break;case"Tracks":this.ParseTracksNode(n1);break;case"Voices":this.ParseVoices(n1)}}}}},ParseScoreNode:function(element){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Album":this.Score.Album=c1.FirstChild.get_InnerText();break;case"Artist":this.Score.Artist=c1.FirstChild.get_InnerText();break;case"Copyright":this.Score.Copyright=c1.FirstChild.get_InnerText();break;case"Instructions":this.Score.Instructions=c1.FirstChild.get_InnerText();break;case"Music":this.Score.Music=c1.FirstChild.get_InnerText();break;case"Notices":this.Score.Notices=c1.FirstChild.get_InnerText();break;case"SubTitle":this.Score.SubTitle=c1.FirstChild.get_InnerText();break;case"Tabber":this.Score.Tab=c1.FirstChild.get_InnerText();break;case"Title":this.Score.Title=c1.FirstChild.get_InnerText();break;case"Words":this.Score.Words=c1.FirstChild.get_InnerText();break;case"WordsAndMusic":if(null!=c1.FirstChild&&""!=c1.FirstChild.get_InnerText()){var tmp,wordsAndMusic=c1.FirstChild.get_InnerText();if(null!=wordsAndMusic&&0!=wordsAndMusic.length){var s=this.Score.Words;tmp=null==s||0==s.length}else tmp=!1;tmp&&(this.Score.Words=wordsAndMusic);var tmp1;if(null!=wordsAndMusic&&0!=wordsAndMusic.length){var s1=this.Score.Music;tmp1=null==s1||0==s1.length}else tmp1=!1;tmp1&&(this.Score.Music=wordsAndMusic)}}}}},ParseMasterTrackNode:function(node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Automations":this.ParseAutomations(c1,this._masterTrackAutomations);break;case"Tracks":var a=c1.get_InnerText(),this2=system.Convert.ToUInt16(32);this._tracksMapping=system._CsString.CsString_Impl_.Split_CharArray(a,[this2])}}}},ParseAutomations:function(node,automations){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Automation"==c1.LocalName&&this.ParseAutomation(c1,automations)}}},ParseAutomation:function(node,automations){for(var type=null,isLinear=!1,barId=null,ratioPosition=0,value=0,reference=0,text=null,c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Bar":barId=c1.get_InnerText();break;case"Linear":isLinear="true"==c1.get_InnerText().toLowerCase();break;case"Position":var s=c1.get_InnerText();ratioPosition=parseFloat(s);break;case"Text":text=c1.get_InnerText();break;case"Type":type=c1.get_InnerText();break;case"Value":var a=c1.get_InnerText(),this2=system.Convert.ToUInt16(32),parts=system._CsString.CsString_Impl_.Split_CharArray(a,[this2]);value=parseFloat(parts[0]),reference=alphaTab.platform.Platform.ParseInt(parts[1])}}}if(null!=type){var automation=null;if("Tempo"==type&&(automation=alphaTab.model.Automation.BuildTempoAutomation(isLinear,ratioPosition,value,reference)),null!=automation&&(automation.Text=text),null!=barId){if(!automations.hasOwnProperty(barId)){automations[barId]=[]}automations[barId].push(automation)}}},ParseTracksNode:function(node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Track"==c1.LocalName&&this.ParseTrack(c1)}}},ParseTrack:function(node){var track=new alphaTab.model.Track(1);track.Staves[0].StaffKind=1;for(var trackId=node.GetAttribute("id"),c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Color":var a=c1.get_InnerText(),this2=system.Convert.ToUInt16(32),parts=system._CsString.CsString_Impl_.Split_CharArray(a,[this2]);if(parts.length>=3){var r=alphaTab.platform.Platform.ParseInt(parts[0]),g=alphaTab.platform.Platform.ParseInt(parts[1]),b=alphaTab.platform.Platform.ParseInt(parts[2]);track.Color=new alphaTab.platform.model.Color(system.Convert.ToUInt8(r),system.Convert.ToUInt8(g),system.Convert.ToUInt8(b),255)}break;case"Instrument":var instrumentName=c1.GetAttribute("ref");(StringTools.endsWith(instrumentName,"-gs")||StringTools.endsWith(instrumentName,"GrandStaff"))&&(track.EnsureStaveCount(2),track.Staves[1].StaffKind=1);break;case"Lyrics":this.ParseLyrics(trackId,c1);break;case"GeneralMidi":case"MidiConnection":this.ParseGeneralMidi(track,c1);break;case"Name":track.Name=c1.get_InnerText();break;case"PartSounding":this.ParsePartSounding(track,c1);break;case"PlaybackState":var state=c1.get_InnerText();track.PlaybackInfo.IsSolo="Solo"==state,track.PlaybackInfo.IsMute="Mute"==state;break;case"Properties":this.ParseTrackProperties(track,c1);break;case"ShortName":track.ShortName=c1.get_InnerText();break;case"Sounds":this.ParseSounds(track,c1);break;case"Staves":this.ParseStaves(track,c1);break;case"Transpose":this.ParseTranspose(track,c1)}}}this._tracksById[trackId]=track},ParseStaves:function(track,node){for(var staffIndex=0,c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){if("Staff"==c1.LocalName){track.EnsureStaveCount(staffIndex+1);var staff=track.Staves[staffIndex];this.ParseStaff(staff,c1),++staffIndex}}}},ParseStaff:function(staff,node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Properties"==c1.LocalName&&this.ParseStaffProperties(staff,c1)}}},ParseStaffProperties:function(staff,node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Property"==c1.LocalName&&this.ParseStaffProperty(staff,c1)}}},ParseStaffProperty:function(staff,node){switch(node.GetAttribute("name")){case"CapoFret":var capo=alphaTab.platform.Platform.ParseInt(node.FindChildElement("Fret").get_InnerText());staff.Capo=capo;break;case"ChordCollection":case"DiagramCollection":this.ParseDiagramCollection_Staff_XmlNode(staff,node);break;case"Tuning":for(var a=node.FindChildElement("Pitches").get_InnerText(),this2=system.Convert.ToUInt16(32),tuningParts=system._CsString.CsString_Impl_.Split_CharArray(a,[this2]),tuning=new Int32Array(tuningParts.length),i=0;i1&&(this.MergeGroup(tracks),anyMerged=!0)}if(anyMerged)for(var i=0;i0){var stavesElements=attributes[0].GetElementsByTagName("staves",!1);if(stavesElements.length>0){var staves=alphaTab.platform.Platform.ParseInt(stavesElements[0].get_InnerText());track.EnsureStaveCount(staves)}}}for(var size=track.Staves.length,bars=new Array(size),masterBar=null,b=track.Staves[0].Bars.length;b<=barIndex;){for(var s=0;s0){var previousBar=track.Staves[s].Bars[track.Staves[s].Bars.length-1];bar.Clef=previousBar.Clef}masterBar=this.GetOrCreateMasterBar(barIndex),track.Staves[s].AddBar(bar);for(var v=0;v0&&(voiceIndex=alphaTab.platform.Platform.ParseInt(voiceNodes[0].get_InnerText())-1,-1==this._firstVoice&&(this._firstVoice=voiceIndex,voiceIndex=0));var previousBeatWasPulled=this._previousBeatWasPulled;this._previousBeatWasPulled=!1;var staffElement=element.GetElementsByTagName("staff",!1),staff=1;if(staffElement.length>0){staff=alphaTab.platform.Platform.ParseInt(staffElement[0].get_InnerText()),(this._isBeamContinue||previousBeatWasPulled)&&this._previousBeat.Voice.Bar.Staff.Index!=staff-1&&(staff=this._previousBeat.Voice.Bar.Staff.Index+1,this._previousBeatWasPulled=!0);var staffId=Std.string(bars[0].Staff.Track.Index)+"-"+Std.string(staff);this._voiceOfStaff.hasOwnProperty(staffId)||(this._voiceOfStaff[staffId]=voiceIndex),voiceIndex-=this._voiceOfStaff[staffId]}var beat,bar=bars[staff-1],voice=this.GetOrCreateVoice(bar,voiceIndex);return chord||1==voice.Beats.length&&voice.IsEmpty?beat=voice.Beats[voice.Beats.length-1]:((beat=new alphaTab.model.Beat).IsEmpty=!1,voice.AddBeat(beat)),this._isBeamContinue=!1,this._previousBeat=beat,beat},ParseForward:function(element,bars){for(var beat=this.GetOrCreateBeat(element,bars,!1),duration=4*alphaTab.platform.Platform.ParseInt(element.FindChildElement("duration").get_InnerText())/js.Boot.__cast(this._divisionsPerQuarterNote,Float),durations=new Int32Array([64,32,16,8,4,2,1]),d=new system.Int32ArrayIterator(durations);d.hasNext();){var d1=d.next();if(duration>=d1){beat.Duration=js.Boot.__cast(d1,Int),duration-=d1;break}}beat.IsEmpty=!1},ParseStaffDetails:function(element,track){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"staff-lines":for(var staff=$iterator(track.Staves)();staff.hasNext();){var staff1=staff.next(),this1=new Int32Array(alphaTab.platform.Platform.ParseInt(c1.get_InnerText()));staff1.Tuning=this1}break;case"staff-tuning":this.ParseStaffTuning(c1,track)}}}for(var staff2=$iterator(track.Staves)();staff2.hasNext();){var staff3=staff2.next();if(this.IsEmptyTuning(staff3.Tuning)){var this2=new Int32Array(0);staff3.Tuning=this2}}},ParseStaffTuning:function(element,track){for(var line=alphaTab.platform.Platform.ParseInt(element.GetAttribute("line")),tuningStep="C",tuningOctave="",tuningAlter=0,c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"tuning-alter":tuningAlter=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"tuning-octave":tuningOctave=c1.get_InnerText();break;case"tuning-step":tuningStep=c1.get_InnerText()}}}for(var tuning=alphaTab.model.TuningParser.GetTuningForText(tuningStep+tuningOctave)+tuningAlter,staff=$iterator(track.Staves)();staff.hasNext();){var staff1=staff.next();staff1.Tuning[staff1.Tuning.length-line]=tuning}},ParseHarmony:function(element,track){for(var rootStep=null,rootAlter="",c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"kind":c1.GetAttribute("text"),c1.get_InnerText();break;case"root":for(var rootChild=$iterator(c1.ChildNodes)();rootChild.hasNext();){var rootChild1=rootChild.next();if(1==rootChild1.NodeType){switch(rootChild1.LocalName){case"root-alter":switch(alphaTab.platform.Platform.ParseInt(c1.get_InnerText())){case-2:rootAlter=" bb";break;case-1:rootAlter=" b";break;case 0:rootAlter="";break;case 1:rootAlter=" #";break;case 2:rootAlter=" ##"}break;case"root-step":rootStep=rootChild1.get_InnerText()}}}}}}var chord=new alphaTab.model.Chord;chord.Name=rootStep+rootAlter,this._currentChord=alphaTab.platform.Platform.NewGuid();for(var staff=$iterator(track.Staves)();staff.hasNext();){staff.next().Chords[this._currentChord]=chord}},ParseBarline:function(element,masterBar){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"ending":this.ParseEnding(c1,masterBar);break;case"repeat":this.ParseRepeat(c1,masterBar)}}}},ParseEnding:function(element,masterBar){var number=alphaTab.platform.Platform.ParseInt(element.GetAttribute("number"));number>0&&(--number,masterBar.AlternateEndings=system.Convert.ToUInt8(masterBar.AlternateEndings|system.Convert.ToUInt8(1<0,beat=this.GetOrCreateBeat(element,bars,chord);null==beat.ChordId&&null!=this._currentChord&&(beat.ChordId=this._currentChord,this._currentChord=null),null!=this._currentDirection&&(beat.Text=this._currentDirection,this._currentDirection=null);var note=new alphaTab.model.Note;beat.Voice.IsEmpty=!1,beat.IsEmpty=!1,beat.AddNote(note),beat.Dots=0;for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"accidental":this.ParseAccidental(c1,note);break;case"beam":"continue"==c1.get_InnerText()&&(this._isBeamContinue=!0);break;case"cue":break;case"dot":beat.Dots++;break;case"duration":if(beat.get_IsRest()){switch(alphaTab.platform.Platform.ParseInt(c1.get_InnerText())){case 1:beat.Duration=1;break;case 2:beat.Duration=2;break;case 4:beat.Duration=4;break;case 8:beat.Duration=8;break;case 16:beat.Duration=16;break;case 32:beat.Duration=32;break;case 64:beat.Duration=64;break;default:beat.Duration=4}}break;case"grace":beat.GraceType=2,beat.Duration=32;break;case"instrument":break;case"lyric":this.ParseLyric(c1,beat);break;case"notations":this.ParseNotations(c1,beat,note);break;case"notehead":"yes"==c1.GetAttribute("parentheses")&&(note.IsGhost=!0);break;case"pitch":this.ParsePitch(c1,note);break;case"rest":beat.IsEmpty=!1;beat.Notes=[];break;case"stem":break;case"tie":this.ParseTied(c1,note);break;case"time-modification":this.ParseTimeModification(c1,beat);break;case"type":beat.Duration=this.GetDuration(c1.get_InnerText()),0!=beat.GraceType&&beat.Duration<16&&(beat.Duration=8);break;case"unpitched":this.ParseUnpitched(c1,note)}}}if(note.get_IsStringed())for(var i=0;i0&&(note.TieDestination=this._tieStarts[0],note.IsTieDestination=!0,this._tieStarts.splice(0,1)))},ParseNotations:function(element,beat,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"articulations":this.ParseArticulations(c1,note);break;case"dynamics":this.ParseDynamics(c1,beat);break;case"glissando":case"slide":"start"==c1.GetAttribute("type")&&(note.SlideType=1);break;case"ornaments":this.ParseOrnaments(c1,note);break;case"slur":"start"==c1.GetAttribute("type")&&(beat.IsLegatoOrigin=!0);break;case"technical":this.ParseTechnical(c1,note);break;case"tied":this.ParseTied(c1,note)}}}},ParseOrnaments:function(element,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){if("tremolo"==c1.LocalName){switch(alphaTab.platform.Platform.ParseInt(c1.get_InnerText())){case 1:note.Beat.TremoloSpeed=8;break;case 2:note.Beat.TremoloSpeed=16;break;case 3:note.Beat.TremoloSpeed=32}}}}},ParseTechnical:function(element,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"down-bow":note.Beat.PickStroke=2;break;case"fret":note.Fret=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"string":note.String=alphaTab.platform.Platform.ParseInt(c1.get_InnerText()),-2147483648!=note.String&&(note.String=note.Beat.Voice.Bar.Staff.Tuning.length-note.String+1);break;case"up-bow":note.Beat.PickStroke=1}}}-2147483648!=note.String&&-2147483648!=note.Fret||(note.String=-1,note.Fret=-1)},ParseArticulations:function(element,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){switch(c.next().LocalName){case"accent":note.Accentuated=1;break;case"detached-legato":case"staccato":note.IsStaccato=!0;break;case"strong-accent":note.Accentuated=2}}},ParseDynamics:function(element,beat){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"f":beat.Dynamic=5;break;case"ff":beat.Dynamic=6;break;case"fff":beat.Dynamic=7;break;case"mf":beat.Dynamic=4;break;case"mp":beat.Dynamic=3;break;case"p":beat.Dynamic=2;break;case"pp":beat.Dynamic=1;break;case"ppp":beat.Dynamic=0}}}},ParseTimeModification:function(element,beat){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"actual-notes":beat.TupletNumerator=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"normal-notes":beat.TupletDenominator=alphaTab.platform.Platform.ParseInt(c1.get_InnerText())}}}},ParseUnpitched:function(element,note){for(var step=null,semitones=0,octave=0,c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"display-alter":semitones=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"display-octave":octave=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"display-step":step=c1.get_InnerText()}}}var value=12*octave+alphaTab.model.TuningParser.GetToneForText(step)+semitones;note.Octave=value/12|0,note.Tone=value-12*note.Octave},ParsePitch:function(element,note){for(var step=null,semitones=0,octave=0,c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"alter":var s=c1.get_InnerText();semitones=parseFloat(s);isNaN(semitones)&&(semitones=0);break;case"octave":octave=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"step":step=c1.get_InnerText()}}}var value=12*octave+alphaTab.model.TuningParser.GetToneForText(step)+system.Convert.ToInt32_Single(semitones);note.Octave=value/12|0,note.Tone=value-12*note.Octave},GetOrCreateVoice:function(bar,index){if(index0){var prev=this._score.MasterBars[this._score.MasterBars.length-1];mb.TimeSignatureDenominator=prev.TimeSignatureDenominator,mb.TimeSignatureNumerator=prev.TimeSignatureNumerator,mb.KeySignature=prev.KeySignature,mb.KeySignatureType=prev.KeySignatureType}this._score.AddMasterBar(mb),++i}return this._score.MasterBars[index]},ParseIdentification:function(element){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"creator":"composer"==c1.GetAttribute("type")&&(this._score.Music=c1.get_InnerText());break;case"rights":var s=this._score.Copyright;null!=s&&0!=s.length&&(this._score.Copyright=this._score.Copyright+"\n");var tmp=this._score.Copyright+c1.get_InnerText();this._score.Copyright=tmp}}}},ParsePartList:function(element){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"part-group":this.ParsePartGroup(c1);break;case"score-part":this.ParseScorePart(c1)}}}},ParsePartGroup:function(element){switch(element.GetAttribute("type")){case"start":this._currentPartGroup=element.GetAttribute("number");this._partGroups[this._currentPartGroup]=[];break;case"stop":this._currentPartGroup=null}},ParseScorePart:function(element){var id=element.GetAttribute("id"),track=new alphaTab.model.Track(1);track.Staves[0].StaffKind=1,this._trackById[id]=track,this._score.AddTrack(track),null!=this._currentPartGroup&&this._partGroups[this._currentPartGroup].push(track);for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"midi-instrument":this.ParseMidiInstrument(c1,track);break;case"part-abbreviation":track.ShortName=c1.get_InnerText();break;case"part-name":track.Name=c1.get_InnerText()}}}if(this.IsEmptyTuning(track.Staves[0].Tuning)){var tmp=track.Staves[0],this1=new Int32Array(0);tmp.Tuning=this1}},IsEmptyTuning:function(tuning){if(null==tuning)return!0;for(var i=0;i=0;)bits|=this.ReadBit()<=8){if(this._currentByte=this._source.ReadByte(),-1==this._currentByte)throw new js._Boot.HaxeError((new alphaTab.io.EndOfReaderException).EndOfReaderException());this._position=0}var value=this._currentByte>>8-this._position-1&1;return this._position++,value},ReadAll:function(){var all=alphaTab.io.ByteBuffer.Empty();try{for(;;)all.WriteByte(system.Convert.ToUInt8(this.ReadByte()))}catch(__e){if(__e instanceof js._Boot.HaxeError&&(__e=__e.val),!js.Boot.__instanceof(__e,alphaTab.io.EndOfReaderException))throw __e}return all.ToArray()},__class__:alphaTab.io.BitReader},alphaTab.io.IReadable=$hx_exports.alphaTab.io.IReadable=function(){},alphaTab.io.IReadable.__name__=["alphaTab","io","IReadable"],alphaTab.io.IReadable.prototype={__class__:alphaTab.io.IReadable},alphaTab.io.IWriteable=$hx_exports.alphaTab.io.IWriteable=function(){},alphaTab.io.IWriteable.__name__=["alphaTab","io","IWriteable"],alphaTab.io.IWriteable.prototype={__class__:alphaTab.io.IWriteable},alphaTab.io.ByteBuffer=$hx_exports.alphaTab.io.ByteBuffer=function(){this._buffer=null,this._capacity=0,this.set_Length(0),this.set_Position(0)},alphaTab.io.ByteBuffer.__name__=["alphaTab","io","ByteBuffer"],alphaTab.io.ByteBuffer.__interfaces__=[alphaTab.io.IReadable,alphaTab.io.IWriteable],alphaTab.io.ByteBuffer.Empty=function(){return alphaTab.io.ByteBuffer.WithCapactiy(0)},alphaTab.io.ByteBuffer.WithCapactiy=function(capacity){var buffer=new alphaTab.io.ByteBuffer,this1=new Uint8Array(capacity);return buffer._buffer=this1,buffer._capacity=capacity,buffer},alphaTab.io.ByteBuffer.FromBuffer=function(data){var buffer=new alphaTab.io.ByteBuffer;return buffer._buffer=data,buffer._capacity=buffer.set_Length(data.length),buffer},alphaTab.io.ByteBuffer.prototype={get_Length:function(){return this.__Length},set_Length:function(value){return this.__Length=value},get_Position:function(){return this.__Position},set_Position:function(value){return this.__Position=value},GetBuffer:function(){return this._buffer},Reset:function(){this.set_Position(0)},Skip:function(offset){this.set_Position(this.get_Position()+offset)},SetCapacity:function(value){if(value!=this._capacity){if(value>0){var newBuffer=new Uint8Array(value);if(this.get_Length()>0){var src=this._buffer,count=this.get_Length();newBuffer.set(src.subarray(0,0+count),0)}this._buffer=newBuffer}else this._buffer=null;this._capacity=value}},ReadByte:function(){if(this.get_Length()-this.get_Position()<=0)return-1;var this1=this._buffer,_g1=this.get_Position();this.set_Position(_g1+1);return this1[_g1]},Read:function(buffer,offset,count){var n=this.get_Length()-this.get_Position();if(n>count&&(n=count),n<=0)return 0;if(n<=8)for(var byteCount=n;--byteCount>=0;)buffer[offset+byteCount]=this._buffer[this.get_Position()+byteCount];else{var src=this._buffer,srcOffset=this.get_Position();buffer.set(src.subarray(srcOffset,srcOffset+n),offset)}return this.set_Position(this.get_Position()+n),n},WriteByte:function(value){var buffer=new Uint8Array(1);buffer[0]=value,this.Write(buffer,0,1)},Write:function(buffer,offset,count){var i=this.get_Position()+count;if(i>this.get_Length()&&(i>this._capacity&&this.EnsureCapacity(i),this.set_Length(i)),count<=8&&buffer!=this._buffer)for(var byteCount=count;--byteCount>=0;)this._buffer[this.get_Position()+byteCount]=buffer[offset+byteCount];else{var dst=this._buffer,dstOffset=this.get_Position(),count1=Math.min(count,buffer.length-offset);dst.set(buffer.subarray(offset,offset+count1),dstOffset)}this.set_Position(i)},EnsureCapacity:function(value){if(value>this._capacity){var newCapacity=value;newCapacity<256&&(newCapacity=256),newCapacity<2*this._capacity&&(newCapacity=2*this._capacity),this.SetCapacity(newCapacity)}},ReadAll:function(){return this.ToArray()},ToArray:function(){var copy=new Uint8Array(this.get_Length()),src=this._buffer,count=this.get_Length();return copy.set(src.subarray(0,0+count),0),copy},__class__:alphaTab.io.ByteBuffer},alphaTab.io.EndOfReaderException=$hx_exports.alphaTab.io.EndOfReaderException=function(){alphaTab.AlphaTabException.call(this)},alphaTab.io.EndOfReaderException.__name__=["alphaTab","io","EndOfReaderException"],alphaTab.io.EndOfReaderException.__super__=alphaTab.AlphaTabException,alphaTab.io.EndOfReaderException.prototype=$extend(alphaTab.AlphaTabException.prototype,{EndOfReaderException:function(){return this.AlphaTabException(""),this},__class__:alphaTab.io.EndOfReaderException}),alphaTab.io.IOHelper=$hx_exports.alphaTab.io.IOHelper=function(){},alphaTab.io.IOHelper.__name__=["alphaTab","io","IOHelper"],alphaTab.io.IOHelper.ReadInt32BE=function(input){return input.ReadByte()<<24|input.ReadByte()<<16|input.ReadByte()<<8|input.ReadByte()},alphaTab.io.IOHelper.ReadInt32LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte(),ch3=input.ReadByte();return input.ReadByte()<<24|ch3<<16|ch2<<8|ch1},alphaTab.io.IOHelper.ReadUInt32LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte(),ch3=input.ReadByte(),ch4=input.ReadByte();return alphaTab.platform.Platform.ToUInt32(ch4<<24|ch3<<16|ch2<<8|ch1)},alphaTab.io.IOHelper.ReadUInt16LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToUInt16(ch2<<8|ch1)},alphaTab.io.IOHelper.ReadInt16LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToInt16(ch2<<8|ch1)},alphaTab.io.IOHelper.ReadUInt32BE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte(),ch3=input.ReadByte(),ch4=input.ReadByte();return alphaTab.platform.Platform.ToUInt32(ch1<<24|ch2<<16|ch3<<8|ch4)},alphaTab.io.IOHelper.ReadUInt16BE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToUInt16(ch1<<8|ch2)},alphaTab.io.IOHelper.ReadInt16BE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToInt16(ch1<<8|ch2)},alphaTab.io.IOHelper.ReadByteArray=function(input,length){var v=new Uint8Array(length);return input.Read(v,0,length),v},alphaTab.io.IOHelper.Read8BitChars=function(input,length){var b=new Uint8Array(length);return input.Read(b,0,b.length),alphaTab.platform.Platform.ToString(b)},alphaTab.io.IOHelper.Read8BitString=function(input){for(var s="",c=input.ReadByte();0!=c;)s+=String.fromCharCode(c),c=input.ReadByte();return s},alphaTab.io.IOHelper.Read8BitStringLength=function(input,length){for(var s="",z=-1,i=0;i=0?HxOverrides.substr(t,0,z):t},alphaTab.io.IOHelper.ReadSInt8=function(input){var v=input.ReadByte();return-256*((255&v)>>7)+(255&v)},alphaTab.io.IOHelper.ReadInt24=function(input,index){var i=input[index]|input[index+1]<<8|input[index+2]<<16;return 8388608==(8388608&i)&&(i|=-16777216),i},alphaTab.io.IOHelper.ReadInt16=function(input,index){return alphaTab.platform.Platform.ToInt16(input[index]|input[index+1]<<8)},haxe.io={},haxe.io.Input=function(){},haxe.io.Input.__name__=["haxe","io","Input"],haxe.io.Input.prototype={readByte:function(){throw new js._Boot.HaxeError("Not implemented")},readBytes:function(s,pos,len){var k=len,b=s.b;if(pos<0||len<0||pos+len>s.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);try{for(;k>0;)b[pos]=this.readByte(),++pos,--k}catch(eof){if(eof instanceof js._Boot.HaxeError&&(eof=eof.val),!js.Boot.__instanceof(eof,haxe.io.Eof))throw eof}return len-k},readFullBytes:function(s,pos,len){for(;len>0;){var k=this.readBytes(s,pos,len);if(0==k)throw new js._Boot.HaxeError(haxe.io.Error.Blocked);pos+=k,len-=k}},read:function(nbytes){for(var s=new haxe.io.Bytes(new ArrayBuffer(nbytes)),p=0;nbytes>0;){var k=this.readBytes(s,p,nbytes);if(0==k)throw new js._Boot.HaxeError(haxe.io.Error.Blocked);p+=k,nbytes-=k}return s},readInt16:function(){var ch1=this.readByte(),ch2=this.readByte(),n=this.bigEndian?ch2|ch1<<8:ch1|ch2<<8;return 0!=(32768&n)?n-65536:n},readUInt16:function(){var ch1=this.readByte(),ch2=this.readByte();return this.bigEndian?ch2|ch1<<8:ch1|ch2<<8},readInt32:function(){var ch1=this.readByte(),ch2=this.readByte(),ch3=this.readByte(),ch4=this.readByte();return this.bigEndian?ch4|ch3<<8|ch2<<16|ch1<<24:ch1|ch2<<8|ch3<<16|ch4<<24},readString:function(len){var b=new haxe.io.Bytes(new ArrayBuffer(len));return this.readFullBytes(b,0,len),b.toString()},__class__:haxe.io.Input},alphaTab.io.ReadableInput=$hx_exports.alphaTab.io.ReadableInput=function(readable){this._readable=null,this._readable=readable},alphaTab.io.ReadableInput.__name__=["alphaTab","io","ReadableInput"],alphaTab.io.ReadableInput.__super__=haxe.io.Input,alphaTab.io.ReadableInput.prototype=$extend(haxe.io.Input.prototype,{readByte:function(){return this._readable.ReadByte()},readBytes:function(s,pos,len){var data=new Uint8Array(s.b.bufferValue);return this._readable.Read(data,pos,len)},__class__:alphaTab.io.ReadableInput}),alphaTab.io.ZipEntry=$hx_exports.alphaTab.io.ZipEntry=function(){this.FullName=null,this.FileName=null,this.Data=null},alphaTab.io.ZipEntry.__name__=["alphaTab","io","ZipEntry"],alphaTab.io.ZipEntry.prototype={__class__:alphaTab.io.ZipEntry},alphaTab.io.ZipFile=$hx_exports.alphaTab.io.ZipFile=function(){this.FileFilter=null,this.Entries=null;this.Entries=[],this.FileFilter=function(s){return!0}},alphaTab.io.ZipFile.__name__=["alphaTab","io","ZipFile"],alphaTab.io.ZipFile.prototype={Load:function(s){for(var haxeInput=new alphaTab.io.ReadableInput(s),_g_head=new haxe.zip.Reader(haxeInput).read().h;null!=_g_head;){var val=_g_head.item;_g_head=_g_head.next;var entry=val,fullName=entry.fileName;if(null==this.FileFilter||this.FileFilter(fullName)){var i=fullName.lastIndexOf("/"),name=i>=0?HxOverrides.substr(fullName,i+1,null):fullName,data=entry.data.b.bufferValue,this1=this.Entries,_tmp=new alphaTab.io.ZipEntry;_tmp.FullName=fullName,_tmp.FileName=name,_tmp.Data=new Uint8Array(data),this1.push(_tmp)}}},__class__:alphaTab.io.ZipFile},alphaTab.model={},alphaTab.model._AccentuationType={},alphaTab.model._AccentuationType.AccentuationType_Impl_=$hx_exports.alphaTab.model._AccentuationType.AccentuationType_Impl_={},alphaTab.model._AccentuationType.AccentuationType_Impl_.__name__=["alphaTab","model","_AccentuationType","AccentuationType_Impl_"],alphaTab.model._AccentuationType.AccentuationType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Normal";case 2:return"Heavy"}return""},alphaTab.model._AccidentalType={},alphaTab.model._AccidentalType.AccidentalType_Impl_=$hx_exports.alphaTab.model._AccidentalType.AccidentalType_Impl_={},alphaTab.model._AccidentalType.AccidentalType_Impl_.__name__=["alphaTab","model","_AccidentalType","AccidentalType_Impl_"],alphaTab.model._AccidentalType.AccidentalType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Natural";case 2:return"Sharp";case 3:return"Flat";case 4:return"NaturalQuarterNoteUp";case 5:return"SharpQuarterNoteUp";case 6:return"FlatQuarterNoteUp"}return""},alphaTab.model.Automation=$hx_exports.alphaTab.model.Automation=function(){this.IsLinear=!1,this.Type=0,this.Value=0,this.RatioPosition=0,this.Text=null},alphaTab.model.Automation.__name__=["alphaTab","model","Automation"],alphaTab.model.Automation.BuildTempoAutomation=function(isLinear,ratioPosition,value,reference){(reference<1||reference>5)&&(reference=2);var references=new Float32Array([1,.5,1,1.5,2,3]),automation=new alphaTab.model.Automation;return automation.Type=0,automation.IsLinear=isLinear,automation.RatioPosition=ratioPosition,automation.Value=value*references[reference],automation},alphaTab.model.Automation.CopyTo=function(src,dst){dst.IsLinear=src.IsLinear,dst.RatioPosition=src.RatioPosition,dst.Text=src.Text,dst.Type=src.Type,dst.Value=src.Value},alphaTab.model.Automation.prototype={Clone:function(){var a=new alphaTab.model.Automation;return alphaTab.model.Automation.CopyTo(this,a),a},__class__:alphaTab.model.Automation},alphaTab.model._AutomationType={},alphaTab.model._AutomationType.AutomationType_Impl_=$hx_exports.alphaTab.model._AutomationType.AutomationType_Impl_={},alphaTab.model._AutomationType.AutomationType_Impl_.__name__=["alphaTab","model","_AutomationType","AutomationType_Impl_"],alphaTab.model._AutomationType.AutomationType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.toString=function(this1){switch(this1){case 0:return"Tempo";case 1:return"Volume";case 2:return"Instrument";case 3:return"Balance"}return""},alphaTab.model.Bar=$hx_exports.alphaTab.model.Bar=function(){this.Id=0,this.Index=0,this.NextBar=null,this.PreviousBar=null,this.Clef=0,this.ClefOttava=0,this.Staff=null,this.Voices=null,this.SimileMark=0,this.Id=alphaTab.model.Bar.GlobalBarId++;this.Voices=[],this.Clef=4,this.ClefOttava=2,this.SimileMark=0},alphaTab.model.Bar.__name__=["alphaTab","model","Bar"],alphaTab.model.Bar.CopyTo=function(src,dst){dst.Id=src.Id,dst.Index=src.Index,dst.Clef=src.Clef,dst.ClefOttava=src.ClefOttava,dst.SimileMark=src.SimileMark},alphaTab.model.Bar.prototype={get_MasterBar:function(){return this.Staff.Track.Score.MasterBars[this.Index]},get_IsEmpty:function(){for(var i=0,j=this.Voices.length;ithis.MaxWhammyPoint.Value)&&(this.MaxWhammyPoint=point),(null==this.MinWhammyPoint||point.Value=this.WhammyBarPoints.length)){-1!=index&&this.WhammyBarPoints.splice(index,1);var point=this.WhammyBarPoints[index];if(point==this.MaxWhammyPoint){this.MaxWhammyPoint=null;for(var currentPoint=$iterator(this.WhammyBarPoints)();currentPoint.hasNext();){var currentPoint1=currentPoint.next();(null==this.MaxWhammyPoint||currentPoint1.Value>this.MaxWhammyPoint.Value)&&(this.MaxWhammyPoint=currentPoint1)}}if(point==this.MinWhammyPoint){this.MinWhammyPoint=null;for(var currentPoint2=$iterator(this.WhammyBarPoints)();currentPoint2.hasNext();){var currentPoint3=currentPoint2.next();(null==this.MinWhammyPoint||currentPoint3.Value=0&&-1!=index&&this.Notes.splice(index,1)},GetAutomation:function(type){for(var i=0,j=this.Automations.length;i0&&this.TupletNumerator>=0&&(ticks=alphaTab.audio.MidiUtils.ApplyTuplet(ticks,this.TupletNumerator,this.TupletDenominator)),ticks},UpdateDurations:function(){var ticks=this.CalculateDuration();this.PlaybackDuration=ticks,this.DisplayDuration=ticks;switch(this.GraceType){case 1:case 2:switch(this.Duration){case 8:this.PlaybackDuration=alphaTab.audio.MidiUtils.ToTicks(32);break;case 16:this.PlaybackDuration=alphaTab.audio.MidiUtils.ToTicks(64);break;case 32:this.PlaybackDuration=alphaTab.audio.MidiUtils.ToTicks(128)}break;case 3:this.PlaybackDuration=this.PlaybackDuration/2|0;break;default:var previous=this.PreviousBeat;if(null!=previous&&3==previous.GraceType)this.PlaybackDuration=previous.PlaybackDuration;else for(;null!=previous&&1==previous.GraceType;)this.PlaybackDuration=this.PlaybackDuration-previous.PlaybackDuration,previous=previous.PreviousBeat}},Finish:function(settings){var displayMode=null==settings?0:settings.DisplayMode,isGradual="grad"==this.Text||"grad."==this.Text;isGradual&&1==displayMode&&(this.Text="");var needCopyBeatForBend=!1;this.MinNote=null,this.MaxNote=null,this.MinStringNote=null,this.MaxStringNote=null;for(var visibleNotes=0,i=0,j=this.Notes.length;ithis.MaxNote.get_RealValue())&&(this.MaxNote=note),(null==this.MinStringNote||note.Stringthis.MaxStringNote.String)&&(this.MaxStringNote=note)),++i}if(0==visibleNotes&&(this.IsEmpty=!0),this.IsSlurOrigin&&(this.IsSlurOrigin=!0,this.SlurDestination=this.NextBeat,this.get_IsSlurDestination()?(this.SlurOrigin.SlurDestination=this.SlurDestination,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this.SlurOrigin)):(this.SlurOrigin=this,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this))),this.get_IsRest()||this.IsLetRing&&this.IsPalmMute)this.get_IsRest()&&null!=this.PreviousBeat&&null!=settings&&0==settings.DisplayMode&&(this.PreviousBeat.IsLetRing&&(this.IsLetRing=!0),this.PreviousBeat.IsPalmMute&&(this.IsPalmMute=!0));else for(var currentBeat=this.PreviousBeat;null!=currentBeat&¤tBeat.get_IsRest();)this.IsLetRing||(currentBeat.IsLetRing=!1),this.IsPalmMute||(currentBeat.IsPalmMute=!1),currentBeat=currentBeat.PreviousBeat;if(this.WhammyBarPoints.length>0&&1==this.WhammyBarType){1==displayMode&&(this.WhammyStyle=isGradual?1:2);var isContinuedWhammy=this.IsContinuedWhammy=null!=this.PreviousBeat&&this.PreviousBeat.get_HasWhammyBar();if(4==this.WhammyBarPoints.length){var origin=this.WhammyBarPoints[0],middle1=this.WhammyBarPoints[1],middle2=this.WhammyBarPoints[2],destination=this.WhammyBarPoints[3];middle1.Value==middle2.Value?origin.Valuemiddle1.Value&&middle1.Value>destination.Value?(0==origin.Value||isContinuedWhammy?this.WhammyBarType=2:this.WhammyBarType=6,this.WhammyBarPoints.splice(2,1),this.WhammyBarPoints.splice(1,1)):origin.Value>middle1.Value&&middle1.Valuedestination.Value?(this.WhammyBarType=3,middle1.Offset==middle2.Offset&&this.WhammyBarPoints.splice(2,1)):origin.Value==middle1.Value&&middle1.Value==destination.Value?(0==origin.Value||isContinuedWhammy?this.WhammyBarType=4:this.WhammyBarType=5,this.WhammyBarPoints.splice(2,1),this.WhammyBarPoints.splice(1,1)):alphaTab.util.Logger.Warning("Model","Unsupported whammy type detected, fallback to custom",null):alphaTab.util.Logger.Warning("Model","Unsupported whammy type detected, fallback to custom",null)}}if(this.UpdateDurations(),needCopyBeatForBend){var cloneBeat=this.Clone();cloneBeat.Id=alphaTab.model.Beat.GlobalBeatId++;for(var i1=0,j1=cloneBeat.Notes.length;i1beat.Voice.Bar.Index||beat.Voice.Bar.Index==this.Voice.Bar.Index&&this.Index>beat.Index},HasNoteOnString:function(noteString){return this.NoteStringLookup.hasOwnProperty(noteString)},__class__:alphaTab.model.Beat},alphaTab.model.BendPoint=$hx_exports.alphaTab.model.BendPoint=function(offset,value){null==value&&(value=0),null==offset&&(offset=0),this.Offset=0,this.Value=0,this.Offset=offset,this.Value=value},alphaTab.model.BendPoint.__name__=["alphaTab","model","BendPoint"],alphaTab.model.BendPoint.CopyTo=function(src,dst){dst.Offset=src.Offset,dst.Value=src.Value},alphaTab.model.BendPoint.prototype={Clone:function(){var point=new alphaTab.model.BendPoint(0,0);return alphaTab.model.BendPoint.CopyTo(this,point),point},__class__:alphaTab.model.BendPoint},alphaTab.model._BendStyle={},alphaTab.model._BendStyle.BendStyle_Impl_=$hx_exports.alphaTab.model._BendStyle.BendStyle_Impl_={},alphaTab.model._BendStyle.BendStyle_Impl_.__name__=["alphaTab","model","_BendStyle","BendStyle_Impl_"],alphaTab.model._BendStyle.BendStyle_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.toString=function(this1){switch(this1){case 0:return"Default";case 1:return"Gradual";case 2:return"Fast"}return""},alphaTab.model._BendType={},alphaTab.model._BendType.BendType_Impl_=$hx_exports.alphaTab.model._BendType.BendType_Impl_={},alphaTab.model._BendType.BendType_Impl_.__name__=["alphaTab","model","_BendType","BendType_Impl_"],alphaTab.model._BendType.BendType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._BendType.BendType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendType.BendType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._BendType.BendType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._BendType.BendType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._BendType.BendType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendType.BendType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendType.BendType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendType.BendType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Custom";case 2:return"Bend";case 3:return"Release";case 4:return"BendRelease";case 5:return"Hold";case 6:return"Prebend";case 7:return"PrebendBend";case 8:return"PrebendRelease"}return""},alphaTab.model._BrushType={},alphaTab.model._BrushType.BrushType_Impl_=$hx_exports.alphaTab.model._BrushType.BrushType_Impl_={},alphaTab.model._BrushType.BrushType_Impl_.__name__=["alphaTab","model","_BrushType","BrushType_Impl_"],alphaTab.model._BrushType.BrushType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._BrushType.BrushType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"BrushUp";case 2:return"BrushDown";case 3:return"ArpeggioUp";case 4:return"ArpeggioDown"}return""},alphaTab.model.Chord=$hx_exports.alphaTab.model.Chord=function(){this.Name=null,this.FirstFret=0,this.Strings=null,this.BarreFrets=null;this.Strings=[];this.BarreFrets=[]},alphaTab.model.Chord.__name__=["alphaTab","model","Chord"],alphaTab.model.Chord.CopyTo=function(src,dst){dst.FirstFret=src.FirstFret,dst.Name=src.Name,dst.Strings=src.Strings.slice(0)},alphaTab.model.Chord.prototype={__class__:alphaTab.model.Chord},alphaTab.model._Clef={},alphaTab.model._Clef.Clef_Impl_=$hx_exports.alphaTab.model._Clef.Clef_Impl_={},alphaTab.model._Clef.Clef_Impl_.__name__=["alphaTab","model","_Clef","Clef_Impl_"],alphaTab.model._Clef.Clef_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._Clef.Clef_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Clef.Clef_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._Clef.Clef_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._Clef.Clef_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._Clef.Clef_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Clef.Clef_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Clef.Clef_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Clef.Clef_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.toString=function(this1){switch(this1){case 0:return"Neutral";case 1:return"C3";case 2:return"C4";case 3:return"F4";case 4:return"G2"}return""},alphaTab.model._CrescendoType={},alphaTab.model._CrescendoType.CrescendoType_Impl_=$hx_exports.alphaTab.model._CrescendoType.CrescendoType_Impl_={},alphaTab.model._CrescendoType.CrescendoType_Impl_.__name__=["alphaTab","model","_CrescendoType","CrescendoType_Impl_"],alphaTab.model._CrescendoType.CrescendoType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Crescendo";case 2:return"Decrescendo"}return""},alphaTab.model._Duration={},alphaTab.model._Duration.Duration_Impl_=$hx_exports.alphaTab.model._Duration.Duration_Impl_={},alphaTab.model._Duration.Duration_Impl_.__name__=["alphaTab","model","_Duration","Duration_Impl_"],alphaTab.model._Duration.Duration_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._Duration.Duration_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Duration.Duration_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._Duration.Duration_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._Duration.Duration_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._Duration.Duration_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Duration.Duration_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Duration.Duration_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Duration.Duration_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.toString=function(this1){switch(this1){case-4:return"QuadrupleWhole";case-2:return"DoubleWhole";case 1:return"Whole";case 2:return"Half";case 4:return"Quarter";case 8:return"Eighth";case 16:return"Sixteenth";case 32:return"ThirtySecond";case 64:return"SixtyFourth";case 128:return"OneHundredTwentyEighth";case 256:return"TwoHundredFiftySixth"}return""},alphaTab.model._DynamicValue={},alphaTab.model._DynamicValue.DynamicValue_Impl_=$hx_exports.alphaTab.model._DynamicValue.DynamicValue_Impl_={},alphaTab.model._DynamicValue.DynamicValue_Impl_.__name__=["alphaTab","model","_DynamicValue","DynamicValue_Impl_"],alphaTab.model._DynamicValue.DynamicValue_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.toString=function(this1){switch(this1){case 0:return"PPP";case 1:return"PP";case 2:return"P";case 3:return"MP";case 4:return"MF";case 5:return"F";case 6:return"FF";case 7:return"FFF"}return""},alphaTab.model.Fermata=$hx_exports.alphaTab.model.Fermata=function(){this.Type=0,this.Length=0},alphaTab.model.Fermata.__name__=["alphaTab","model","Fermata"],alphaTab.model.Fermata.CopyTo=function(src,dst){dst.Type=src.Type,dst.Length=src.Length},alphaTab.model.Fermata.prototype={__class__:alphaTab.model.Fermata},alphaTab.model._FermataType={},alphaTab.model._FermataType.FermataType_Impl_=$hx_exports.alphaTab.model._FermataType.FermataType_Impl_={},alphaTab.model._FermataType.FermataType_Impl_.__name__=["alphaTab","model","_FermataType","FermataType_Impl_"],alphaTab.model._FermataType.FermataType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._FermataType.FermataType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.toString=function(this1){switch(this1){case 0:return"Short";case 1:return"Medium";case 2:return"Long"}return""},alphaTab.model._Fingers={},alphaTab.model._Fingers.Fingers_Impl_=$hx_exports.alphaTab.model._Fingers.Fingers_Impl_={},alphaTab.model._Fingers.Fingers_Impl_.__name__=["alphaTab","model","_Fingers","Fingers_Impl_"],alphaTab.model._Fingers.Fingers_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._Fingers.Fingers_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.toString=function(this1){switch(this1){case-2:return"Unknown";case-1:return"NoOrDead";case 0:return"Thumb";case 1:return"IndexFinger";case 2:return"MiddleFinger";case 3:return"AnnularFinger";case 4:return"LittleFinger"}return""},alphaTab.model._GraceType={},alphaTab.model._GraceType.GraceType_Impl_=$hx_exports.alphaTab.model._GraceType.GraceType_Impl_={},alphaTab.model._GraceType.GraceType_Impl_.__name__=["alphaTab","model","_GraceType","GraceType_Impl_"],alphaTab.model._GraceType.GraceType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._GraceType.GraceType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"OnBeat";case 2:return"BeforeBeat";case 3:return"BendGrace"}return""},alphaTab.model._HarmonicType={},alphaTab.model._HarmonicType.HarmonicType_Impl_=$hx_exports.alphaTab.model._HarmonicType.HarmonicType_Impl_={},alphaTab.model._HarmonicType.HarmonicType_Impl_.__name__=["alphaTab","model","_HarmonicType","HarmonicType_Impl_"],alphaTab.model._HarmonicType.HarmonicType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Natural";case 2:return"Artificial";case 3:return"Pinch";case 4:return"Tap";case 5:return"Semi";case 6:return"Feedback"}return""},alphaTab.model.JsonConverter=$hx_exports.alphaTab.model.JsonConverter=function(){},alphaTab.model.JsonConverter.__name__=["alphaTab","model","JsonConverter"],alphaTab.model.JsonConverter.ScoreToJsObject=function(score){var score2={};alphaTab.model.Score.CopyTo(score,score2);score2.MasterBars=[];score2.Tracks=[],score2.Stylesheet={},alphaTab.model.RenderStylesheet.CopyTo(score.Stylesheet,score2.Stylesheet);for(var i=0;i0},get_IsSectionStart:function(){return null!=this.Section},CalculateDuration:function(){return this.TimeSignatureNumerator*alphaTab.audio.MidiUtils.ValueToTicks(this.TimeSignatureDenominator)},AddFermata:function(offset,fermata){this.Fermata[offset]=fermata},GetFermata:function(beat){return this.Fermata.hasOwnProperty(beat.PlaybackStart)?this.Fermata[beat.PlaybackStart]:null},__class__:alphaTab.model.MasterBar},alphaTab.model.ModelUtils=$hx_exports.alphaTab.model.ModelUtils=function(){},alphaTab.model.ModelUtils.__name__=["alphaTab","model","ModelUtils"],alphaTab.model.ModelUtils.GetIndex=function(duration){if(duration<0)return 0;var this1=duration;return system.Convert.ToInt32_Single(Math.log2(this1))},alphaTab.model.ModelUtils.KeySignatureIsFlat=function(ks){return ks<0},alphaTab.model.ModelUtils.KeySignatureIsNatural=function(ks){return 0==ks},alphaTab.model.ModelUtils.KeySignatureIsSharp=function(ks){return ks>0},alphaTab.model.ModelUtils.ApplyPitchOffsets=function(settings,score){for(var i=0;i0?staff.Tuning[staff.Tuning.length-(noteString-1)-1]:0},alphaTab.model.Note.CopyTo=function(src,dst){dst.Id=src.Id,dst.Accentuated=src.Accentuated,dst.Fret=src.Fret,dst.String=src.String,dst.IsHammerPullOrigin=src.IsHammerPullOrigin,dst.IsSlurOrigin=src.IsSlurOrigin,dst.HarmonicValue=src.HarmonicValue,dst.HarmonicType=src.HarmonicType,dst.IsGhost=src.IsGhost,dst.IsLetRing=src.IsLetRing,dst.IsPalmMute=src.IsPalmMute,dst.IsDead=src.IsDead,dst.IsStaccato=src.IsStaccato,dst.SlideType=src.SlideType,dst.Vibrato=src.Vibrato,dst.IsTieOrigin=src.IsTieOrigin,dst.IsTieDestination=src.IsTieDestination,dst.LeftHandFinger=src.LeftHandFinger,dst.RightHandFinger=src.RightHandFinger,dst.IsFingering=src.IsFingering,dst.TrillValue=src.TrillValue,dst.TrillSpeed=src.TrillSpeed,dst.DurationPercent=src.DurationPercent,dst.AccidentalMode=src.AccidentalMode,dst.Dynamic=src.Dynamic,dst.Octave=src.Octave,dst.Tone=src.Tone,dst.Element=src.Element,dst.Variation=src.Variation,dst.BendType=src.BendType,dst.BendStyle=src.BendStyle,dst.IsContinuedBend=src.IsContinuedBend,dst.IsVisible=src.IsVisible},alphaTab.model.Note.NextNoteOnSameLine=function(note){for(var nextBeat=note.Beat.NextBeat;null!=nextBeat&&nextBeat.Voice.Bar.Index<=note.Beat.Voice.Bar.Index+3;){var noteOnString=nextBeat.GetNoteOnString(note.String);if(null!=noteOnString)return noteOnString;nextBeat=nextBeat.NextBeat}return null},alphaTab.model.Note.PreviousNoteOnSameLine=function(note){for(var previousBeat=note.Beat.PreviousBeat;null!=previousBeat&&previousBeat.Voice.Bar.Index>=note.Beat.Voice.Bar.Index-3;){var noteOnString=previousBeat.GetNoteOnString(note.String);if(null!=noteOnString)return noteOnString;previousBeat=previousBeat.PreviousBeat}return null},alphaTab.model.Note.prototype={get_HasBend:function(){return 0!=this.BendType},get_IsStringed:function(){return this.Fret>=0&&this.String>=0},get_IsPiano:function(){return!this.get_IsStringed()&&(this.Octave>=0&&this.Tone>=0)},get_IsPercussion:function(){return!this.get_IsStringed()&&(this.Element>=0&&this.Variation>=0)},get_IsHammerPullDestination:function(){return null!=this.HammerPullOrigin},get_IsSlurDestination:function(){return null!=this.SlurOrigin},get_IsHarmonic:function(){return 0!=this.HarmonicType},get_TrillFret:function(){return this.TrillValue-this.get_StringTuning()},get_IsTrill:function(){return this.TrillValue>=0},get_StringTuning:function(){return this.Beat.Voice.Bar.Staff.Capo+alphaTab.model.Note.GetStringTuning(this.Beat.Voice.Bar.Staff,this.String)},get_RealValue:function(){return this.get_IsPercussion()?alphaTab.rendering.utils.PercussionMapper.MidiFromElementVariation(this):this.get_IsStringed()?1==this.HarmonicType?this.get_HarmonicPitch()+this.get_StringTuning()-this.Beat.Voice.Bar.Staff.TranspositionPitch:this.Fret+this.get_StringTuning()-this.Beat.Voice.Bar.Staff.TranspositionPitch+this.get_HarmonicPitch():this.get_IsPiano()?12*this.Octave+this.Tone-this.Beat.Voice.Bar.Staff.TranspositionPitch:0},get_HarmonicPitch:function(){if(0==this.HarmonicType||!this.get_IsStringed())return 0;var value=this.HarmonicValue;return alphaTab.platform.Platform.IsAlmostEqualTo(value,2.4)?36:alphaTab.platform.Platform.IsAlmostEqualTo(value,2.7)?34:value<3?0:value<=3.5?31:value<=4?28:value<=5?24:value<=6?34:value<=7?19:value<=8.5?36:value<=9?28:value<=10?34:value<=11?0:value<=12?12:value<14?0:value<=15?34:value<=16?28:value<=17?36:value<=18?0:value<=19?19:value<=21?0:value<=22?36:value<=24?24:0},get_DisplayValue:function(){var noteValue=this.get_DisplayValueWithoutBend();return this.get_HasBend()?noteValue+=this.BendPoints[0].Value/2|0:null!=this.BendOrigin?noteValue+=this.BendOrigin.BendPoints[this.BendOrigin.BendPoints.length-1].Value/2|0:this.IsTieDestination&&null!=this.TieOrigin.BendOrigin?noteValue+=this.TieOrigin.BendOrigin.BendPoints[this.TieOrigin.BendOrigin.BendPoints.length-1].Value/2|0:this.Beat.get_HasWhammyBar()?noteValue+=this.Beat.WhammyBarPoints[0].Value/2|0:this.Beat.IsContinuedWhammy&&(noteValue+=this.Beat.PreviousBeat.WhammyBarPoints[this.Beat.PreviousBeat.WhammyBarPoints.length-1].Value/2|0),noteValue},get_DisplayValueWithoutBend:function(){var noteValue=this.get_RealValue();1!=this.HarmonicType&&0!=this.HarmonicType&&(noteValue-=this.get_HarmonicPitch());switch(this.Beat.Ottava){case 0:noteValue-=24;break;case 1:noteValue-=12;break;case 2:break;case 3:noteValue+=12;break;case 4:noteValue+=24}switch(this.Beat.Voice.Bar.ClefOttava){case 0:noteValue-=24;break;case 1:noteValue-=12;break;case 2:break;case 3:noteValue+=12;break;case 4:noteValue+=24}return noteValue-this.Beat.Voice.Bar.Staff.DisplayTranspositionPitch},get_HasQuarterToneOffset:function(){return this.get_HasBend()?this.BendPoints[0].Value%2!=0:null!=this.BendOrigin?this.BendOrigin.BendPoints[this.BendOrigin.BendPoints.length-1].Value%2!=0:this.Beat.get_HasWhammyBar()?this.Beat.WhammyBarPoints[0].Value%2!=0:!!this.Beat.IsContinuedWhammy&&this.Beat.PreviousBeat.WhammyBarPoints[this.Beat.PreviousBeat.WhammyBarPoints.length-1].Value%2!=0},Clone:function(){var n=new alphaTab.model.Note,id=n.Id;alphaTab.model.Note.CopyTo(this,n);for(var i=0,j=this.BendPoints.length;ithis.MaxBendPoint.Value)&&(this.MaxBendPoint=point),0==this.BendType&&(this.BendType=1)},Finish:function(settings){var _gthis=this,nextNoteOnLine=new alphaTab.util.Lazy(function(){return alphaTab.model.Note.NextNoteOnSameLine(_gthis)}),prevNoteOnLine=new alphaTab.util.Lazy(function(){return alphaTab.model.Note.PreviousNoteOnSameLine(_gthis)}),isSongBook=null!=settings&&1==settings.DisplayMode;this.IsTieDestination&&(null==prevNoteOnLine.get_Value()?this.IsTieDestination=!1:(this.TieOrigin=prevNoteOnLine.get_Value(),this.TieOrigin.IsTieOrigin=!0,this.TieOrigin.TieDestination=this,this.Fret=this.TieOrigin.Fret,this.Octave=this.TieOrigin.Octave,this.Tone=this.TieOrigin.Tone,this.TieOrigin.get_HasBend()&&(this.BendOrigin=this.TieOrigin)),isSongBook&&this.TieOrigin.IsLetRing&&(this.IsLetRing=!0)),this.IsLetRing&&(null!=nextNoteOnLine.get_Value()&&nextNoteOnLine.get_Value().IsLetRing?this.LetRingDestination=nextNoteOnLine.get_Value():this.LetRingDestination=this,isSongBook&&this.IsTieDestination&&!this.TieOrigin.get_HasBend()&&(this.IsVisible=!1)),this.IsPalmMute&&(null!=nextNoteOnLine.get_Value()&&nextNoteOnLine.get_Value().IsPalmMute?this.PalmMuteDestination=nextNoteOnLine.get_Value():this.PalmMuteDestination=this),(this.IsHammerPullOrigin||2==this.SlideType)&&(this.IsSlurOrigin=!0,this.SlurDestination=nextNoteOnLine.get_Value(),this.get_IsSlurDestination()?(this.SlurOrigin.SlurDestination=this.SlurDestination,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this.SlurOrigin)):(this.SlurOrigin=this,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this))),this.IsHammerPullOrigin&&(null==nextNoteOnLine.get_Value()?this.IsHammerPullOrigin=!1:(this.HammerPullDestination=nextNoteOnLine.get_Value(),this.HammerPullDestination.HammerPullOrigin=this));switch(this.SlideType){case 1:case 2:this.SlideTarget=nextNoteOnLine.get_Value(),null==this.SlideTarget&&(this.SlideType=0)}if(this.BendPoints.length>0&&1==this.BendType){var isContinuedBend=this.IsContinuedBend=null!=this.TieOrigin&&this.TieOrigin.get_HasBend();if(4==this.BendPoints.length){var origin=this.BendPoints[0],middle1=this.BendPoints[1],middle2=this.BendPoints[2],destination=this.BendPoints[3];middle1.Value==middle2.Value?destination.Value>origin.Value?middle1.Value>destination.Value?this.BendType=4:!isContinuedBend&&origin.Value>0?(this.BendType=7,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):(this.BendType=2,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):destination.Valueorigin.Value?this.BendType=4:origin.Value>0&&!isContinuedBend?(this.BendType=6,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):(this.BendType=5,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):alphaTab.util.Logger.Warning("Model","Unsupported bend type detected, fallback to custom",null)}else if(2==this.BendPoints.length){var origin1=this.BendPoints[0],destination1=this.BendPoints[1];destination1.Value>origin1.Value?!isContinuedBend&&origin1.Value>0?this.BendType=7:this.BendType=2:destination1.Value0},Finish:function(settings){for(var i=0,j=this.Bars.length;i0&&(bar.PreviousBar=bars[bars.length-1],bar.PreviousBar.NextBar=bar),bars.push(bar)},__class__:alphaTab.model.Staff},alphaTab.model._StaffKind={},alphaTab.model._StaffKind.StaffKind_Impl_=$hx_exports.alphaTab.model._StaffKind.StaffKind_Impl_={},alphaTab.model._StaffKind.StaffKind_Impl_.__name__=["alphaTab","model","_StaffKind","StaffKind_Impl_"],alphaTab.model._StaffKind.StaffKind_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.toString=function(this1){switch(this1){case 0:return"Tablature";case 1:return"Score";case 2:return"Percussion";case 3:return"Mixed"}return""},alphaTab.model.Track=$hx_exports.alphaTab.model.Track=function(staveCount){this.Index=0,this.Score=null,this.Staves=null,this.PlaybackInfo=null,this.Color=null,this.Name=null,this.ShortName=null;this.Staves=[],this.EnsureStaveCount(staveCount),this.PlaybackInfo=new alphaTab.model.PlaybackInformation,this.Name="",this.ShortName="",this.Color=new alphaTab.platform.model.Color(200,0,0,255)},alphaTab.model.Track.__name__=["alphaTab","model","Track"],alphaTab.model.Track.CopyTo=function(src,dst){dst.Name=src.Name,dst.ShortName=src.ShortName,dst.Index=src.Index,dst.Color.Raw=src.Color.Raw,dst.Color.RGBA=src.Color.RGBA},alphaTab.model.Track.prototype={EnsureStaveCount:function(staveCount){for(;this.Staves.length10&&(this.ShortName=HxOverrides.substr(this.ShortName,0,10)));for(var i=0,j=this.Staves.length;i=0)for(var beat=staff.Bars[lyric2.StartBar].Voices[0].Beats[0],ci=0;ci=65&&c<=90||c>=97&&c<=122||35==c))return null;note+=String.fromCharCode(c)}++i}if(null==octave||0==octave.length||null==note||0==note.length)return null;var result=new alphaTab.model.TuningParseResult;return result.Octave=alphaTab.platform.Platform.ParseInt(octave)+1,result.Note=note.toLowerCase(),result.NoteValue=alphaTab.model.TuningParser.GetToneForText(result.Note),result},alphaTab.model.TuningParser.GetTuningForText=function(str){var result=alphaTab.model.TuningParser.Parse(str);return null==result?-1:result.get_RealValue()},alphaTab.model.TuningParser.GetToneForText=function(note){var b;switch(note.toLowerCase()){case"a":b=9;break;case"a#":case"bb":b=10;break;case"ab":case"g#":b=8;break;case"b":b=11;break;case"c":b=0;break;case"c#":case"db":b=1;break;case"d":b=2;break;case"e":b=4;break;case"d#":case"eb":b=3;break;case"f":b=5;break;case"g":b=7;break;case"f#":case"gb":b=6;break;default:return 0}return b},alphaTab.model._VibratoType={},alphaTab.model._VibratoType.VibratoType_Impl_=$hx_exports.alphaTab.model._VibratoType.VibratoType_Impl_={},alphaTab.model._VibratoType.VibratoType_Impl_.__name__=["alphaTab","model","_VibratoType","VibratoType_Impl_"],alphaTab.model._VibratoType.VibratoType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Slight";case 2:return"Wide"}return""},alphaTab.model.Voice=$hx_exports.alphaTab.model.Voice=function(){this._beatLookup=null,this.Index=0,this.Bar=null,this.Beats=null,this.IsEmpty=!1;this.Beats=[],this.IsEmpty=!0},alphaTab.model.Voice.__name__=["alphaTab","model","Voice"],alphaTab.model.Voice.CopyTo=function(src,dst){dst.Index=src.Index,dst.IsEmpty=src.IsEmpty},alphaTab.model.Voice.prototype={InsertBeat:function(after,newBeat){newBeat.NextBeat=after.NextBeat,null!=newBeat.NextBeat&&(newBeat.NextBeat.PreviousBeat=newBeat),newBeat.PreviousBeat=after,newBeat.Voice=this,after.NextBeat=newBeat,this.Beats.splice(after.Index+1,0,newBeat)},AddBeat:function(beat){beat.Voice=this,beat.Index=this.Beats.length,this.Beats.push(beat),beat.IsEmpty||(this.IsEmpty=!1)},Chain:function(beat){if(null!=this.Bar)if(beat.Index0?(beat.NextBeat=nextVoice.Beats[0],beat.NextBeat.PreviousBeat=beat):beat.NextBeat.PreviousBeat=beat}},AddGraceBeat:function(beat){if(0!=this.Beats.length){var lastBeat=this.Beats[this.Beats.length-1],index=this.Beats.length-1;-1!=index&&this.Beats.splice(index,1),this.AddBeat(beat),this.AddBeat(lastBeat),this.IsEmpty=!1}else this.AddBeat(beat)},GetBeatAtDisplayStart:function(displayStart){return this._beatLookup.hasOwnProperty(displayStart)?this._beatLookup[displayStart]:null},Finish:function(settings){this._beatLookup={};for(var index=0;index=0&&rect.top<=window.innerHeight&&rect.left+rect.width>=0&&rect.left<=window.innerWidth},alphaTab.platform.javaScript.AlphaTabApi.prototype={get_IsElementVisible:function(){return!(!this.Element.offsetWidth&&!this.Element.offsetHeight)||!!this.Element.getClientRects().length},get_Tracks:function(){var tracks=this.TrackIndexesToTracks(this.TrackIndexes);return 0==tracks.length&&this.Score.Tracks.length>0&&tracks.push(this.Score.Tracks[0]),tracks},GetDataAttributes:function(){var dataAttributes={};if(this.Element.dataset)for(var json=this.Element.dataset,key=HxOverrides.iter(Object.keys(json));key.hasNext();){var key1=key.next(),value=this.Element.dataset[key1];try{var stringValue=value;value=JSON.parse(stringValue)}catch(__e){""==value&&(value=null)}dataAttributes[key1]=value}else for(var i=0;i"),preview.document.body.appendChild(a4);var dualScreenLeft;dualScreenLeft=void 0!==window.ScreenLeft?window.ScreenLeft:window.screen.left;var dualScreenTop;dualScreenTop=void 0!==window.ScreenTop?window.ScreenTop:window.screen.top;var screenWidth;if(void 0!==window.innerWidth)screenWidth=window.innerWidth;else{screenWidth=void 0!==window.document.documentElement.clientWidth?window.document.documentElement.clientWidth:window.screen.width}var screenHeight;if(void 0!==window.innerHeight)screenHeight=window.innerHeight;else{screenHeight=void 0!==window.document.documentElement.clientHeight?window.document.documentElement.clientHeight:window.screen.height}var w=a4.offsetWidth+50,h=window.innerHeight,left=(screenWidth/2|0)-(w/2|0)+dualScreenLeft,top=(screenHeight/2|0)-(h/2|0)+dualScreenTop;preview.resizeTo(w,h),preview.moveTo(left,top),preview.focus();var settings=alphaTab.Settings.get_Defaults();settings.ScriptFile=this.Settings.ScriptFile,settings.FontDirectory=this.Settings.FontDirectory,settings.Scale=.8,settings.StretchForce=.8,settings.DisableLazyLoading=!0,settings.UseWebWorker=!1;var alphaTab1=new alphaTab.platform.javaScript.AlphaTabApi(a4,settings);alphaTab1.Renderer.PostRenderFinished=system._EventAction.EventAction_Impl_.add(alphaTab1.Renderer.PostRenderFinished,function(){alphaTab1._canvasElement.style.height="100%",preview.print()});var tmp=this.get_Tracks();alphaTab1.SetTracks(tmp,!0)},AppendRenderResult:function(result){var _gthis=this;null!=result&&(this._canvasElement.style.width=Std.string(result.TotalWidth)+"px",this._canvasElement.style.height=Std.string(result.TotalHeight)+"px"),null!=result&&null==result.RenderResult||(this._renderResults.push(result),window.setTimeout(function(){for(;_gthis._renderResults.length>0;){var renderResult=_gthis._renderResults[0];if(_gthis._renderResults.splice(0,1),null==renderResult)for(;_gthis._canvasElement.childElementCount>_gthis._totalResultCount;)_gthis._canvasElement.removeChild(_gthis._canvasElement.lastChild);else{var body=renderResult.RenderResult;if("string"==typeof body){var placeholder;if(_gthis._totalResultCount<_gthis._canvasElement.childElementCount?placeholder=_gthis._canvasElement.childNodes.item(_gthis._totalResultCount):(placeholder=window.document.createElement("div"),_gthis._canvasElement.appendChild(placeholder)),placeholder.style.width=Std.string(renderResult.Width)+"px",placeholder.style.height=Std.string(renderResult.Height)+"px",placeholder.style.display="inline-block",alphaTab.platform.javaScript.AlphaTabApi.IsElementInViewPort(placeholder)||_gthis.Settings.DisableLazyLoading){var bodyHtml=body;placeholder.outerHTML=bodyHtml}else placeholder.svg=body,placeholder.setAttribute("data-lazy","true")}else _gthis._totalResultCount<_gthis._canvasElement.childElementCount?_gthis._canvasElement.replaceChild(renderResult.RenderResult,_gthis._canvasElement.childNodes.item(_gthis._totalResultCount)):_gthis._canvasElement.appendChild(renderResult.RenderResult);_gthis._totalResultCount++}}},1))},CreateStyleElement:function(settings){var elementDocument=this.Element.ownerDocument,styleElement=elementDocument.getElementById("alphaTabStyle");if(null==styleElement){var fontDirectory=settings.FontDirectory;(styleElement=elementDocument.createElement("style")).id="alphaTabStyle",styleElement.type="text/css";var css="";css+="@font-face {\r\n",css=(css=(css=(css=(css=(css+=" font-family: 'alphaTab';\r\n")+" src: url('"+fontDirectory+"Bravura.eot');\r\n")+" src: url('"+fontDirectory+"Bravura.eot?#iefix') format('embedded-opentype')\r\n")+" , url('"+fontDirectory+"Bravura.woff') format('woff')\r\n")+" , url('"+fontDirectory+"Bravura.otf') format('opentype')\r\n")+" , url('"+fontDirectory+"Bravura.svg#Bravura') format('svg');\r\n",css+=" font-weight: normal;\r\n",css+=" font-style: normal;\r\n",css+="}\r\n",css+=".alphaTabSurface * {\r\n",css+=" cursor: default;\r\n",css+="}\r\n",css+=".at {\r\n",css+=" font-family: 'alphaTab';\r\n",css+=" speak: none;\r\n",css+=" font-style: normal;\r\n",css+=" font-weight: normal;\r\n",css+=" font-variant: normal;\r\n",css+=" text-transform: none;\r\n",css+=" line-height: 1;\r\n",css+=" line-height: 1;\r\n",css+=" -webkit-font-smoothing: antialiased;\r\n",css+=" -moz-osx-font-smoothing: grayscale;\r\n",css+=" font-size: 34px;\r\n",css+=" overflow: visible !important;\r\n",css+="}\r\n",styleElement.innerHTML=css,elementDocument.getElementsByTagName("head").item(0).appendChild(styleElement),alphaTab.Environment.CheckForFontAvailability()}},Destroy:function(){this.Element.innerHTML="",this.Renderer.Destroy()},Load:function(data){var _gthis=this;this.Element.classList.add("loading");try{data instanceof ArrayBuffer?this.ScoreLoaded(alphaTab.importer.ScoreLoader.LoadScoreFromBytes(new Uint8Array(data),this.Settings),!0):data instanceof Uint8Array?this.ScoreLoaded(alphaTab.importer.ScoreLoader.LoadScoreFromBytes(data,this.Settings),!0):"string"==typeof data&&alphaTab.importer.ScoreLoader.LoadScoreAsync(data,function(s){_gthis.ScoreLoaded(s,!0)},function(e){_gthis.Error("import",e)},this.Settings)}catch(e1){if(e1 instanceof js._Boot.HaxeError&&(e1=e1.val),!js.Boot.__instanceof(e1,system.Exception))throw e1;this.Error("import",e1)}},Tex:function(contents){this.Element.classList.add("loading");try{var parser=new alphaTab.importer.AlphaTexImporter,data=alphaTab.io.ByteBuffer.FromBuffer(alphaTab.platform.Platform.StringToByteArray(contents));parser.Init(data,this.Settings),this.ScoreLoaded(parser.ReadScore(),!0)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;this.Error("import",e)}},SetTracks:function(tracksData,render){null==render&&(render=!0);var tmp;if(tracksData.length){tmp="number"==typeof tracksData[0].Index}else tmp=!1;if(tmp)this.Score=tracksData[0].Score;else{"number"==typeof tracksData.Index&&(this.Score=tracksData.Score)}this.TrackIndexes=this.ParseTracks(tracksData),render&&this.Render()},TrackIndexesToTracks:function(trackIndexes){for(var tracks=[],track=new system.Int32ArrayIterator(trackIndexes);track.hasNext();){var track1=track.next();track1>=0&&track1=0&&tracks.push(value),++i}else{"number"==typeof tracksData.Index&&tracks.push(tracksData.Index.As())}return new Int32Array(tracks)},ScoreLoaded:function(score,render){null==render&&(render=!0),alphaTab.model.ModelUtils.ApplyPitchOffsets(this.Settings,score),this.Score=score,this.LoadMidiForScore(),this.TriggerEvent("loaded",score),render&&this.Render()},Error:function(type,details){alphaTab.util.Logger.Error(type,"An unexpected error occurred",details),this.TriggerEvent("error",{type:type,details:details})},TriggerEvent:function(name,details){if(null!=this.Element){name="alphaTab."+name;var e=window.document.createEvent("CustomEvent");e.initCustomEvent(name,!1,!1,details),this.Element.dispatchEvent(e);var json=window;if(json&&"jQuery"in json){(0,window.jQuery)(this.Element).trigger(name,details)}}},Render:function(){var _gthis=this;if(null!=this.Renderer){var renderAction=null;(renderAction=function(){alphaTab.Environment.IsFontLoaded||"html5"!=_gthis.Settings.Engine?_gthis.Renderer.Render(_gthis.Score,_gthis.TrackIndexes):window.setTimeout(function(){renderAction()},500)})()}},UpdateLayout:function(json){this.Settings.Layout=alphaTab.Settings.LayoutFromJson(json),this.Renderer.UpdateSettings(this.Settings),this.Renderer.Invalidate()},SetupPlayer:function(){var _gthis=this,supportsWebAudio=!!window.ScriptProcessorNode,supportsWebWorkers=!!window.Worker,forceFlash=!!window.ForceFlash,alphaSynthScriptFile=alphaTab.Environment.ScriptFile;supportsWebAudio&&!forceFlash?(alphaTab.util.Logger.Info("Player","Will use webworkers for synthesizing and web audio api for playback",null),this._player=new alphaTab.platform.javaScript.AlphaSynthWebWorkerApi(new alphaTab.platform.javaScript.AlphaSynthWebAudioOutput,alphaSynthScriptFile,this.Settings.LogLevel)):supportsWebWorkers&&(alphaTab.util.Logger.Info("Player","Will use webworkers for synthesizing and flash for playback",null),this._player=new alphaTab.platform.javaScript.AlphaSynthWebWorkerApi(new alphaTab.platform.javaScript.AlphaSynthFlashOutput(alphaSynthScriptFile),alphaSynthScriptFile,this.Settings.LogLevel)),this.Player=this._player,null==this._player?alphaTab.util.Logger.Error("Player","Player requires webworkers and web audio api or flash, browser unsupported",null):(this._player.On("ready",function(){_gthis.LoadSoundFont(_gthis.Settings.SoundFontFile),_gthis.LoadMidiForScore()}),this._player.On("readyForPlayback",function(){_gthis.TriggerEvent("playerReady",null)}),this._player.On("soundFontLoad",function(data){_gthis.TriggerEvent("soundFontLoad",data)}),this._player.On("soundFontLoaded",function(){_gthis.TriggerEvent("soundFontLoaded",null)}),this._player.On("soundFontLoadFailed",function(){_gthis.TriggerEvent("soundFontLoadFailed",null)}),this._player.On("midiLoad",function(data1){_gthis.TriggerEvent("midiLoad",data1)}),this._player.On("midiFileLoaded",function(){_gthis.TriggerEvent("midiFileLoaded",null)}),this._player.On("midiFileLoadFailed",function(){_gthis.TriggerEvent("midiFileLoadFailed",null)}),this._player.On("playerStateChanged",function(data2){_gthis.TriggerEvent("playerStateChanged",data2)}),this._player.On("positionChanged",function(data3){_gthis.TriggerEvent("positionChanged",data3)}),this._player.On("finished",function(data4){_gthis.TriggerEvent("finished",data4)}),this.Settings.EnableCursor&&this.SetupCursor())},LoadMidiForScore:function(){if(null!=this.Player&&null!=this.Score&&this._player.get_IsReady()){alphaTab.util.Logger.Info("AlphaTab","Generating Midi",null);var midiFile=new alphaTab.audio.synth.midi.MidiFile,handler=new alphaTab.audio.generator.AlphaSynthMidiFileHandler(midiFile),generator=new alphaTab.audio.generator.MidiFileGenerator(this.Score,this.Settings,handler);generator.Generate(),this._tickCache=generator.TickLookup,this._player.LoadMidiFile(midiFile)}},DownloadMidi:function(){var midiFile=new alphaTab.audio.synth.midi.MidiFile,handler=new alphaTab.audio.generator.AlphaSynthMidiFileHandler(midiFile);new alphaTab.audio.generator.MidiFileGenerator(this.Score,this.Settings,handler).Generate();var fileName,uint8Array=midiFile.ToBinary(),s=this.Score.Title;fileName=null==s||0==s.length?"File.mid":this.Score.Title+".mid";var dlLink=js.Boot.__cast(window.document.createElement("a"),HTMLAnchorElement);dlLink.download=fileName;var blob=new Blob([uint8Array],{type:"audio/midi"}),url=URL.createObjectURL(blob);dlLink.href=url,dlLink.style.display="none",window.document.body.appendChild(dlLink),dlLink.click(),window.document.body.removeChild(dlLink)},SetTrackVolume:function(tracks,volume){if(null!=this.Player)for(var track=$iterator(this.TrackIndexesToTracks(this.ParseTracks(tracks)))();track.hasNext();){var track1=track.next(),this1=volume;this.Player.SetChannelVolume(track1.PlaybackInfo.PrimaryChannel,this1);var this2=volume;this.Player.SetChannelVolume(track1.PlaybackInfo.SecondaryChannel,this2)}},SetTrackSolo:function(tracks,solo){if(null!=this.Player)for(var track=$iterator(this.TrackIndexesToTracks(this.ParseTracks(tracks)))();track.hasNext();){var track1=track.next();this.Player.SetChannelSolo(track1.PlaybackInfo.PrimaryChannel,solo),this.Player.SetChannelSolo(track1.PlaybackInfo.SecondaryChannel,solo)}},SetTrackMute:function(tracks,mute){if(null!=this.Player)for(var track=$iterator(this.TrackIndexesToTracks(this.ParseTracks(tracks)))();track.hasNext();){var track1=track.next();this.Player.SetChannelMute(track1.PlaybackInfo.PrimaryChannel,mute),this.Player.SetChannelMute(track1.PlaybackInfo.SecondaryChannel,mute)}},LoadSoundFont:function(value){null!=this.Player&&("string"==typeof value?this._player.LoadSoundFontFromUrl(value):this._player.LoadSoundFont(value))},Play:function(){null!=this.Player&&this._player.Play()},Pause:function(){null!=this.Player&&this.Player.Pause()},PlayPause:function(){null!=this.Player&&this.Player.PlayPause()},Stop:function(){null!=this.Player&&(this.Player.Stop(),this.CursorUpdateTick(0,!0))},SetupCursor:function(){var _gthis=this,cursorWrapper=window.document.createElement("div");cursorWrapper.classList.add("cursors");var selectionWrapper=window.document.createElement("div");selectionWrapper.classList.add("selectionWrapper");var barCursor=window.document.createElement("div");barCursor.classList.add("barCursor");var beatCursor=window.document.createElement("div");beatCursor.classList.add("beatCursor");var surface=this.Element.querySelector(".alphaTabSurface");this.Element.style.position="relative",this.Element.style.textAlign="left",cursorWrapper.style.position="absolute",cursorWrapper.style.zIndex="1000",cursorWrapper.style.display="inline",cursorWrapper.style.pointerEvents="none",selectionWrapper.style.position="absolute",barCursor.style.position="absolute",beatCursor.style.position="absolute",beatCursor.style.transition="all 0s linear",this._cursorWrapper=cursorWrapper,this._barCursor=barCursor,this._beatCursor=beatCursor,this._selectionWrapper=selectionWrapper,this.Element.insertBefore(cursorWrapper,this.Element.firstChild),cursorWrapper.appendChild(selectionWrapper),cursorWrapper.appendChild(barCursor),cursorWrapper.appendChild(beatCursor),this._previousTick=0,this._playerState=0,this.Renderer.PostRenderFinished=system._EventAction.EventAction_Impl_.add(this.Renderer.PostRenderFinished,function(){_gthis._cursorCache=_gthis.Renderer.get_BoundsLookup(),_gthis.CursorUpdateTick(_gthis._previousTick,!1);var surfaceSite=surface.getBoundingClientRect();cursorWrapper.style.width=surfaceSite.width+"px",cursorWrapper.style.height=surfaceSite.height+"px"}),this._player.On("positionChanged",function(data){_gthis._previousTick=data.CurrentTick,window.setTimeout(function(){_gthis.CursorUpdateTick(data.CurrentTick,!1)},0)}),this._player.On("playerStateChanged",function(data1){_gthis._playerState=data1.State,window.setTimeout(function(){_gthis.CursorUpdateTick(_gthis._previousTick,!1)},0)}),this.Settings.EnableSeekByClick&&this.SetupClickHandling()},SetupClickHandling:function(){var _gthis=this;this._canvasElement.addEventListener("mousedown",function(e){if(0==e.button){e.preventDefault();var parentOffset=_gthis.GetOffset(_gthis._canvasElement),relX=e.pageX-parentOffset.X,relY=e.pageY-parentOffset.Y,beat=_gthis._cursorCache.GetBeatAtPos(relX,relY);null!=beat&&(_gthis._selectionStart=new alphaTab.platform.javaScript.SelectionInfo(beat),_gthis._selectionEnd=null,_gthis._selecting=!0)}}),this._canvasElement.addEventListener("mousemove",function(e1){if(_gthis._selecting){var parentOffset1=_gthis.GetOffset(_gthis._canvasElement),relX1=e1.pageX-parentOffset1.X,relY1=e1.pageY-parentOffset1.Y,beat1=_gthis._cursorCache.GetBeatAtPos(relX1,relY1);null==beat1||null!=_gthis._selectionEnd&&_gthis._selectionEnd.Beat==beat1||(_gthis._selectionEnd=new alphaTab.platform.javaScript.SelectionInfo(beat1),_gthis.CursorSelectRange(_gthis._selectionStart,_gthis._selectionEnd))}}),this._canvasElement.addEventListener("mouseup",function(e2){if(_gthis._selecting){if(e2.preventDefault(),null!=_gthis._selectionEnd){var startTick=_gthis._selectionStart.Beat.get_AbsoluteDisplayStart();if(_gthis._selectionStart.Beat.get_AbsoluteDisplayStart()0){var beat=cache.FindBeat(tracks,tick);if(null!=beat){var this1=beat.Duration;_gthis.CursorUpdateBeat(beat.CurrentBeat,beat.NextBeat,this1,stop)}}}})},CursorUpdateBeat:function(beat,nextBeat,duration,stop){if(null!=beat){var cache=this._cursorCache;if(null!=cache){var previousBeat=this._currentBeat,previousCache=this._previousCursorCache,previousState=this._previousStateForCursor;if(this._currentBeat=beat,this._previousCursorCache=cache,this._previousStateForCursor=this._playerState,beat!=previousBeat||cache!=previousCache||previousState!=this._playerState){var barCursor=this._barCursor,beatCursor=this._beatCursor,beatBoundings=cache.FindBeat(beat);if(null!=beatBoundings){var barBoundings=beatBoundings.BarBounds.MasterBarBounds,barBounds=barBoundings.VisualBounds;barCursor.style.top=Std.string(barBounds.Y)+"px",barCursor.style.left=Std.string(barBounds.X)+"px",barCursor.style.width=Std.string(barBounds.W)+"px",barCursor.style.height=Std.string(barBounds.H)+"px",beatCursor.style.transition="none",beatCursor.style.top=Std.string(barBounds.Y)+"px",beatCursor.style.left=Std.string(beatBoundings.VisualBounds.X)+"px",beatCursor.style.width=Std.string(this.Settings.BeatCursorWidth)+"px",beatCursor.style.height=Std.string(barBounds.H)+"px";for(var elements=this.Element.getElementsByClassName("atHighlight");elements.length>0;)elements.item(0).classList.remove("atHighlight");if(1==this._playerState||stop){var duration1=this.Player.get_PlaybackSpeed();if(duration/=duration1,!stop){for(var className=alphaTab.rendering.glyphs.BeatContainerGlyph.GetGroupId(beat),elementsToHighlight=this.Element.getElementsByClassName(className),i=0;i=elementRight||barBoundings.VisualBounds.X=0&&(stringSize+=data[code]*size/dataSize),++i}return stringSize*factor},alphaTab.platform.svg.FontSizes.prototype={__class__:alphaTab.platform.svg.FontSizes},alphaTab.platform.svg._SupportedFonts={},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_=$hx_exports.alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_={},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.__name__=["alphaTab","platform","svg","_SupportedFonts","SupportedFonts_Impl_"],alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.toString=function(this1){switch(this1){case 0:return"TimesNewRoman";case 1:return"Arial"}return""},alphaTab.rendering.BarRendererBase=$hx_exports.alphaTab.rendering.BarRendererBase=function(renderer,bar){this._preBeatGlyphs=null,this._voiceContainers=null,this._postBeatGlyphs=null,this.Staff=null,this.X=0,this.Y=0,this.Width=0,this.Height=0,this.Index=0,this.TopOverflow=0,this.BottomOverflow=0,this.Helpers=null,this.Bar=null,this.IsLinkedToPrevious=!1,this.CanWrap=!1,this.ScoreRenderer=null,this._wasFirstOfLine=!1,this.LayoutingInfo=null,this._appliedLayoutingInfo=0,this.IsFinalized=!1,this.TopPadding=0,this.BottomPadding=0,this.Bar=bar,this.ScoreRenderer=renderer,this.Helpers=new alphaTab.rendering.utils.BarHelpers(bar),this.CanWrap=!0},alphaTab.rendering.BarRendererBase.__name__=["alphaTab","rendering","BarRendererBase"],alphaTab.rendering.BarRendererBase.prototype={get_NextRenderer:function(){return null==this.Bar.NextBar?null:this.ScoreRenderer.Layout.GetRendererForBar(this.Staff.get_StaveId(),this.Bar.NextBar)},get_PreviousRenderer:function(){return null==this.Bar.PreviousBar?null:this.ScoreRenderer.Layout.GetRendererForBar(this.Staff.get_StaveId(),this.Bar.PreviousBar)},RegisterOverflowTop:function(topOverflow){topOverflow>this.TopOverflow&&(this.TopOverflow=topOverflow)},RegisterOverflowBottom:function(bottomOverflow){bottomOverflow>this.BottomOverflow&&(this.BottomOverflow=bottomOverflow)},ScaleToWidth:function(width){for(var containerWidth=width-this._preBeatGlyphs.Width-this._postBeatGlyphs.Width,this1=this._voiceContainers,voice=$iterator(Object.keys(this1))();voice.hasNext();){var voice1=voice.next();this._voiceContainers[voice1].ScaleToWidth(containerWidth)}this._postBeatGlyphs.X=this._preBeatGlyphs.X+this._preBeatGlyphs.Width+containerWidth,this.Width=width},get_Resources:function(){return this.ScoreRenderer.RenderingResources},get_Settings:function(){return this.ScoreRenderer.Settings},get_Scale:function(){return this.get_Settings().Scale},get_IsFirstOfLine:function(){return 0==this.Index},get_IsLast:function(){return this.Bar.Index==this.ScoreRenderer.Layout.LastBarIndex},RegisterLayoutingInfo:function(){var info=this.LayoutingInfo,preSize=this._preBeatGlyphs.Width;info.PreBeatSize=this.LayoutingInfo.Version)return!1;this._appliedLayoutingInfo=this.LayoutingInfo.Version,this._preBeatGlyphs.Width=this.LayoutingInfo.PreBeatSize;for(var voiceEnd=this._preBeatGlyphs.X+this._preBeatGlyphs.Width,this1=this._voiceContainers,voice=$iterator(Object.keys(this1))();voice.hasNext();){var voice1=voice.next(),c=this._voiceContainers[voice1];c.X=this._preBeatGlyphs.X+this._preBeatGlyphs.Width,c.ApplyLayoutingInfo(this.LayoutingInfo);var newEnd=c.X+c.Width;voiceEndthis.Height&&(this.Height=glyph.Height)}},CreateOrResizeGlyph:function(sizing,b){var g;switch(sizing){case 0:case 1:case 2:return(g=this.Info.CreateNewGlyph(this.Renderer,b)).Renderer=this.Renderer,g.Beat=b,g.DoLayout(),this._effectGlyphs[b.Voice.Index][b.Index]=g,this._uniqueEffectGlyphs[b.Voice.Index].push(g),g;case 4:case 5:var singleSizing=4==sizing?1:2;if(b.Index>0||this.Renderer.Index>0){var prevBeat=b.PreviousBeat;if(this.Info.ShouldCreateGlyph(this.Renderer.get_Settings(),prevBeat)){var prevEffect=null;if(b.Index>0&&this._effectGlyphs[b.Voice.Index].hasOwnProperty(prevBeat.Index))prevEffect=this._effectGlyphs[b.Voice.Index][prevBeat.Index];else if(this.Renderer.Index>0){var voiceGlyphs=js.Boot.__cast(this.Renderer.get_PreviousRenderer(),alphaTab.rendering.EffectBarRenderer).GetBand(this.Voice,this.Info.get_EffectId())._effectGlyphs[b.Voice.Index];voiceGlyphs.hasOwnProperty(prevBeat.Index)&&(prevEffect=voiceGlyphs[prevBeat.Index])}var newGlyph=this.CreateOrResizeGlyph(singleSizing,b);return null!=prevEffect&&this.Info.CanExpand(prevBeat,b)&&(prevEffect.NextGlyph=newGlyph,newGlyph.PreviousGlyph=prevEffect,this.IsLinkedToPrevious=!0),newGlyph}return this.CreateOrResizeGlyph(singleSizing,b)}return this.CreateOrResizeGlyph(singleSizing,b);case 6:return(g=this.Info.CreateNewGlyph(this.Renderer,b)).Renderer=this.Renderer,g.Beat=b,g.DoLayout(),this._effectGlyphs[b.Voice.Index][b.Index]=g,this._uniqueEffectGlyphs[b.Voice.Index].push(g),g}return null},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.Glyph.prototype.Paint.call(this,cx,cy,canvas);for(var i=0,j=this._uniqueEffectGlyphs.length;ithis.Shared.Height&&(this.Shared.Height=effectBand.Height),(null==this.Shared.FirstBeat||effectBand.FirstBeat.IsBefore(this.Shared.FirstBeat))&&(this.Shared.FirstBeat=effectBand.FirstBeat),(null==this.Shared.LastBeat||effectBand.LastBeat.IsAfter(this.Shared.LastBeat))&&(this.Shared.LastBeat=effectBand.LastBeat)},CanBeUsed:function(band){return!!(null==this.Shared.UniqueEffectId&&band.Info.get_CanShareBand()||band.Info.get_EffectId()==this.Shared.UniqueEffectId)&&(!(null!=this.Shared.FirstBeat&&!this.Shared.LastBeat.IsBefore(band.FirstBeat))||this.Shared.LastBeat.IsBefore(this.Shared.FirstBeat))},__class__:alphaTab.rendering.EffectBandSlot},alphaTab.rendering.EffectBandSlotShared=$hx_exports.alphaTab.rendering.EffectBandSlotShared=function(){this.UniqueEffectId=null,this.Y=0,this.Height=0,this.FirstBeat=null,this.LastBeat=null,this.Y=0,this.Height=0},alphaTab.rendering.EffectBandSlotShared.__name__=["alphaTab","rendering","EffectBandSlotShared"],alphaTab.rendering.EffectBandSlotShared.prototype={__class__:alphaTab.rendering.EffectBandSlotShared},alphaTab.rendering._EffectBarGlyphSizing={},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_=$hx_exports.alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_={},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.__name__=["alphaTab","rendering","_EffectBarGlyphSizing","EffectBarGlyphSizing_Impl_"],alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.toString=function(this1){switch(this1){case 0:return"SinglePreBeat";case 1:return"SingleOnBeat";case 2:return"SingleOnBeatToEnd";case 3:return"GroupedBeforeBeat";case 4:return"GroupedOnBeat";case 5:return"GroupedOnBeatToEnd";case 6:return"FullBar"}return""},alphaTab.rendering.EffectBarRenderer=$hx_exports.alphaTab.rendering.EffectBarRenderer=function(renderer,bar,infos){alphaTab.rendering.BarRendererBase.call(this,renderer,bar),this._infos=null,this._bands=null,this._bandLookup=null,this.SizingInfo=null,this._infos=infos},alphaTab.rendering.EffectBarRenderer.__name__=["alphaTab","rendering","EffectBarRenderer"],alphaTab.rendering.EffectBarRenderer.__super__=alphaTab.rendering.BarRendererBase,alphaTab.rendering.EffectBarRenderer.prototype=$extend(alphaTab.rendering.BarRendererBase.prototype,{UpdateSizes:function(){this.TopOverflow=0,this.BottomOverflow=0,this.TopPadding=0,this.BottomPadding=0,this.UpdateHeight(),alphaTab.rendering.BarRendererBase.prototype.UpdateSizes.call(this)},FinalizeRenderer:function(){alphaTab.rendering.BarRendererBase.prototype.FinalizeRenderer.call(this),this.UpdateHeight()},UpdateHeight:function(){if(null!=this.SizingInfo){for(var y=0,slot=$iterator(this.SizingInfo.Slots)();slot.hasNext();){var slot1=slot.next();slot1.Shared.Y=y;for(var band=$iterator(slot1.Bands)();band.hasNext();){var band1=band.next();band1.Y=y,band1.Height=slot1.Shared.Height}y+=slot1.Shared.Height}this.Height=y}},ApplyLayoutingInfo:function(){if(!alphaTab.rendering.BarRendererBase.prototype.ApplyLayoutingInfo.call(this))return!1;if(this.Index>0){var previousRenderer=js.Boot.__cast(this.get_PreviousRenderer(),alphaTab.rendering.EffectBarRenderer);this.SizingInfo=previousRenderer.SizingInfo}else this.SizingInfo=new alphaTab.rendering.EffectBandSizingInfo;for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){var effectBand1=effectBand.next();effectBand1.AlignGlyphs(),effectBand1.IsEmpty||this.SizingInfo.Register(effectBand1)}return this.UpdateHeight(),!0},ScaleToWidth:function(width){alphaTab.rendering.BarRendererBase.prototype.ScaleToWidth.call(this,width);for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){effectBand.next().AlignGlyphs()}},CreateBeatGlyphs:function(){this._bands=[];this._bandLookup={};for(var voice=$iterator(this.Bar.Voices)();voice.hasNext();){var voice1=voice.next();if(this.HasVoiceContainer(voice1))for(var info=HxOverrides.iter(this._infos);info.hasNext();){var info1=info.next(),band=new alphaTab.rendering.EffectBand(voice1,info1);band.Renderer=this,band.DoLayout(),this._bands.push(band),this._bandLookup[Std.string(voice1.Index)+"."+info1.get_EffectId()]=band}}for(var voice2=$iterator(this.Bar.Voices)();voice2.hasNext();){var voice3=voice2.next();this.HasVoiceContainer(voice3)&&this.CreateVoiceGlyphs(voice3)}for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){effectBand.next().IsLinkedToPrevious&&(this.IsLinkedToPrevious=!0)}},CreateVoiceGlyphs:function(v){for(var b=$iterator(v.Beats)();b.hasNext();){var b1=b.next(),container=new alphaTab.rendering.glyphs.BeatContainerGlyph(b1,this.GetOrCreateVoiceContainer(v));container.PreNotes=new alphaTab.rendering.glyphs.BeatGlyphBase,container.OnNotes=new alphaTab.rendering.glyphs.BeatOnNoteGlyphBase,this.AddBeatGlyph(container);for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){effectBand.next().CreateGlyph(b1)}}},Paint:function(cx,cy,canvas){this.PaintBackground(cx,cy,canvas);for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){var effectBand1=effectBand.next();canvas.set_Color(0==effectBand1.Voice.Index?this.get_Resources().MainGlyphColor:this.get_Resources().SecondaryGlyphColor),effectBand1.IsEmpty||effectBand1.Paint(cx+this.X,cy+this.Y,canvas)}},GetBand:function(voice,effectId){var id=Std.string(voice.Index)+"."+effectId;return this._bandLookup.hasOwnProperty(id)?this._bandLookup[id]:null},__class__:alphaTab.rendering.EffectBarRenderer}),alphaTab.rendering.RenderFinishedEventArgs=$hx_exports.alphaTab.rendering.RenderFinishedEventArgs=function(){this.Width=0,this.Height=0,this.TotalWidth=0,this.TotalHeight=0,this.FirstMasterBarIndex=0,this.LastMasterBarIndex=0,this.RenderResult=null},alphaTab.rendering.RenderFinishedEventArgs.__name__=["alphaTab","rendering","RenderFinishedEventArgs"],alphaTab.rendering.RenderFinishedEventArgs.prototype={__class__:alphaTab.rendering.RenderFinishedEventArgs},alphaTab.rendering.RenderingResources=$hx_exports.alphaTab.rendering.RenderingResources=function(scale){this.CopyrightFont=null,this.TitleFont=null,this.SubTitleFont=null,this.WordsFont=null,this.EffectFont=null,this.TablatureFont=null,this.GraceFont=null,this.StaveLineColor=null,this.BarSeperatorColor=null,this.BarNumberFont=null,this.BarNumberColor=null,this.FingeringFont=null,this.MarkerFont=null,this.TabClefFont=null,this.MainGlyphColor=null,this.SecondaryGlyphColor=null,this.Scale=0,this.ScoreInfoColor=null,this.Init(scale)},alphaTab.rendering.RenderingResources.__name__=["alphaTab","rendering","RenderingResources"],alphaTab.rendering.RenderingResources.prototype={Init:function(scale){this.Scale=scale;this.EffectFont=new alphaTab.platform.model.Font("Georgia",12*scale,2),this.CopyrightFont=new alphaTab.platform.model.Font("Arial",12*scale,1),this.TitleFont=new alphaTab.platform.model.Font("Georgia",32*scale,0),this.SubTitleFont=new alphaTab.platform.model.Font("Georgia",20*scale,0),this.WordsFont=new alphaTab.platform.model.Font("Georgia",15*scale,0),this.TablatureFont=new alphaTab.platform.model.Font("Arial",13*scale,0),this.GraceFont=new alphaTab.platform.model.Font("Arial",11*scale,0),this.StaveLineColor=new alphaTab.platform.model.Color(165,165,165,255),this.BarSeperatorColor=new alphaTab.platform.model.Color(34,34,17,255),this.BarNumberFont=new alphaTab.platform.model.Font("Arial",11*scale,0),this.BarNumberColor=new alphaTab.platform.model.Color(200,0,0,255),this.FingeringFont=new alphaTab.platform.model.Font("Georgia",14*scale,0),this.MarkerFont=new alphaTab.platform.model.Font("Georgia",14*scale,1),this.TabClefFont=new alphaTab.platform.model.Font("Arial",18*scale,1),this.ScoreInfoColor=new alphaTab.platform.model.Color(0,0,0,255),this.MainGlyphColor=new alphaTab.platform.model.Color(0,0,0,255),this.SecondaryGlyphColor=new alphaTab.platform.model.Color(0,0,0,100)},__class__:alphaTab.rendering.RenderingResources},alphaTab.rendering.utils={},alphaTab.rendering.utils.IBeamYCalculator=$hx_exports.alphaTab.rendering.utils.IBeamYCalculator=function(){},alphaTab.rendering.utils.IBeamYCalculator.__name__=["alphaTab","rendering","utils","IBeamYCalculator"],alphaTab.rendering.utils.IBeamYCalculator.prototype={__class__:alphaTab.rendering.utils.IBeamYCalculator},alphaTab.rendering.ScoreBarRenderer=$hx_exports.alphaTab.rendering.ScoreBarRenderer=function(renderer,bar){alphaTab.rendering.BarRendererBase.call(this,renderer,bar),this.SimpleWhammyOverflow=0,this.AccidentalHelper=null,this._startSpacing=!1,this.AccidentalHelper=new alphaTab.rendering.utils.AccidentalHelper(bar)},alphaTab.rendering.ScoreBarRenderer.__name__=["alphaTab","rendering","ScoreBarRenderer"],alphaTab.rendering.ScoreBarRenderer.__interfaces__=[alphaTab.rendering.utils.IBeamYCalculator],alphaTab.rendering.ScoreBarRenderer.PaintSingleBar=function(canvas,x1,y1,x2,y2,size){canvas.BeginPath(),canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2),canvas.LineTo(x2,y2+size),canvas.LineTo(x1,y1+size),canvas.ClosePath(),canvas.Fill()},alphaTab.rendering.ScoreBarRenderer.__super__=alphaTab.rendering.BarRendererBase,alphaTab.rendering.ScoreBarRenderer.prototype=$extend(alphaTab.rendering.BarRendererBase.prototype,{GetBeatDirection:function(beat){var g=js.Boot.__cast(this.GetOnNotesGlyphForBeat(beat),alphaTab.rendering.glyphs.ScoreBeatGlyph);return null!=g?g.NoteHeads.get_Direction():0},GetNoteX:function(note,onEnd){null==onEnd&&(onEnd=!0);var g=js.Boot.__cast(this.GetOnNotesGlyphForBeat(note.Beat),alphaTab.rendering.glyphs.ScoreBeatGlyph);if(null!=g){var x=g.Container.VoiceContainer.X+g.Container.X+g.X;return onEnd&&(x+=g.Width),x}return 0},GetNoteY:function(note,aboveNote){null==aboveNote&&(aboveNote=!1);var beat=js.Boot.__cast(this.GetOnNotesGlyphForBeat(note.Beat),alphaTab.rendering.glyphs.ScoreBeatGlyph);return null!=beat?beat.NoteHeads.GetNoteY(note,aboveNote):0},get_LineOffset:function(){return 9*this.get_Scale()},UpdateSizes:function(){var res=this.get_Resources(),glyphOverflow=res.TablatureFont.Size/2+.2*res.TablatureFont.Size;this.TopPadding=glyphOverflow,this.BottomPadding=glyphOverflow,this.Height=4*this.get_LineOffset()+this.TopPadding+this.BottomPadding,alphaTab.rendering.BarRendererBase.prototype.UpdateSizes.call(this)},DoLayout:function(){if(alphaTab.rendering.BarRendererBase.prototype.DoLayout.call(this),!this.Bar.get_IsEmpty()&&null!=this.AccidentalHelper.MaxNoteValueBeat){var top=this.GetScoreY(0,0),bottom=this.GetScoreY(8,0),whammyOffset=this.SimpleWhammyOverflow;this.RegisterOverflowTop(whammyOffset);var maxNoteY=this.GetYPositionForNoteValue(this.AccidentalHelper.MaxNoteValue),maxNoteHelper=this.Helpers.GetBeamingHelperForBeat(this.AccidentalHelper.MaxNoteValueBeat);if(0==maxNoteHelper.Direction&&(maxNoteY-=this.GetStemSize(maxNoteHelper),maxNoteY-=maxNoteHelper.FingeringCount*this.get_Resources().GraceFont.Size,maxNoteHelper.HasTuplet&&(maxNoteY-=2*this.get_Resources().EffectFont.Size)),maxNoteHelper.HasTuplet){maxNoteY-=1.5*this.get_Resources().EffectFont.Size}maxNoteYbottom&&this.RegisterOverflowBottom(Math.abs(minNoteY)-bottom)}},Paint:function(cx,cy,canvas){alphaTab.rendering.BarRendererBase.prototype.Paint.call(this,cx,cy,canvas),this.PaintBeams(cx,cy,canvas),this.PaintTuplets(cx,cy,canvas)},PaintTuplets:function(cx,cy,canvas){for(var i=0,j=this.Helpers.TupletHelpers.length;i0&&!alphaTab.rendering.utils.BeamingHelper.IsFullBarJoin(beat,h.Beats[i-1],barIndex)&&(barStartX=beatLineX-brokenBarOffset,barEndX=beatLineX,barStartY=barY+this.CalculateBeamY(h,barStartX)*scaleMod,barEndY=barY+this.CalculateBeamY(h,barEndX)*scaleMod,alphaTab.rendering.ScoreBarRenderer.PaintSingleBar(canvas,cx+this.X+barStartX,barStartY,cx+this.X+barEndX,barEndY,barSize));++barIndex}++i}},PaintFooter:function(cx,cy,canvas,h){var beat=h.Beats[0];if(3!=beat.GraceType&&(0==beat.GraceType||1!=this.get_Settings().DisplayMode)){var beamY,fingeringY,isGrace=0!=beat.GraceType,scaleMod=isGrace?.75:1,stemSize=this.GetFooterStemSize(h.ShortestDuration),beatLineX=h.GetBeatLineX(beat)+this.get_Scale(),direction=h.Direction,topY=this.GetYPositionForNoteValue(h.MaxNoteValue),bottomY=this.GetYPositionForNoteValue(h.MinNoteValue);if(1==direction?(beamY=bottomY+=stemSize*scaleMod,fingeringY=cy+this.Y+bottomY):(beamY=topY-=stemSize*scaleMod,fingeringY=cy+this.Y+topY),this.PaintFingering(canvas,beat,cx+this.X+beatLineX,direction,fingeringY),1!=beat.Duration&&-2!=beat.Duration&&-4!=beat.Duration){if(canvas.set_LineWidth(1.3*this.get_Scale()),canvas.BeginPath(),canvas.MoveTo(cx+this.X+beatLineX,cy+this.Y+topY),canvas.LineTo(cx+this.X+beatLineX,cy+this.Y+bottomY),canvas.Stroke(),canvas.set_LineWidth(this.get_Scale()),2==beat.GraceType){var graceSizeY=15*this.get_Scale(),graceSizeX=12*this.get_Scale();canvas.BeginPath(),1==direction?(canvas.MoveTo(cx+this.X+beatLineX-graceSizeX/2,cy+this.Y+bottomY-graceSizeY),canvas.LineTo(cx+this.X+beatLineX+graceSizeX/2,cy+this.Y+bottomY)):(canvas.MoveTo(cx+this.X+beatLineX-graceSizeX/2,cy+this.Y+topY+graceSizeY),canvas.LineTo(cx+this.X+beatLineX+graceSizeX/2,cy+this.Y+topY)),canvas.Stroke()}if(beat.Duration>4||isGrace){var glyph=new alphaTab.rendering.glyphs.BeamGlyph(beatLineX-this.get_Scale()/2,beamY,beat.Duration,direction,isGrace);glyph.Renderer=this,glyph.DoLayout(),glyph.Paint(cx+this.X,cy+this.Y,canvas)}}}},PaintFingering:function(canvas,beat,beatLineX,direction,topY){var settings=this.get_Settings();if(0==settings.FingeringMode){0==direction?beatLineX-=10*this.get_Scale():beatLineX+=3*this.get_Scale();var noteList=beat.Notes.slice(0);noteList.sort(function(a1,b1){return b=b1,a1.get_RealValue()-b.get_RealValue();var b});for(var n=0;n2&&this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.RepeatCountGlyph(0,this.GetScoreY(-1,-3),this.Bar.get_MasterBar().RepeatCount))):this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.BarSeperatorGlyph(0,0))},CreateStartSpacing:function(){this._startSpacing||(this.AddPreBeatGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,2*this.get_Scale())),this._startSpacing=!0)},CreateKeySignatureGlyphs:function(){var offsetClef=0,currentKey=this.Bar.get_MasterBar().KeySignature,previousKey=null==this.Bar.PreviousBar?0:this.Bar.PreviousBar.get_MasterBar().KeySignature;switch(this.Bar.Clef){case 0:offsetClef=0;break;case 1:offsetClef=-1;break;case 2:offsetClef=1;break;case 3:offsetClef=2;break;case 4:offsetClef=1}var newLines={},newGlyphs=[];if(alphaTab.model.ModelUtils.KeySignatureIsSharp(currentKey))for(var i=0;i0&&(lineY+=lineOffset);var tmp=cx+this.X,this1=system.Convert.ToInt32_Single(lineY);canvas.FillRect(tmp,this1,this.Width,this.get_Scale()),++i}canvas.set_Color(res.MainGlyphColor),this.PaintSimileMark(cx,cy,canvas)},__class__:alphaTab.rendering.ScoreBarRenderer}),alphaTab.rendering.glyphs.BeatContainerGlyph=$hx_exports.alphaTab.rendering.glyphs.BeatContainerGlyph=function(beat,voiceContainer){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this.VoiceContainer=null,this.Beat=null,this.PreNotes=null,this.OnNotes=null,this.Ties=null,this.MinWidth=0,this.Beat=beat;this.Ties=[],this.VoiceContainer=voiceContainer},alphaTab.rendering.glyphs.BeatContainerGlyph.__name__=["alphaTab","rendering","glyphs","BeatContainerGlyph"],alphaTab.rendering.glyphs.BeatContainerGlyph.GetGroupId=function(beat){return"b"+beat.Id},alphaTab.rendering.glyphs.BeatContainerGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.BeatContainerGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{get_OnTimeX:function(){return this.OnNotes.X+this.OnNotes.CenterX},RegisterLayoutingInfo:function(layoutings){for(var preBeatStretch=this.get_OnTimeX(),postBeatStretch=0,tie=$iterator(this.Ties)();tie.hasNext();){var tie1=tie.next();tie1.Width>postBeatStretch&&(postBeatStretch=tie1.Width)}postBeatStretch+=this.OnNotes.X+(this.OnNotes.Width-this.OnNotes.CenterX),layoutings.AddBeatSpring(this.Beat,preBeatStretch,postBeatStretch),layoutings.SetPreBeatSize(this.Beat,this.PreNotes.Width),layoutings.SetOnBeatSize(this.Beat,this.OnNotes.Width),layoutings.SetBeatCenterX(this.Beat,this.OnNotes.CenterX)},ApplyLayoutingInfo:function(info){var offset=info.GetBeatCenterX(this.Beat)-this.OnNotes.CenterX;this.PreNotes.X=offset,this.PreNotes.Width=info.GetPreBeatSize(this.Beat),this.OnNotes.Width=info.GetOnBeatSize(this.Beat),this.OnNotes.X=this.PreNotes.X+this.PreNotes.Width,this.OnNotes.UpdateBeamingHelper()},DoLayout:function(){this.PreNotes.X=0,this.PreNotes.Renderer=this.Renderer,this.PreNotes.Container=this,this.PreNotes.DoLayout(),this.OnNotes.X=this.PreNotes.X+this.PreNotes.Width,this.OnNotes.Renderer=this.Renderer,this.OnNotes.Container=this,this.OnNotes.DoLayout();for(var i=this.Beat.Notes.length-1;i>=0;)this.CreateTies(this.Beat.Notes[i--]);this.UpdateWidth()},UpdateWidth:function(){if(this.MinWidth=this.PreNotes.Width+this.OnNotes.Width,!this.Beat.get_IsRest())if(1==this.OnNotes.BeamingHelper.Beats.length)this.Beat.Duration>=8&&(this.MinWidth=this.MinWidth+20*this.get_Scale());else{switch(this.Beat.Duration){case 128:case 256:this.MinWidth=this.MinWidth+10*this.get_Scale()}}for(var tieWidth=0,tie=$iterator(this.Ties)();tie.hasNext();){var tie1=tie.next();tie1.Width>tieWidth&&(tieWidth=tie1.Width)}this.MinWidth=this.MinWidth+tieWidth,this.Width=this.MinWidth},ScaleToWidth:function(beatWidth){for(var tie=$iterator(this.Ties)();tie.hasNext();){tie.next().DoLayout()}this.OnNotes.UpdateBeamingHelper(),this.Width=beatWidth},CreateTies:function(n){},Paint:function(cx,cy,canvas){if(!this.Beat.Voice.IsEmpty){if(!(this.PreNotes.get_IsEmpty()&&this.OnNotes.get_IsEmpty()&&0==this.Ties.length)){canvas.BeginGroup(alphaTab.rendering.glyphs.BeatContainerGlyph.GetGroupId(this.Beat)),this.PreNotes.Paint(cx+this.X,cy+this.Y,canvas),this.OnNotes.Paint(cx+this.X,cy+this.Y,canvas);for(var staffX=cx-this.VoiceContainer.X-this.Renderer.X,staffY=cy-this.VoiceContainer.Y-this.Renderer.Y,i=0,j=this.Ties.length;i=0&&track10&&tracks.push(score.Tracks[0]),this.Tracks=tracks,this.Invalidate()}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;this.OnError("render",e)}},RenderTracks:function(tracks){0==tracks.length?this.Score=null:this.Score=tracks[0].Score,this.Tracks=tracks,this.Invalidate()},UpdateSettings:function(settings){this.Settings=settings},Invalidate:function(){if(0!=this.Settings.Width){if(this.set_BoundsLookup(new alphaTab.rendering.utils.BoundsLookup),0!=this.Tracks.length){this.RecreateCanvas(),this.RenderingResources.Scale!=this.Settings.Scale&&(this.RenderingResources.Init(this.Settings.Scale),this.Canvas.set_LineWidth(this.Settings.Scale)),this.Canvas.set_Resources(this.RenderingResources),alphaTab.util.Logger.Info("Rendering","Rendering "+this.Tracks.length+" tracks",null);for(var i=0;i2&&this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.RepeatCountGlyph(0,this.GetTabY(-.5,-3),this.Bar.get_MasterBar().RepeatCount))):this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.BarSeperatorGlyph(0,0))},GetTabY:function(line,correction){return null==correction&&(correction=0),this.get_LineOffset()*line+correction*this.get_Scale()},PaintBackground:function(cx,cy,canvas){alphaTab.rendering.BarRendererBase.prototype.PaintBackground.call(this,cx,cy,canvas);var res=this.get_Resources();canvas.set_Color(res.StaveLineColor);for(var lineY=cy+this.Y+this.TopPadding,padding=this.get_Scale(),tabNotes=[],i=0,j=this.Bar.Staff.Tuning.length;ib1[0]?1:a1[0]0&&(lineY+=lineOffset);for(var lineX=0,line2=$iterator(tabNotes[i1])();line2.hasNext();){var line3=line2.next(),tmp=cx+this.X+lineX,this4=system.Convert.ToInt32_Single(lineY),tmp1=this.get_Scale();canvas.FillRect(tmp,this4,line3[0]-lineX,tmp1),lineX=line3[0]+line3[1]}var tmp2=cx+this.X+lineX,this5=system.Convert.ToInt32_Single(lineY);canvas.FillRect(tmp2,this5,this.Width-lineX,this.get_Scale()),++i1}canvas.set_Color(res.MainGlyphColor),this.PaintSimileMark(cx,cy,canvas)},Paint:function(cx,cy,canvas){alphaTab.rendering.BarRendererBase.prototype.Paint.call(this,cx,cy,canvas),this.RenderRhythm&&this.PaintBeams(cx,cy,canvas)},PaintBeams:function(cx,cy,canvas){for(var i=0,j=this.Helpers.BeamHelpers.length;i0&&!alphaTab.rendering.utils.BeamingHelper.IsFullBarJoin(beat,h.Beats[i-1],barIndex)&&(barStartX=beatLineX-brokenBarOffset,barEndX=beatLineX,barStartY=barY,barEndY=barY,alphaTab.rendering.TabBarRenderer.PaintSingleBar(canvas,cx+this.X+barStartX,barStartY,cx+this.X+barEndX,barEndY,barSize));++barIndex}}++i}},PaintFooter:function(cx,cy,canvas,h){for(var beat=$iterator(h.Beats)();beat.hasNext();){var beat1=beat.next();if(1==beat1.Duration||-2==beat1.Duration||-4==beat1.Duration)return;var beatLineX=h.GetBeatLineX(beat1),y1=cy+this.Y,y2=cy+this.Y+this.Height,startGlyph=js.Boot.__cast(this.GetOnNotesGlyphForBeat(beat1),alphaTab.rendering.glyphs.TabBeatGlyph);if(null==startGlyph.NoteNumbers?y1+=this.Height-this.RhythmHeight:y1+=startGlyph.NoteNumbers.GetNoteY(startGlyph.NoteNumbers.MinStringNote,!1)+this.get_LineOffset()/2,0==h.Direction){beatLineX-=startGlyph.Width/2}else{beatLineX+=startGlyph.Width/2}if(canvas.BeginPath(),canvas.MoveTo(cx+this.X+beatLineX,y1),canvas.LineTo(cx+this.X+beatLineX,y2),canvas.Stroke(),beat1.Duration>4){var glyph=new alphaTab.rendering.glyphs.BeamGlyph(0,0,beat1.Duration,1,!1);glyph.Renderer=this,glyph.DoLayout(),glyph.Paint(cx+this.X+beatLineX,y2,canvas)}}},__class__:alphaTab.rendering.TabBarRenderer}),alphaTab.rendering.glyphs.EffectGlyph=$hx_exports.alphaTab.rendering.glyphs.EffectGlyph=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this.Beat=null,this.NextGlyph=null,this.PreviousGlyph=null,this.Height=0},alphaTab.rendering.glyphs.EffectGlyph.__name__=["alphaTab","rendering","glyphs","EffectGlyph"],alphaTab.rendering.glyphs.EffectGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.EffectGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{__class__:alphaTab.rendering.glyphs.EffectGlyph}),alphaTab.rendering.glyphs.MusicFontGlyph=$hx_exports.alphaTab.rendering.glyphs.MusicFontGlyph=function(x,y,glyphScale,symbol){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y),this.GlyphScale=0,this.Symbol=-1,this.GlyphScale=glyphScale,this.Symbol=symbol},alphaTab.rendering.glyphs.MusicFontGlyph.__name__=["alphaTab","rendering","glyphs","MusicFontGlyph"],alphaTab.rendering.glyphs.MusicFontGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.MusicFontGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{Paint:function(cx,cy,canvas){canvas.FillMusicFontSymbol(cx+this.X,cy+this.Y,this.GlyphScale*this.get_Scale(),this.Symbol)},__class__:alphaTab.rendering.glyphs.MusicFontGlyph}),alphaTab.rendering.glyphs.AccentuationGlyph=$hx_exports.alphaTab.rendering.glyphs.AccentuationGlyph=function(x,y,accentuation){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.AccentuationGlyph.GetSymbol(accentuation))},alphaTab.rendering.glyphs.AccentuationGlyph.__name__=["alphaTab","rendering","glyphs","AccentuationGlyph"],alphaTab.rendering.glyphs.AccentuationGlyph.GetSymbol=function(accentuation){switch(accentuation){case 0:return-1;case 1:return 58528;case 2:return 58540;default:return-1}},alphaTab.rendering.glyphs.AccentuationGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.AccentuationGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*this.get_Scale()},__class__:alphaTab.rendering.glyphs.AccentuationGlyph}),alphaTab.rendering.glyphs.AccidentalGlyph=$hx_exports.alphaTab.rendering.glyphs.AccidentalGlyph=function(x,y,accidentalType,isGrace){null==isGrace&&(isGrace=!1),alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,alphaTab.rendering.glyphs.AccidentalGlyph.GetMusicSymbol(accidentalType)),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.AccidentalGlyph.__name__=["alphaTab","rendering","glyphs","AccidentalGlyph"],alphaTab.rendering.glyphs.AccidentalGlyph.GetMusicSymbol=function(accidentalType){switch(accidentalType){case 1:return 57953;case 2:return 57954;case 3:return 57952;case 4:return 57970;case 5:return 57972;case 6:return 57968}return-1},alphaTab.rendering.glyphs.AccidentalGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.AccidentalGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=8*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.AccidentalGlyph}),alphaTab.rendering.glyphs.GlyphGroup=$hx_exports.alphaTab.rendering.glyphs.GlyphGroup=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this.Glyphs=null},alphaTab.rendering.glyphs.GlyphGroup.__name__=["alphaTab","rendering","glyphs","GlyphGroup"],alphaTab.rendering.glyphs.GlyphGroup.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.GlyphGroup.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{get_IsEmpty:function(){return null==this.Glyphs||0==this.Glyphs.length},DoLayout:function(){if(null!=this.Glyphs&&0!=this.Glyphs.length){for(var w=0,i=0,j=this.Glyphs.length;ib.Y?1:0;var a,b});var columns=[];columns.push(-3e3);for(var accidentalSize=21*this.get_Scale(),i=0,j=this.Glyphs.length;ig.Y;)if(++gColumn==columns.length){columns.push(-3e3)}var this4=gColumn;g.X=this4,columns[gColumn]=g.Y+accidentalSize,++i}var columnWidth=8*this.get_Scale(),padding=2*this.get_Scale();0==this.Glyphs.length?this.Width=0:this.Width=padding+columnWidth*columns.length;for(var i1=0,j1=this.Glyphs.length;i10){var res=this.Renderer.get_Resources();canvas.set_Font(res.WordsFont),canvas.MoveTo(cx+this.X,cy+this.Y+this.Height),canvas.LineTo(cx+this.X,cy+this.Y),canvas.LineTo(cx+this.X+this.Width,cy+this.Y),canvas.Stroke(),canvas.FillText(this._endingsString,cx+this.X+3*this.get_Scale(),cy+this.Y*this.get_Scale())}},__class__:alphaTab.rendering.glyphs.AlternateEndingsGlyph}),alphaTab.rendering.glyphs.BarNumberGlyph=$hx_exports.alphaTab.rendering.glyphs.BarNumberGlyph=function(x,y,number){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this._number=0,this._number=number},alphaTab.rendering.glyphs.BarNumberGlyph.__name__=["alphaTab","rendering","glyphs","BarNumberGlyph"],alphaTab.rendering.glyphs.BarNumberGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.BarNumberGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().BarNumberFont),this.Width=this.Renderer.ScoreRenderer.Canvas.MeasureText(Std.string(this._number))+5*this.get_Scale()},Paint:function(cx,cy,canvas){if(this.Renderer.Staff.IsFirstInAccolade){var res=this.Renderer.get_Resources(),c=canvas.get_Color();canvas.set_Color(res.BarNumberColor),canvas.set_Font(res.BarNumberFont),canvas.FillText(Std.string(this._number),cx+this.X,cy+this.Y),canvas.set_Color(c)}},__class__:alphaTab.rendering.glyphs.BarNumberGlyph}),alphaTab.rendering.glyphs.BarSeperatorGlyph=$hx_exports.alphaTab.rendering.glyphs.BarSeperatorGlyph=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y)},alphaTab.rendering.glyphs.BarSeperatorGlyph.__name__=["alphaTab","rendering","glyphs","BarSeperatorGlyph"],alphaTab.rendering.glyphs.BarSeperatorGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.BarSeperatorGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Renderer.get_IsLast()?this.Width=15*this.get_Scale():null!=this.Renderer.get_NextRenderer()&&this.Renderer.get_NextRenderer().Staff==this.Renderer.Staff&&this.Renderer.get_NextRenderer().Bar.get_MasterBar().IsRepeatStart?this.Width=2*this.get_Scale():(this.Width=2*this.get_Scale(),this.Renderer.Bar.get_MasterBar().IsDoubleBar&&(this.Width=this.Width+2*this.get_Scale()))},Paint:function(cx,cy,canvas){var blockWidth=4*this.get_Scale(),top=cy+this.Y+this.Renderer.TopPadding,bottom=cy+this.Y+this.Renderer.Height-this.Renderer.BottomPadding,left=system.Convert.ToInt32_Single(cx+this.X),h=bottom-top;this.Renderer.get_IsLast()?(canvas.FillRect(left+this.Width-blockWidth-blockWidth,top,this.get_Scale(),h),canvas.FillRect(left+this.Width-blockWidth,top,blockWidth,h)):null!=this.Renderer.get_NextRenderer()&&this.Renderer.get_NextRenderer().Staff==this.Renderer.Staff&&this.Renderer.get_NextRenderer().Bar.get_MasterBar().IsRepeatStart||(canvas.FillRect(left+this.Width-this.get_Scale(),top,this.get_Scale(),h),this.Renderer.Bar.get_MasterBar().IsDoubleBar&&canvas.FillRect(left+this.Width-5*this.get_Scale(),top,this.get_Scale(),h))},__class__:alphaTab.rendering.glyphs.BarSeperatorGlyph}),alphaTab.rendering.glyphs.BeamGlyph=$hx_exports.alphaTab.rendering.glyphs.BeamGlyph=function(x,y,duration,direction,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,alphaTab.rendering.glyphs.BeamGlyph.GetSymbol(duration,direction,isGrace))},alphaTab.rendering.glyphs.BeamGlyph.__name__=["alphaTab","rendering","glyphs","BeamGlyph"],alphaTab.rendering.glyphs.BeamGlyph.GetSymbol=function(duration,direction,isGrace){if(isGrace&&(duration=8),0==direction)switch(duration){case 8:return 57920;case 16:return 57922;case 32:return 57924;case 64:return 57926;case 128:return 57928;case 256:return 57930;default:return 57920}else switch(duration){case 8:return 57921;case 16:return 57923;case 32:return 57925;case 64:return 57927;case 128:case 256:return 57929;default:return 57921}},alphaTab.rendering.glyphs.BeamGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.BeamGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=0},__class__:alphaTab.rendering.glyphs.BeamGlyph}),alphaTab.rendering.glyphs.BeatGlyphBase=$hx_exports.alphaTab.rendering.glyphs.BeatGlyphBase=function(){alphaTab.rendering.glyphs.GlyphGroup.call(this,0,0),this.Container=null},alphaTab.rendering.glyphs.BeatGlyphBase.__name__=["alphaTab","rendering","glyphs","BeatGlyphBase"],alphaTab.rendering.glyphs.BeatGlyphBase.__super__=alphaTab.rendering.glyphs.GlyphGroup,alphaTab.rendering.glyphs.BeatGlyphBase.prototype=$extend(alphaTab.rendering.glyphs.GlyphGroup.prototype,{DoLayout:function(){var w=0;if(null!=this.Glyphs)for(var i=0,j=this.Glyphs.length;i=0;)action(this.Container.Beat.Notes[i]),--i},__class__:alphaTab.rendering.glyphs.BeatGlyphBase}),alphaTab.rendering.glyphs.BeatOnNoteGlyphBase=$hx_exports.alphaTab.rendering.glyphs.BeatOnNoteGlyphBase=function(){alphaTab.rendering.glyphs.BeatGlyphBase.call(this),this.BeamingHelper=null,this.CenterX=0,this.CenterX=0},alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.__name__=["alphaTab","rendering","glyphs","BeatOnNoteGlyphBase"],alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.__super__=alphaTab.rendering.glyphs.BeatGlyphBase,alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.prototype=$extend(alphaTab.rendering.glyphs.BeatGlyphBase.prototype,{UpdateBeamingHelper:function(){},__class__:alphaTab.rendering.glyphs.BeatOnNoteGlyphBase}),alphaTab.rendering.glyphs.GroupedEffectGlyph=$hx_exports.alphaTab.rendering.glyphs.GroupedEffectGlyph=function(endPosition){alphaTab.rendering.glyphs.EffectGlyph.call(this,0,0),this.EndPosition=0,this.ForceGroupedRendering=!1,this.EndOnBarLine=!1,this.EndPosition=endPosition},alphaTab.rendering.glyphs.GroupedEffectGlyph.__name__=["alphaTab","rendering","glyphs","GroupedEffectGlyph"],alphaTab.rendering.glyphs.GroupedEffectGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{get_IsLinkedWithPrevious:function(){return null!=this.PreviousGlyph&&this.PreviousGlyph.Renderer.Staff.StaveGroup==this.Renderer.Staff.StaveGroup},get_IsLinkedWithNext:function(){return!(null==this.NextGlyph||!this.NextGlyph.Renderer.IsFinalized)&&this.NextGlyph.Renderer.Staff.StaveGroup==this.Renderer.Staff.StaveGroup},Paint:function(cx,cy,canvas){if(!this.get_IsLinkedWithPrevious())if(this.get_IsLinkedWithNext()||this.ForceGroupedRendering){var lastLinkedGlyph;if(!this.get_IsLinkedWithNext()&&this.ForceGroupedRendering)lastLinkedGlyph=this;else for(lastLinkedGlyph=js.Boot.__cast(this.NextGlyph,alphaTab.rendering.glyphs.GroupedEffectGlyph);lastLinkedGlyph.get_IsLinkedWithNext();)lastLinkedGlyph=js.Boot.__cast(lastLinkedGlyph.NextGlyph,alphaTab.rendering.glyphs.GroupedEffectGlyph);var endBeatRenderer=lastLinkedGlyph.Renderer,endBeat=lastLinkedGlyph.Beat,position=this.EndPosition,cxRenderer=cx-this.Renderer.X,endX=this.CalculateEndX(endBeatRenderer,endBeat,cxRenderer,position);this.PaintGrouped(cx,cy,endX,canvas)}else this.PaintNonGrouped(cx,cy,canvas)},CalculateEndX:function(endBeatRenderer,endBeat,cx,endPosition){return null==endBeat?cx+endBeatRenderer.X+this.X+this.Width:cx+endBeatRenderer.X+endBeatRenderer.GetBeatX(endBeat,endPosition)},PaintNonGrouped:function(cx,cy,canvas){var cxRenderer=cx-this.Renderer.X,endX=this.CalculateEndX(this.Renderer,this.Beat,cxRenderer,this.EndPosition);this.PaintGrouped(cx,cy,endX,canvas)},PaintGrouped:function(cx,cy,endX,canvas){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.rendering.glyphs.GroupedEffectGlyph}),alphaTab.rendering.glyphs.BeatVibratoGlyph=$hx_exports.alphaTab.rendering.glyphs.BeatVibratoGlyph=function(type){alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,4),this._type=0,this._stepSize=0,this._type=type},alphaTab.rendering.glyphs.BeatVibratoGlyph.__name__=["alphaTab","rendering","glyphs","BeatVibratoGlyph"],alphaTab.rendering.glyphs.BeatVibratoGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.BeatVibratoGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this);switch(this._type){case 1:this._stepSize=12*this.get_Scale();break;case 2:this._stepSize=23*this.get_Scale()}this.Height=18*this.get_Scale()},PaintGrouped:function(cx,cy,endX,canvas){var startX=cx+this.X,width=endX-startX,loops=system.Convert.ToInt32_Single(Math.max(1,width/this._stepSize));canvas.BeginPath(),canvas.MoveTo(startX,cy+this.Y);for(var i=0;iinfo.Line)&&(this.MinNote=info),(null==this.MaxNote||this.MaxNote.Line8},DoLayout:function(){this._infos.sort(function(a1,b1){return a=a1,b=b1,system._Int32.Int32_Impl_.CompareTo_Int32(b.Line,a.Line);var a,b});for(var displacedX=0,lastDisplaced=!1,lastLine=0,anyDisplaced=!1,direction=this.get_Direction(),w=0,i=0,j=this._infos.length;i=this.MinNote.Line;){var this1=l,lY=cy+scoreRenderer.GetScoreY(this1,0);canvas.FillRect(cx-linePadding+this.NoteStartX,lY,lineWidth,this.get_Scale()),l-=2}canvas.set_Color(color)}if(this.get_HasBottomOverflow()){var color1=canvas.get_Color();canvas.set_Color(this.Renderer.ScoreRenderer.RenderingResources.StaveLineColor);for(var l1=12;l1<=this.MaxNote.Line;){var this2=l1,lY1=cy+scoreRenderer.GetScoreY(this2,0);canvas.FillRect(cx-linePadding+this.NoteStartX,lY1,lineWidth,this.get_Scale()),l1+=2}canvas.set_Color(color1)}for(var infos=this._infos,x=cx+this._noteHeadPadding,g=$iterator(infos)();g.hasNext();){var g1=g.next();g1.Glyph.Renderer=this.Renderer,g1.Glyph.Paint(x,cy,canvas)}},__class__:alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase}),alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph=$hx_exports.alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph=function(beat,showParenthesis){null==showParenthesis&&(showParenthesis=!1),alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.call(this),this._beat=null,this._showParenthesis=!1,this._noteValueLookup=null,this._accidentals=null,this._preNoteParenthesis=null,this._postNoteParenthesis=null,this.IsEmpty=!1,this.NoteHeadOffset=0,this._beat=beat,this._showParenthesis=showParenthesis,this.IsEmpty=!0,this._accidentals=new alphaTab.rendering.glyphs.AccidentalGroupGlyph;this._noteValueLookup={},showParenthesis&&(this._preNoteParenthesis=new alphaTab.rendering.glyphs.GhostNoteContainerGlyph(!0),this._postNoteParenthesis=new alphaTab.rendering.glyphs.GhostNoteContainerGlyph(!1))},alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.__name__=["alphaTab","rendering","glyphs","BendNoteHeadGroupGlyph"],alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.__super__=alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase,alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.prototype=$extend(alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.prototype,{get_Direction:function(){return 0},GetNoteValueY:function(noteValue,aboveNote){return null==aboveNote&&(aboveNote=!1),this._noteValueLookup.hasOwnProperty(noteValue)?this.Y+this._noteValueLookup[noteValue].Y+(aboveNote?-6.75*this.get_Scale()/2:0):0},ContainsNoteValue:function(noteValue){return this._noteValueLookup.hasOwnProperty(noteValue)},GetNoteX:function(noteValue,onMiddle){if(null==onMiddle&&(onMiddle=!0),this._noteValueLookup.hasOwnProperty(noteValue)){var n=this._noteValueLookup[noteValue],pos=this.X+n.X;if(onMiddle){pos+=n.Width/2}return pos}return 0},AddGlyph:function(noteValue,quarterBend){null==quarterBend&&(quarterBend=!1);var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),noteHeadGlyph=new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,!0),accidental=sr.AccidentalHelper.ApplyAccidentalForValue(this._beat,noteValue,quarterBend),line=sr.AccidentalHelper.GetNoteLineForValue(noteValue,!1),this1=line;noteHeadGlyph.Y=sr.GetScoreY(this1,0),this._showParenthesis&&(this._preNoteParenthesis.Renderer=this.Renderer,this._postNoteParenthesis.Renderer=this.Renderer,this._preNoteParenthesis.AddParenthesisOnLine(line,!0),this._postNoteParenthesis.AddParenthesisOnLine(line,!0)),0!=accidental&&this._accidentals.AddGlyph(new alphaTab.rendering.glyphs.AccidentalGlyph(0,noteHeadGlyph.Y,accidental,!0)),this._noteValueLookup[noteValue]=noteHeadGlyph,this.Add(noteHeadGlyph,line),this.IsEmpty=!1},DoLayout:function(){var x=0;if(this._showParenthesis&&(this._preNoteParenthesis.X=x,this._preNoteParenthesis.Renderer=this.Renderer,this._preNoteParenthesis.DoLayout(),x+=this._preNoteParenthesis.Width+2*this.get_Scale()),this._accidentals.get_IsEmpty()||(this._accidentals.X=x,this._accidentals.Renderer=this.Renderer,this._accidentals.DoLayout(),x+=this._accidentals.Width+2*this.get_Scale()),this.NoteStartX=x,alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.prototype.DoLayout.call(this),this.NoteHeadOffset=this.NoteStartX+(this.Width-this.NoteStartX)/2,this._showParenthesis){var tmp=this.Width,tmp1=this.get_Scale();this._postNoteParenthesis.X=tmp+2*tmp1,this._postNoteParenthesis.Renderer=this.Renderer,this._postNoteParenthesis.DoLayout(),this.Width=this.Width+(this._postNoteParenthesis.Width+2*this.get_Scale())}},Paint:function(cx,cy,canvas){this._accidentals.get_IsEmpty()?this._showParenthesis&&this._preNoteParenthesis.X:this._accidentals.X,this._accidentals.get_IsEmpty()||this._accidentals.Paint(cx+this.X,cy+this.Y,canvas),this._showParenthesis&&(this._preNoteParenthesis.Paint(cx+this.X,cy+this.Y,canvas),this._postNoteParenthesis.Paint(cx+this.X,cy+this.Y,canvas)),alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.prototype.Paint.call(this,cx,cy,canvas)},__class__:alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph}),alphaTab.rendering.glyphs.ChineseCymbalGlyph=$hx_exports.alphaTab.rendering.glyphs.ChineseCymbalGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57564),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.ChineseCymbalGlyph.__name__=["alphaTab","rendering","glyphs","ChineseCymbalGlyph"],alphaTab.rendering.glyphs.ChineseCymbalGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.ChineseCymbalGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.ChineseCymbalGlyph}),alphaTab.rendering.glyphs.CircleGlyph=$hx_exports.alphaTab.rendering.glyphs.CircleGlyph=function(x,y,size){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this._size=0,this._size=size},alphaTab.rendering.glyphs.CircleGlyph.__name__=["alphaTab","rendering","glyphs","CircleGlyph"],alphaTab.rendering.glyphs.CircleGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.CircleGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=this._size+3*this.get_Scale()},Paint:function(cx,cy,canvas){canvas.FillCircle(cx+this.X,cy+this.Y,this._size)},__class__:alphaTab.rendering.glyphs.CircleGlyph}),alphaTab.rendering.glyphs.ClefGlyph=$hx_exports.alphaTab.rendering.glyphs.ClefGlyph=function(x,y,clef,clefOttava){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.ClefGlyph.GetSymbol(clef)),this._clef=0,this._clefOttava=0,this._clef=clef,this._clefOttava=clefOttava},alphaTab.rendering.glyphs.ClefGlyph.__name__=["alphaTab","rendering","glyphs","ClefGlyph"],alphaTab.rendering.glyphs.ClefGlyph.GetSymbol=function(clef){switch(clef){case 0:return 57449;case 1:case 2:return 57436;case 3:return 57442;case 4:return 57424;default:return-1}},alphaTab.rendering.glyphs.ClefGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.ClefGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){switch(this._clef){case 0:this.Width=15*this.get_Scale();break;case 1:case 2:case 3:case 4:this.Width=28*this.get_Scale()}},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.MusicFontGlyph.prototype.Paint.call(this,cx,cy,canvas);var numberGlyph,top=!1;switch(this._clefOttava){case 0:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-4*this.get_Scale(),0,.5,58644),top=!0;break;case 1:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-2*this.get_Scale(),0,.5,58640),top=!0;break;case 3:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-6*this.get_Scale(),0,.5,58640);break;case 4:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-8*this.get_Scale(),0,.5,58644);break;default:return}var offsetY,offsetX;switch(this._clef){case 0:offsetY=top?-12:15,offsetX=0;break;case 1:case 2:offsetY=top?-19:27,offsetX=0;break;case 3:offsetY=top?-9:27,offsetX=-4;break;case 4:offsetY=top?-37:30,offsetX=0;break;default:return}numberGlyph.Renderer=this.Renderer,numberGlyph.DoLayout();var x=this.Width/2;numberGlyph.Paint(cx+this.X+x+offsetX*this.get_Scale(),cy+this.Y+offsetY*this.get_Scale(),canvas)},__class__:alphaTab.rendering.glyphs.ClefGlyph}),alphaTab.rendering.glyphs.CrescendoGlyph=$hx_exports.alphaTab.rendering.glyphs.CrescendoGlyph=function(x,y,crescendo){alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,4),this._crescendo=0,this._crescendo=crescendo,this.X=x,this.Y=y},alphaTab.rendering.glyphs.CrescendoGlyph.__name__=["alphaTab","rendering","glyphs","CrescendoGlyph"],alphaTab.rendering.glyphs.CrescendoGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.CrescendoGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this),this.Height=17*this.get_Scale()},PaintGrouped:function(cx,cy,endX,canvas){var startX=cx+this.X,height=this.Height*this.get_Scale();canvas.BeginPath(),1==this._crescendo?(endX-=4*this.get_Scale(),canvas.MoveTo(endX,cy+this.Y),canvas.LineTo(startX,cy+this.Y+height/2),canvas.LineTo(endX,cy+this.Y+height)):(endX-=4*this.get_Scale(),canvas.MoveTo(startX,cy+this.Y),canvas.LineTo(endX,cy+this.Y+height/2),canvas.LineTo(startX,cy+this.Y+height)),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.CrescendoGlyph}),alphaTab.rendering.glyphs.DeadNoteHeadGlyph=$hx_exports.alphaTab.rendering.glyphs.DeadNoteHeadGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57514),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.DeadNoteHeadGlyph.__name__=["alphaTab","rendering","glyphs","DeadNoteHeadGlyph"],alphaTab.rendering.glyphs.DeadNoteHeadGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DeadNoteHeadGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.DeadNoteHeadGlyph}),alphaTab.rendering.glyphs.DiamondNoteHeadGlyph=$hx_exports.alphaTab.rendering.glyphs.DiamondNoteHeadGlyph=function(x,y,duration,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.GetSymbol(duration)),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.__name__=["alphaTab","rendering","glyphs","DiamondNoteHeadGlyph"],alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.GetSymbol=function(duration){switch(duration){case-4:case-2:case 1:case 2:return 57566;default:return 57564}},alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.DiamondNoteHeadGlyph}),alphaTab.rendering.glyphs.DigitGlyph=$hx_exports.alphaTab.rendering.glyphs.DigitGlyph=function(x,y,digit,scale){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,scale,alphaTab.rendering.glyphs.DigitGlyph.GetSymbol(digit)),this._digit=0,this._scale=0,this._digit=digit,this._scale=scale},alphaTab.rendering.glyphs.DigitGlyph.__name__=["alphaTab","rendering","glyphs","DigitGlyph"],alphaTab.rendering.glyphs.DigitGlyph.GetSymbol=function(digit){switch(digit){case 0:return 57472;case 1:return 57473;case 2:return 57474;case 3:return 57475;case 4:return 57476;case 5:return 57477;case 6:return 57478;case 7:return 57479;case 8:return 57480;case 9:return 57481;default:return-1}},alphaTab.rendering.glyphs.DigitGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DigitGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Y=this.Y+7*this.get_Scale(),this.Width=this.GetDigitWidth(this._digit)*this.get_Scale()*this._scale},GetDigitWidth:function(digit){switch(digit){case 1:return 10;case 0:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:return 14;default:return 0}},__class__:alphaTab.rendering.glyphs.DigitGlyph}),alphaTab.rendering.glyphs.DrumSticksGlyph=$hx_exports.alphaTab.rendering.glyphs.DrumSticksGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57513),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.DrumSticksGlyph.__name__=["alphaTab","rendering","glyphs","DrumSticksGlyph"],alphaTab.rendering.glyphs.DrumSticksGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DrumSticksGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.DrumSticksGlyph}),alphaTab.rendering.glyphs.DynamicsGlyph=$hx_exports.alphaTab.rendering.glyphs.DynamicsGlyph=function(x,y,dynamics){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,.6,alphaTab.rendering.glyphs.DynamicsGlyph.GetSymbol(dynamics))},alphaTab.rendering.glyphs.DynamicsGlyph.__name__=["alphaTab","rendering","glyphs","DynamicsGlyph"],alphaTab.rendering.glyphs.DynamicsGlyph.GetSymbol=function(dynamics){switch(dynamics){case 0:return 58666;case 1:return 58667;case 2:return 58656;case 3:return 58668;case 4:return 58669;case 5:return 58658;case 6:return 58671;case 7:return 58672;default:return-1}},alphaTab.rendering.glyphs.DynamicsGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DynamicsGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.MusicFontGlyph.prototype.DoLayout.call(this),this.Height=17*this.get_Scale(),this.Y=this.Y+this.Height/2},__class__:alphaTab.rendering.glyphs.DynamicsGlyph}),alphaTab.rendering.glyphs.FadeInGlyph=$hx_exports.alphaTab.rendering.glyphs.FadeInGlyph=function(x,y){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y)},alphaTab.rendering.glyphs.FadeInGlyph.__name__=["alphaTab","rendering","glyphs","FadeInGlyph"],alphaTab.rendering.glyphs.FadeInGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.FadeInGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=17*this.get_Scale()},Paint:function(cx,cy,canvas){var size=6*this.get_Scale(),width=Math.max(this.Width,14*this.get_Scale()),offset=this.Height/2;canvas.BeginPath(),canvas.MoveTo(cx+this.X,cy+this.Y+offset),canvas.QuadraticCurveTo(cx+this.X+width/2,cy+this.Y+offset,cx+this.X+width,cy+this.Y+offset-size),canvas.MoveTo(cx+this.X,cy+this.Y+offset),canvas.QuadraticCurveTo(cx+this.X+width/2,cy+this.Y+offset,cx+this.X+width,cy+this.Y+offset+size),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.FadeInGlyph}),alphaTab.rendering.glyphs.FermataGlyph=$hx_exports.alphaTab.rendering.glyphs.FermataGlyph=function(x,y,fermata){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.FermataGlyph.GetSymbol(fermata))},alphaTab.rendering.glyphs.FermataGlyph.__name__=["alphaTab","rendering","glyphs","FermataGlyph"],alphaTab.rendering.glyphs.FermataGlyph.GetSymbol=function(accentuation){switch(accentuation){case 0:return 58564;case 1:return 58560;case 2:return 58566;default:return-1}},alphaTab.rendering.glyphs.FermataGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.FermataGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=23*this.get_Scale(),this.Height=12*this.get_Scale()},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.MusicFontGlyph.prototype.Paint.call(this,cx-this.Width/2,cy+this.Height,canvas)},__class__:alphaTab.rendering.glyphs.FermataGlyph}),alphaTab.rendering.glyphs.GhostNoteContainerGlyph=$hx_exports.alphaTab.rendering.glyphs.GhostNoteContainerGlyph=function(isOpen){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._isOpen=!1,this._infos=null,this._glyphs=null,this.IsEmpty=!1,this._isOpen=isOpen;this._infos=[];this._glyphs=[],this.IsEmpty=!0},alphaTab.rendering.glyphs.GhostNoteContainerGlyph.__name__=["alphaTab","rendering","glyphs","GhostNoteContainerGlyph"],alphaTab.rendering.glyphs.GhostNoteContainerGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.GhostNoteContainerGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{AddParenthesis:function(n){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),line=sr.GetNoteLine(n),hasParenthesis=n.IsGhost||this.IsTiedBend(n)&&sr.get_Settings().ShowParenthesisForTiedBends;this.AddParenthesisOnLine(line,hasParenthesis)},AddParenthesisOnLine:function(line,hasParenthesis){var info=new alphaTab.rendering.glyphs.GhostNoteInfo(line,hasParenthesis);this._infos.push(info),hasParenthesis&&(this.IsEmpty=!1)},IsTiedBend:function(note){return!!note.IsTieDestination&&(!!note.TieOrigin.get_HasBend()||this.IsTiedBend(note.TieOrigin))},DoLayout:function(){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer);this._infos.sort(function(a1,b1){return a=a1,b=b1,system._Int32.Int32_Impl_.CompareTo_Int32(a.Line,b.Line);var a,b});for(var previousGlyph=null,sizePerLine=sr.GetScoreY(1,0),i=0,j=this._infos.length;i0?this._glyphs[0].Width:0},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.Glyph.prototype.Paint.call(this,cx,cy,canvas);for(var g=$iterator(this._glyphs)();g.hasNext();){g.next().Paint(cx+this.X,cy+this.Y,canvas)}},__class__:alphaTab.rendering.glyphs.GhostNoteContainerGlyph}),alphaTab.rendering.glyphs.GhostNoteInfo=$hx_exports.alphaTab.rendering.glyphs.GhostNoteInfo=function(line,isGhost){this.Line=0,this.IsGhost=!1,this.Line=line,this.IsGhost=isGhost},alphaTab.rendering.glyphs.GhostNoteInfo.__name__=["alphaTab","rendering","glyphs","GhostNoteInfo"],alphaTab.rendering.glyphs.GhostNoteInfo.prototype={__class__:alphaTab.rendering.glyphs.GhostNoteInfo},alphaTab.rendering.glyphs.GhostParenthesisGlyph=$hx_exports.alphaTab.rendering.glyphs.GhostParenthesisGlyph=function(isOpen){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._isOpen=!1,this.Height=0,this._isOpen=isOpen},alphaTab.rendering.glyphs.GhostParenthesisGlyph.__name__=["alphaTab","rendering","glyphs","GhostParenthesisGlyph"],alphaTab.rendering.glyphs.GhostParenthesisGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.GhostParenthesisGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.Glyph.prototype.DoLayout.call(this),this.Width=6*this.get_Scale()},Paint:function(cx,cy,canvas){if(this._isOpen){alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),cx+this.X+this.Width,cy+this.Y+this.Height,cx+this.X+this.Width,cy+this.Y,!1,6,3)}else{alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),cx+this.X,cy+this.Y,cx+this.X,cy+this.Y+this.Height,!1,6,3)}canvas.Fill()},__class__:alphaTab.rendering.glyphs.GhostParenthesisGlyph}),alphaTab.rendering.glyphs.HiHatGlyph=$hx_exports.alphaTab.rendering.glyphs.HiHatGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57523),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.HiHatGlyph.__name__=["alphaTab","rendering","glyphs","HiHatGlyph"],alphaTab.rendering.glyphs.HiHatGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.HiHatGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.HiHatGlyph}),alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup=$hx_exports.alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup=function(){alphaTab.rendering.glyphs.GlyphGroup.call(this,0,0);this.Glyphs=[]},alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup.__name__=["alphaTab","rendering","glyphs","LeftToRightLayoutingGlyphGroup"],alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup.__super__=alphaTab.rendering.glyphs.GlyphGroup,alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup.prototype=$extend(alphaTab.rendering.glyphs.GlyphGroup.prototype,{AddGlyph:function(g){g.X=0==this.Glyphs.length?0:this.Glyphs[this.Glyphs.length-1].X+this.Glyphs[this.Glyphs.length-1].Width,g.Renderer=this.Renderer,g.DoLayout(),this.Width=g.X+g.Width,alphaTab.rendering.glyphs.GlyphGroup.prototype.AddGlyph.call(this,g)},__class__:alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup}),alphaTab.rendering.glyphs.LineRangedGlyph=$hx_exports.alphaTab.rendering.glyphs.LineRangedGlyph=function(label){alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,1),this._label=null,this._label=label},alphaTab.rendering.glyphs.LineRangedGlyph.__name__=["alphaTab","rendering","glyphs","LineRangedGlyph"],alphaTab.rendering.glyphs.LineRangedGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.LineRangedGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){this.Renderer.get_Settings().ExtendLineEffectsToBeatEnd&&(this.EndPosition=4,this.ForceGroupedRendering=!0),alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this),this.Height=this.Renderer.get_Resources().EffectFont.Size},PaintNonGrouped:function(cx,cy,canvas){var res=this.Renderer.get_Resources();canvas.set_Font(res.EffectFont);var x=canvas.get_TextAlign();canvas.set_TextAlign(1),canvas.FillText(this._label,cx+this.X,cy+this.Y),canvas.set_TextAlign(x)},PaintGrouped:function(cx,cy,endX,canvas){this.PaintNonGrouped(cx,cy,canvas);var lineSpacing=3*this.get_Scale(),textWidth=canvas.MeasureText(this._label),startX=cx+this.X+textWidth/2+lineSpacing,lineY=cy+this.Y+4*this.get_Scale(),lineSize=8*this.get_Scale();if(endX>startX){for(var lineX=startX;lineX=0&&(this._noteString=HxOverrides.substr(this._noteString,0,i+2)),this._noteString="<"+this._noteString+">"}if(n.get_IsTrill())this._trillNoteString="("+(n.get_TrillFret()-n.Beat.Voice.Bar.Staff.TranspositionPitch)+")";else if(alphaTab.platform.Platform.IsAlmostEqualTo(n.HarmonicValue,0))this._trillNoteString="";else{switch(n.HarmonicType){case 2:case 3:case 4:case 5:case 6:var s=Std.string(fret+n.HarmonicValue),this5=system.Convert.ToUInt16(46),i1=s.indexOf(String.fromCharCode(this5));i1>=0&&(s=HxOverrides.substr(s,0,i1+2)),this._trillNoteString="<"+s+">";break;default:this._trillNoteString=""}}var s1=this._noteString;if(this.IsEmpty=null==s1||0==s1.length,!this.IsEmpty){this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().TablatureFont),this.Width=this.NoteStringWidth=this.Renderer.ScoreRenderer.Canvas.MeasureText(this._noteString),this.Height=this.Renderer.ScoreRenderer.Canvas.get_Font().Size;var s2=this._trillNoteString;!(null==s2||0==s2.length)&&(this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().GraceFont),this._trillNoteStringWidth=3*this.get_Scale()+this.Renderer.ScoreRenderer.Canvas.MeasureText(this._trillNoteString),this.Width=this.Width+this._trillNoteStringWidth)}},Paint:function(cx,cy,canvas){if(!this.IsEmpty){var textWidth=this.NoteStringWidth+this._trillNoteStringWidth,x=cx+this.X+(this.Width-textWidth)/2;this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().GraceFont),canvas.FillText(this._trillNoteString,x+this.NoteStringWidth+3*this.get_Scale(),cy+this.Y),this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().TablatureFont),canvas.FillText(this._noteString,x,cy+this.Y)}},__class__:alphaTab.rendering.glyphs.NoteNumberGlyph}),alphaTab.rendering.glyphs.NoteVibratoGlyph=$hx_exports.alphaTab.rendering.glyphs.NoteVibratoGlyph=function(x,y,type,scale){null==scale&&(scale=1.2),alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,4),this._type=0,this._scale=0,this._symbol=-1,this._symbolSize=0,this._symbolOffset=0,this._type=type,this._scale=scale,this.X=x,this.Y=y},alphaTab.rendering.glyphs.NoteVibratoGlyph.__name__=["alphaTab","rendering","glyphs","NoteVibratoGlyph"],alphaTab.rendering.glyphs.NoteVibratoGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.NoteVibratoGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this);var symbolHeight=0;switch(this._type){case 1:this._symbol=60068,this._symbolSize=8.5*this._scale,this._symbolOffset=10*this._scale,symbolHeight=6*this._scale;break;case 2:this._symbol=60126,this._symbolSize=10*this._scale,this._symbolOffset=7*this._scale,symbolHeight=10*this._scale}this.Height=symbolHeight*this.get_Scale()},PaintGrouped:function(cx,cy,endX,canvas){for(var width=endX-(cx+this.X),step=this._symbolSize*this.get_Scale(),loops=system.Convert.ToInt32_Single(Math.max(1,width/step)),loopX=0,i=0;i0;){var num=i%10,gl=new alphaTab.rendering.glyphs.DigitGlyph(0,0,num,this._scale);this.AddGlyph(gl),i=i/10|0}this.Glyphs.reverse();for(var cx=0,j=0,k=this.Glyphs.length;jstartX){for(var lineX=startX;lineX0){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i1=0;i10){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i=0;i=67||alphaTab.rendering.glyphs.ScoreBeatGlyph.NormalKeys.hasOwnProperty(value)?new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,isGrace):alphaTab.rendering.glyphs.ScoreBeatGlyph.XKeys.hasOwnProperty(value)?new alphaTab.rendering.glyphs.DrumSticksGlyph(0,0,isGrace):46==value?new alphaTab.rendering.glyphs.HiHatGlyph(0,0,isGrace):49==value||57==value?new alphaTab.rendering.glyphs.DiamondNoteHeadGlyph(0,0,n.Beat.Duration,isGrace):52==value?new alphaTab.rendering.glyphs.ChineseCymbalGlyph(0,0,isGrace):51==value||53==value||59==value?new alphaTab.rendering.glyphs.RideCymbalGlyph(0,0,isGrace):new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,isGrace)}return n.IsDead?new alphaTab.rendering.glyphs.DeadNoteHeadGlyph(0,0,isGrace):3==n.Beat.GraceType?new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,!0):1==n.HarmonicType?new alphaTab.rendering.glyphs.DiamondNoteHeadGlyph(0,0,n.Beat.Duration,isGrace):new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,n.Beat.Duration,isGrace)},CreateNoteGlyph:function(n){if(3!=n.Beat.GraceType||n.get_HasBend()){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),noteHeadGlyph=this.CreateNoteHeadGlyph(n),line=sr.GetNoteLine(n),this1=line;if(noteHeadGlyph.Y=sr.GetScoreY(this1,0),this.NoteHeads.AddNoteGlyph(noteHeadGlyph,n,line),0!=n.HarmonicType&&1!=n.HarmonicType){var harmonicFret=n.get_DisplayValue()+n.get_HarmonicPitch();noteHeadGlyph=new alphaTab.rendering.glyphs.DiamondNoteHeadGlyph(0,0,n.Beat.Duration,0!=this.Container.Beat.GraceType);var this2=line=sr.AccidentalHelper.GetNoteLineForValue(harmonicFret,!1);noteHeadGlyph.Y=sr.GetScoreY(this2,0),this.NoteHeads.AddNoteGlyph(noteHeadGlyph,n,line)}n.IsStaccato&&!this.NoteHeads.BeatEffects.hasOwnProperty("Staccato")&&(this.NoteHeads.BeatEffects.Staccato=new alphaTab.rendering.glyphs.CircleGlyph(0,0,1.5)),1!=n.Accentuated||this.NoteHeads.BeatEffects.hasOwnProperty("Accent")||(this.NoteHeads.BeatEffects.Accent=new alphaTab.rendering.glyphs.AccentuationGlyph(0,0,1)),2!=n.Accentuated||this.NoteHeads.BeatEffects.hasOwnProperty("HAccent")||(this.NoteHeads.BeatEffects.HAccent=new alphaTab.rendering.glyphs.AccentuationGlyph(0,0,2))}},__class__:alphaTab.rendering.glyphs.ScoreBeatGlyph}),alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph=function(){alphaTab.rendering.glyphs.BeatGlyphBase.call(this)},alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph.__name__=["alphaTab","rendering","glyphs","ScoreBeatPreNotesGlyph"],alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph.__super__=alphaTab.rendering.glyphs.BeatGlyphBase,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph.prototype=$extend(alphaTab.rendering.glyphs.BeatGlyphBase.prototype,{get_PrebendNoteHeadOffset:function(){return this._prebends.X+this._prebends.NoteHeadOffset},DoLayout:function(){if(!this.Container.Beat.get_IsRest()){var accidentals=new alphaTab.rendering.glyphs.AccidentalGroupGlyph,ghost=new alphaTab.rendering.glyphs.GhostNoteContainerGlyph(!0);ghost.Renderer=this.Renderer,this._prebends=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(this.Container.Beat,!0),this._prebends.Renderer=this.Renderer;for(var note=$iterator(this.Container.Beat.Notes)();note.hasNext();){var note1=note.next();if(note1.IsVisible){if(note1.get_HasBend()){switch(note1.BendType){case 6:case 7:case 8:this._prebends.AddGlyph(note1.get_DisplayValue()-(note1.BendPoints[0].Value/2|0),!1)}}else if(note1.Beat.get_HasWhammyBar()){switch(note1.Beat.WhammyBarType){case 5:case 6:this._prebends.AddGlyph(note1.get_DisplayValue()-(note1.Beat.WhammyBarPoints[0].Value/2|0),!1)}}this.CreateAccidentalGlyph(note1,accidentals),ghost.AddParenthesis(note1)}}this._prebends.IsEmpty||(this.AddGlyph(this._prebends),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*(0!=this.Container.Beat.GraceType?.75:1)*this.get_Scale()))),0!=this.Container.Beat.BrushType&&(this.AddGlyph(new alphaTab.rendering.glyphs.ScoreBrushGlyph(this.Container.Beat)),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*this.get_Scale()))),ghost.IsEmpty||(this.AddGlyph(ghost),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*(0!=this.Container.Beat.GraceType?.75:1)*this.get_Scale()))),accidentals.get_IsEmpty()||(this.AddGlyph(accidentals),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*(0!=this.Container.Beat.GraceType?.75:1)*this.get_Scale())))}alphaTab.rendering.glyphs.BeatGlyphBase.prototype.DoLayout.call(this)},CreateAccidentalGlyph:function(n,accidentals){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),accidental=sr.AccidentalHelper.ApplyAccidental(n),noteLine=sr.GetNoteLine(n),isGrace=0!=this.Container.Beat.GraceType;if(0!=accidental){var this1=noteLine;accidentals.AddGlyph(new alphaTab.rendering.glyphs.AccidentalGlyph(0,sr.GetScoreY(this1,0),accidental,isGrace))}if(0!=n.HarmonicType&&1!=n.HarmonicType){var harmonicFret=n.get_DisplayValue()+n.get_HarmonicPitch();accidental=sr.AccidentalHelper.ApplyAccidentalForValue(n.Beat,harmonicFret,isGrace);var this2=noteLine=sr.AccidentalHelper.GetNoteLineForValue(harmonicFret,!1);accidentals.AddGlyph(new alphaTab.rendering.glyphs.AccidentalGlyph(0,sr.GetScoreY(this2,0),accidental,isGrace))}},__class__:alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph}),alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph=function(){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._bendNoteHeads=null;this._bendNoteHeads=[]},alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.__name__=["alphaTab","rendering","glyphs","ScoreHelperNotesBaseGlyph"],alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DrawBendSlur:function(canvas,x1,y1,x2,y2,down,scale,slurText){var normalVectorX=y2-y1,normalVectorY=x2-x1,this1=normalVectorX*normalVectorX+normalVectorY*normalVectorY,length=js.Boot.__cast(Math.sqrt(this1),Float);down?normalVectorX*=-1:normalVectorY*=-1,normalVectorX/=length,normalVectorY/=length;var offset=11*scale;x2-x1<20&&(offset/=2);var cp1X=(x2+x1)/2+offset*normalVectorX,cp1Y=(y2+y1)/2+offset*normalVectorY;if(canvas.BeginPath(),canvas.MoveTo(x1,y1),canvas.LineTo(cp1X,cp1Y),canvas.LineTo(x2,y2),canvas.Stroke(),null!=slurText&&0!=slurText.length){var w=canvas.MeasureText(slurText),textOffset=down?0:-canvas.get_Font().Size;canvas.FillText(slurText,cp1X-w/2,cp1Y+textOffset)}},DoLayout:function(){alphaTab.rendering.glyphs.Glyph.prototype.DoLayout.call(this),this.Width=0;for(var noteHeads=$iterator(this._bendNoteHeads)();noteHeads.hasNext();){var noteHeads1=noteHeads.next();noteHeads1.DoLayout(),this.Width=this.Width+(noteHeads1.Width+10*this.get_Scale())}},GetBeamDirection:function(beat,noteRenderer){return 0==noteRenderer.GetBeatDirection(beat)?1:0},__class__:alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph}),alphaTab.rendering.glyphs.ScoreBendGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreBendGlyph=function(beat){alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.call(this),this._beat=null,this._notes=null,this._endNoteGlyph=null,this._middleNoteGlyph=null,this._beat=beat;this._notes=[],this._middleNoteGlyph=null,this._endNoteGlyph=null},alphaTab.rendering.glyphs.ScoreBendGlyph.__name__=["alphaTab","rendering","glyphs","ScoreBendGlyph"],alphaTab.rendering.glyphs.ScoreBendGlyph.__super__=alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph,alphaTab.rendering.glyphs.ScoreBendGlyph.prototype=$extend(alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.prototype,{AddBends:function(note){if(this._notes.push(note),!note.IsTieOrigin){switch(note.BendType){case 3:if(!note.IsTieOrigin){var endGlyphs=this._endNoteGlyph;null==endGlyphs&&((endGlyphs=this._endNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(endGlyphs));var lastBendPoint=note.BendPoints[note.BendPoints.length-1];endGlyphs.AddGlyph(this.GetBendNoteValue(note,lastBendPoint),lastBendPoint.Value%2!=0)}break;case 4:var middleGlyphs=this._middleNoteGlyph;null==middleGlyphs&&((middleGlyphs=this._middleNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(middleGlyphs));var middleBendPoint=note.BendPoints[1];middleGlyphs.AddGlyph(this.GetBendNoteValue(note,note.BendPoints[1]),middleBendPoint.Value%2!=0);var endGlyphs1=this._endNoteGlyph;null==endGlyphs1&&((endGlyphs1=this._endNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(endGlyphs1));var lastBendPoint1=note.BendPoints[note.BendPoints.length-1];endGlyphs1.AddGlyph(this.GetBendNoteValue(note,lastBendPoint1),lastBendPoint1.Value%2!=0);break;case 2:case 7:case 8:var endGlyphs2=this._endNoteGlyph;null==endGlyphs2&&((endGlyphs2=this._endNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(endGlyphs2));var lastBendPoint2=note.BendPoints[note.BendPoints.length-1];endGlyphs2.AddGlyph(this.GetBendNoteValue(note,lastBendPoint2),lastBendPoint2.Value%2!=0)}}},Paint:function(cx,cy,canvas){var startNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._beat.Voice.Bar),startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,2),endBeatX=cx+startNoteRenderer.X;this._beat.get_IsLastOfVoice()?endBeatX+=startNoteRenderer.get_PostBeatGlyphsStart():endBeatX+=startNoteRenderer.GetBeatX(this._beat.NextBeat,0);var middleX=(startX+(endBeatX-=7*this.get_Scale()))/2;null!=this._middleNoteGlyph&&(this._middleNoteGlyph.X=middleX-this._middleNoteGlyph.NoteHeadOffset,this._middleNoteGlyph.Y=cy+startNoteRenderer.Y,this._middleNoteGlyph.Paint(0,0,canvas)),null!=this._endNoteGlyph&&(this._endNoteGlyph.X=endBeatX-this._endNoteGlyph.NoteHeadOffset,this._endNoteGlyph.Y=cy+startNoteRenderer.Y,this._endNoteGlyph.Paint(0,0,canvas));this._notes.sort(function(a1,b1){return a=a1,b1.get_DisplayValue()-a.get_DisplayValue();var a});for(var directionBeat=3==this._beat.GraceType?this._beat.NextBeat:this._beat,direction=1==this._notes.length?this.GetBeamDirection(directionBeat,startNoteRenderer):0,i=0;i0&&i>=(this._notes.length/2|0)&&(direction=1);var startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(note,!0),heightOffset=9*this.get_Scale()*.75*.5;1==direction&&(startY+=9*this.get_Scale());var slurText=1==note.BendStyle?"grad.":"";if(note.IsTieOrigin){var endNote=note.TieDestination,endNoteRenderer=null==endNote?null:this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endNote.Beat.Voice.Bar);if(null==endNoteRenderer||endNoteRenderer.Staff!=startNoteRenderer.Staff){var endX=cx+startNoteRenderer.X+startNoteRenderer.Width,noteValueToDraw=note.TieDestination.get_RealValue(),endY=(startNoteRenderer.AccidentalHelper.ApplyAccidentalForValue(note.Beat,noteValueToDraw,!1),cy+startNoteRenderer.Y),this2=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(noteValueToDraw,!1),endY1=endY+startNoteRenderer.GetScoreY(this2,0);5==note.BendType||6==note.BendType?(alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY1,1==direction,22,4),canvas.Fill()):this.DrawBendSlur(canvas,startX,startY,endX,endY1,1==direction,this.get_Scale(),slurText)}else{var endX1=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endNote.Beat,2),endY2=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(endNote,!0);1==direction&&(endY2+=9*this.get_Scale()),5==note.BendType||6==note.BendType?(alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX1,endY2,1==direction,22,4),canvas.Fill()):this.DrawBendSlur(canvas,startX,startY,endX1,endY2,1==direction,this.get_Scale(),slurText)}switch(note.BendType){case 6:case 7:case 8:var preX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(note.Beat,0);preX+=js.Boot.__cast(startNoteRenderer.GetBeatContainer(note.Beat).PreNotes,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph).get_PrebendNoteHeadOffset();var preY=cy+startNoteRenderer.Y,this3=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(note.get_DisplayValue()-(note.BendPoints[0].Value/2|0),!1),preY1=preY+startNoteRenderer.GetScoreY(this3,0)+heightOffset;this.DrawBendSlur(canvas,preX,preY1,startX,startY,1==direction,this.get_Scale(),null)}}else{0==direction&&(heightOffset=-heightOffset);var endValue,endY3;switch(note.BendType){case 2:endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._endNoteGlyph.GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endBeatX,endY3,1==direction,this.get_Scale(),slurText);break;case 3:this._bendNoteHeads.length>0&&(endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endBeatX,endY3,1==direction,this.get_Scale(),slurText));break;case 4:var middleValue=this.GetBendNoteValue(note,note.BendPoints[1]),middleY=this._middleNoteGlyph.GetNoteValueY(middleValue,!1)+heightOffset;this.DrawBendSlur(canvas,startX,startY,middleX,middleY,1==direction,this.get_Scale(),slurText),endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._endNoteGlyph.GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,middleX,middleY,endBeatX,endY3,1==direction,this.get_Scale(),slurText);break;case 6:case 7:case 8:var preX1=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(note.Beat,0);preX1+=js.Boot.__cast(startNoteRenderer.GetBeatContainer(note.Beat).PreNotes,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph).get_PrebendNoteHeadOffset();var preY2=cy+startNoteRenderer.Y,this4=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(note.get_DisplayValue()-(note.BendPoints[0].Value/2|0),!1),preY3=preY2+startNoteRenderer.GetScoreY(this4,0)+heightOffset;this.DrawBendSlur(canvas,preX1,preY3,startX,startY,1==direction,this.get_Scale(),null),this._bendNoteHeads.length>0&&(endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endBeatX,endY3,1==direction,this.get_Scale(),slurText))}}++i}},GetBendNoteValue:function(note,bendPoint){return note.get_DisplayValueWithoutBend()+(bendPoint.Value/2|0)},__class__:alphaTab.rendering.glyphs.ScoreBendGlyph}),alphaTab.rendering.glyphs.ScoreBrushGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreBrushGlyph=function(beat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._beat=null,this._beat=beat},alphaTab.rendering.glyphs.ScoreBrushGlyph.__name__=["alphaTab","rendering","glyphs","ScoreBrushGlyph"],alphaTab.rendering.glyphs.ScoreBrushGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.ScoreBrushGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=10*this.get_Scale()},Paint:function(cx,cy,canvas){var scoreBarRenderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),lineSize=scoreBarRenderer.get_LineOffset(),startY=cy+this.Y+(scoreBarRenderer.GetNoteY(this._beat.MaxNote,!1)-lineSize),endY=cy+this.Y+scoreBarRenderer.GetNoteY(this._beat.MinNote,!1)+lineSize,arrowX=cx+this.X+this.Width/2,arrowSize=8*this.get_Scale();if(0!=this._beat.BrushType)if(3==this._beat.BrushType){var lineStartY=startY-arrowSize,lineEndY=endY-arrowSize;canvas.BeginRotate(cx+this.X+2*this.get_Scale(),lineEndY,-90);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=Math.abs(lineEndY-lineStartY),glyph.Paint(0,0,canvas),canvas.EndRotate(),canvas.BeginPath(),canvas.MoveTo(arrowX,endY),canvas.LineTo(arrowX+arrowSize/2,endY-arrowSize),canvas.LineTo(arrowX-arrowSize/2,endY-arrowSize),canvas.ClosePath(),canvas.Fill()}else if(4==this._beat.BrushType){var lineStartY1=startY+arrowSize,lineEndY1=endY+arrowSize;canvas.BeginRotate(cx+this.X+7*this.get_Scale(),lineStartY1,90);var glyph1=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph1.Renderer=this.Renderer,glyph1.DoLayout(),glyph1.Width=Math.abs(lineEndY1-lineStartY1),glyph1.Paint(0,0,canvas),canvas.EndRotate(),canvas.BeginPath(),canvas.MoveTo(arrowX,startY),canvas.LineTo(arrowX+arrowSize/2,startY+arrowSize),canvas.LineTo(arrowX-arrowSize/2,startY+arrowSize),canvas.ClosePath(),canvas.Fill()}},__class__:alphaTab.rendering.glyphs.ScoreBrushGlyph}),alphaTab.rendering.glyphs.TieGlyph=$hx_exports.alphaTab.rendering.glyphs.TieGlyph=function(startBeat,endBeat,forEnd){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this.StartBeat=null,this.EndBeat=null,this.YOffset=0,this._forEnd=!1,this.StartBeat=startBeat,this.EndBeat=endBeat,this._forEnd=forEnd},alphaTab.rendering.glyphs.TieGlyph.__name__=["alphaTab","rendering","glyphs","TieGlyph"],alphaTab.rendering.glyphs.TieGlyph.PaintTie=function(canvas,scale,x1,y1,x2,y2,down,offset,size){if(null==size&&(size=4),null==offset&&(offset=22),null==down&&(down=!1),x1!=x2||y1!=y2){if(x2this._startNote.get_RealValue();startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1);var lineOffset=2.25*this.get_Scale();if(isUp?startY+=lineOffset:startY-=lineOffset,null!=this._startNote.SlideTarget){var endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startNote.SlideTarget.Beat.Voice.Bar);null==endNoteRenderer||endNoteRenderer.Staff!=startNoteRenderer.Staff?(endX=cx+startNoteRenderer.X+this._parent.X,endY=startY):(endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(this._startNote.SlideTarget.Beat,0)-offsetX,endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(this._startNote.SlideTarget,!1),isUp?endY-=lineOffset:endY+=lineOffset)}else endX=cx+startNoteRenderer.X+this._parent.X,endY=startY;break;case 3:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1)-offsetX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+9;break;case 4:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1)-offsetX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1);break;case 5:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0)+offsetX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1);break;case 6:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0)+offsetX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+9;break;case 7:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-4.5,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+9,waves=!0;break;case 8:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-9,waves=!0;break;default:return}if(waves){var b=endX-startX,a=endY-startY,this2=a,this3=b,this4=a/Math.sqrt(Math.pow(this2,2)+Math.pow(this3,2)),angle=js.Boot.__cast(57.29577951308238*Math.asin(this4),Float);canvas.BeginRotate(startX,startY,angle);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=b,glyph.Paint(0,0,canvas),canvas.EndRotate()}else canvas.BeginPath(),canvas.MoveTo(startX,startY),canvas.LineTo(endX,endY),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.ScoreSlideLineGlyph}),alphaTab.rendering.glyphs.ScoreSlurGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreSlurGlyph=function(startBeat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._startBeat=null,this._startBeat=startBeat},alphaTab.rendering.glyphs.ScoreSlurGlyph.__name__=["alphaTab","rendering","glyphs","ScoreSlurGlyph"],alphaTab.rendering.glyphs.ScoreSlurGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.ScoreSlurGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{GetBeamDirection:function(beat,noteRenderer){return 0==js.Boot.__cast(noteRenderer,alphaTab.rendering.ScoreBarRenderer).GetBeatDirection(beat)?1:0},Paint:function(cx,cy,canvas){var slurId="score.slur."+this._startBeat.SlurOrigin.Id,renderer=this.Renderer;if(!renderer.Staff.GetSharedLayoutData(slurId,!1)){renderer.Staff.SetSharedLayoutData(slurId,!0);var startNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startBeat.Voice.Bar),direction=this.GetBeamDirection(this._startBeat,startNoteRenderer),startX=cx+startNoteRenderer.X,startY=cy+startNoteRenderer.Y;if(this._startBeat.SlurOrigin.Id==this._startBeat.Id){startX+=startNoteRenderer.GetBeatX(this._startBeat,2);var note=1==direction?this._startBeat.MinNote:this._startBeat.MaxNote;startY+=startNoteRenderer.GetNoteY(note,!1)}else startY+=startNoteRenderer.Height;var endX,endY,endBeat=this._startBeat.SlurOrigin.SlurDestination,endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endBeat.Voice.Bar);if(null==endNoteRenderer||startNoteRenderer.Staff!=endNoteRenderer.Staff)endX=cx+(endNoteRenderer=js.Boot.__cast(startNoteRenderer.Staff.BarRenderers[startNoteRenderer.Staff.BarRenderers.length-1],alphaTab.rendering.ScoreBarRenderer)).X+endNoteRenderer.Width,endY=cy+endNoteRenderer.Y+endNoteRenderer.Height;else{endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat,2);var endBeatHelper=endNoteRenderer.Helpers.GetBeamingHelperForBeat(endBeat);if(endBeatHelper.Direction==direction)endY=cy+endNoteRenderer.Y+endNoteRenderer.CalculateBeamY(endBeatHelper,endX);else{var note1=1==direction?endBeat.MinNote:endBeat.MaxNote;endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note1,!1)}}var height=(endX-startX)*this.Renderer.get_Settings().SlurHeightFactor;alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==direction,height,4),canvas.Fill()}},__class__:alphaTab.rendering.glyphs.ScoreSlurGlyph}),alphaTab.rendering.glyphs.ScoreTieGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreTieGlyph=function(startNote,endNote,forEnd){null==forEnd&&(forEnd=!1),alphaTab.rendering.glyphs.TieGlyph.call(this,null==startNote?null:startNote.Beat,null==endNote?null:endNote.Beat,forEnd),this.StartNote=null,this.EndNote=null,this.StartNote=startNote,this.EndNote=endNote},alphaTab.rendering.glyphs.ScoreTieGlyph.__name__=["alphaTab","rendering","glyphs","ScoreTieGlyph"],alphaTab.rendering.glyphs.ScoreTieGlyph.__super__=alphaTab.rendering.glyphs.TieGlyph,alphaTab.rendering.glyphs.ScoreTieGlyph.prototype=$extend(alphaTab.rendering.glyphs.TieGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.TieGlyph.prototype.DoLayout.call(this),this.YOffset=4.5},GetBeamDirection:function(beat,noteRenderer){return 0==js.Boot.__cast(noteRenderer,alphaTab.rendering.ScoreBarRenderer).GetBeatDirection(beat)?1:0},GetStartY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this.StartNote,!1)},GetEndY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this.EndNote,!1)},GetStartX:function(noteRenderer){return noteRenderer.GetBeatX(this.StartNote.Beat,2)},GetEndX:function(noteRenderer){return noteRenderer.GetNoteX(this.EndNote,!1)},__class__:alphaTab.rendering.glyphs.ScoreTieGlyph}),alphaTab.rendering.glyphs.TimeSignatureGlyph=$hx_exports.alphaTab.rendering.glyphs.TimeSignatureGlyph=function(x,y,numerator,denominator,isCommon){alphaTab.rendering.glyphs.GlyphGroup.call(this,x,y),this._numerator=0,this._denominator=0,this._isCommon=!1,this._numerator=numerator,this._denominator=denominator,this._isCommon=isCommon},alphaTab.rendering.glyphs.TimeSignatureGlyph.__name__=["alphaTab","rendering","glyphs","TimeSignatureGlyph"],alphaTab.rendering.glyphs.TimeSignatureGlyph.__super__=alphaTab.rendering.glyphs.GlyphGroup,alphaTab.rendering.glyphs.TimeSignatureGlyph.prototype=$extend(alphaTab.rendering.glyphs.GlyphGroup.prototype,{get_CommonY:function(){throw new js._Boot.HaxeError("abstract")},get_NumeratorY:function(){throw new js._Boot.HaxeError("abstract")},get_DenominatorY:function(){throw new js._Boot.HaxeError("abstract")},get_CommonScale:function(){throw new js._Boot.HaxeError("abstract")},get_NumberScale:function(){throw new js._Boot.HaxeError("abstract")},DoLayout:function(){if(this._isCommon&&2==this._numerator&&2==this._denominator){var common=new alphaTab.rendering.glyphs.MusicFontGlyph(0,this.get_CommonY(),this.get_CommonScale(),57483);common.Width=14*this.get_Scale(),this.AddGlyph(common),alphaTab.rendering.glyphs.GlyphGroup.prototype.DoLayout.call(this)}else if(this._isCommon&&4==this._numerator&&4==this._denominator){var common1=new alphaTab.rendering.glyphs.MusicFontGlyph(0,this.get_CommonY(),this.get_CommonScale(),57482);common1.Width=14*this.get_Scale(),this.AddGlyph(common1),alphaTab.rendering.glyphs.GlyphGroup.prototype.DoLayout.call(this)}else{var numerator=new alphaTab.rendering.glyphs.NumberGlyph(0,this.get_NumeratorY(),this._numerator,this.get_NumberScale()),denominator=new alphaTab.rendering.glyphs.NumberGlyph(0,this.get_DenominatorY(),this._denominator,this.get_NumberScale());this.AddGlyph(numerator),this.AddGlyph(denominator),alphaTab.rendering.glyphs.GlyphGroup.prototype.DoLayout.call(this);for(var i=0,j=this.Glyphs.length;i0&&i>=(this._beat.Notes.length/2|0)&&(direction=1);var endX=cx+startNoteRenderer.X;beat.get_IsLastOfVoice()?endX+=startNoteRenderer.Width:endX+=startNoteRenderer.GetBeatX(beat,4),endX-=7*this.get_Scale();var slurText=1==beat.WhammyStyle&&0==i?"grad.":"",endNoteRenderer=null;note.IsTieOrigin&&(null!=(endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),note.TieDestination.Beat.Voice.Bar))&&endNoteRenderer.Staff==startNoteRenderer.Staff?endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(note.TieDestination.Beat,2):endNoteRenderer=null);var heightOffset=9*this.get_Scale()*.75*.5;0==direction&&(heightOffset=-heightOffset);var endValue,endY;switch(beat.WhammyBarType){case 2:0==i&&(this._bendNoteHeads[0].X=endX-this._bendNoteHeads[0].NoteHeadOffset,this._bendNoteHeads[0].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[0].Paint(0,0,canvas)),endValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1]),this._bendNoteHeads[0].ContainsNoteValue(endValue)?(endY=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endX,endY,1==direction,this.get_Scale(),slurText)):null!=endNoteRenderer&&(note.IsTieOrigin&¬e.TieDestination.Beat.get_HasWhammyBar()||note.Beat.IsContinuedWhammy)?(endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),this.DrawBendSlur(canvas,startX,startY,endX,endY,1==direction,this.get_Scale(),slurText)):note.IsTieOrigin&&(endY=null==endNoteRenderer?startY:cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==beatDirection,22,4),canvas.Fill());break;case 3:if(1==whammyMode){if(0==i){var simpleStartX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,1)-2*this.get_Scale(),simpleEndX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,3)+2*this.get_Scale(),middleX=(simpleStartX+simpleEndX)/2,text=Std.string((this._beat.WhammyBarPoints[1].Value-this._beat.WhammyBarPoints[0].Value)/4|0);canvas.set_Font(this.Renderer.get_Resources().TablatureFont),canvas.FillText(text,middleX,cy+this.Y);var simpleStartY=cy+this.Y+canvas.get_Font().Size+2*this.get_Scale(),simpleEndY=simpleStartY+12*this.get_Scale();this._beat.WhammyBarPoints[1].Value>this._beat.WhammyBarPoints[0].Value?(canvas.MoveTo(simpleStartX,simpleEndY),canvas.LineTo(middleX,simpleStartY),canvas.LineTo(simpleEndX,simpleEndY)):(canvas.MoveTo(simpleStartX,simpleStartY),canvas.LineTo(middleX,simpleEndY),canvas.LineTo(simpleEndX,simpleStartY)),canvas.Stroke()}note.IsTieOrigin&&(endY=null==endNoteRenderer?startY:cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==beatDirection,22,4),canvas.Fill())}else{var middleX1=(startX+endX)/2;this._bendNoteHeads[0].X=middleX1-this._bendNoteHeads[0].NoteHeadOffset,this._bendNoteHeads[0].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[0].Paint(0,0,canvas);var middleValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[1]),middleY=this._bendNoteHeads[0].GetNoteValueY(middleValue,!1)+heightOffset;this.DrawBendSlur(canvas,startX,startY,middleX1,middleY,1==direction,this.get_Scale(),slurText),this._bendNoteHeads[1].X=endX-this._bendNoteHeads[1].NoteHeadOffset,this._bendNoteHeads[1].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[1].Paint(0,0,canvas),endValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1]),endY=this._bendNoteHeads[1].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,middleX1,middleY,endX,endY,1==direction,this.get_Scale(),slurText)}break;case 4:note.IsTieOrigin&&(endY=null==endNoteRenderer?startY:cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==beatDirection,22,4),canvas.Fill());break;case 5:case 6:var preX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(note.Beat,0);preX+=js.Boot.__cast(startNoteRenderer.GetBeatContainer(note.Beat).PreNotes,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph).get_PrebendNoteHeadOffset();var preY=cy+startNoteRenderer.Y,this2=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(note.get_DisplayValue()-(note.Beat.WhammyBarPoints[0].Value/2|0),!1),preY1=preY+startNoteRenderer.GetScoreY(this2,0)+heightOffset;this.DrawBendSlur(canvas,preX,preY1,startX,startY,1==direction,this.get_Scale(),slurText),this._bendNoteHeads.length>0&&(this._bendNoteHeads[0].X=endX-this._bendNoteHeads[0].NoteHeadOffset,this._bendNoteHeads[0].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[0].Paint(0,0,canvas),endValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1]),endY=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endX,endY,1==direction,this.get_Scale(),slurText))}++i}canvas.set_TextAlign(textalign)},GetBendNoteValue:function(note,bendPoint){return note.get_DisplayValueWithoutBend()+(bendPoint.Value/2|0)},__class__:alphaTab.rendering.glyphs.ScoreWhammyBarGlyph}),alphaTab.rendering.glyphs.SpacingGlyph=$hx_exports.alphaTab.rendering.glyphs.SpacingGlyph=function(x,y,width){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this.Width=width},alphaTab.rendering.glyphs.SpacingGlyph.__name__=["alphaTab","rendering","glyphs","SpacingGlyph"],alphaTab.rendering.glyphs.SpacingGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.SpacingGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{__class__:alphaTab.rendering.glyphs.SpacingGlyph}),alphaTab.rendering.glyphs.TabBeatContainerGlyph=$hx_exports.alphaTab.rendering.glyphs.TabBeatContainerGlyph=function(beat,voiceContainer){alphaTab.rendering.glyphs.BeatContainerGlyph.call(this,beat,voiceContainer),this._bend=null},alphaTab.rendering.glyphs.TabBeatContainerGlyph.__name__=["alphaTab","rendering","glyphs","TabBeatContainerGlyph"],alphaTab.rendering.glyphs.TabBeatContainerGlyph.__super__=alphaTab.rendering.glyphs.BeatContainerGlyph,alphaTab.rendering.glyphs.TabBeatContainerGlyph.prototype=$extend(alphaTab.rendering.glyphs.BeatContainerGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.BeatContainerGlyph.prototype.DoLayout.call(this),null!=this._bend&&(this._bend.Renderer=this.Renderer,this._bend.DoLayout(),this.UpdateWidth())},CreateTies:function(n){if(n.IsVisible){var renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(n.IsTieOrigin&&renderer.ShowTiedNotes&&n.TieDestination.IsVisible){var tie=new alphaTab.rendering.glyphs.TabTieGlyph(n,n.TieDestination,!1,!1);this.Ties.push(tie)}if(n.IsTieDestination&&renderer.ShowTiedNotes){var tie1=new alphaTab.rendering.glyphs.TabTieGlyph(n.TieOrigin,n,!1,!0);this.Ties.push(tie1)}if(null!=n.SlurOrigin){var tie2=new alphaTab.rendering.glyphs.TabSlurGlyph(n);this.Ties.push(tie2)}if(0!=n.SlideType){var l=new alphaTab.rendering.glyphs.TabSlideLineGlyph(n.SlideType,n,this);this.Ties.push(l)}n.get_HasBend()&&(null==this._bend&&(this._bend=new alphaTab.rendering.glyphs.TabBendGlyph(n.Beat),this._bend.Renderer=this.Renderer,this.Ties.push(this._bend)),this._bend.AddBends(n))}},__class__:alphaTab.rendering.glyphs.TabBeatContainerGlyph}),alphaTab.rendering.glyphs.TabBeatGlyph=$hx_exports.alphaTab.rendering.glyphs.TabBeatGlyph=function(){alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.call(this)},alphaTab.rendering.glyphs.TabBeatGlyph.__name__=["alphaTab","rendering","glyphs","TabBeatGlyph"],alphaTab.rendering.glyphs.TabBeatGlyph.__super__=alphaTab.rendering.glyphs.BeatOnNoteGlyphBase,alphaTab.rendering.glyphs.TabBeatGlyph.prototype=$extend(alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.prototype,{DoLayout:function(){var tabRenderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(this.Container.Beat.get_IsRest()){var line=0,offset1=0;switch(this.Container.Beat.Duration){case-4:case-2:line=3;break;case 1:line=2;break;case 2:case 4:line=3;break;case 8:case 16:line=2,offset1=5;break;case 32:case 64:case 128:case 256:line=3}var this2=offset1,y=tabRenderer.GetTabY(line,this2);if(this.RestGlyph=new alphaTab.rendering.glyphs.TabRestGlyph(0,y,tabRenderer.ShowRests,this.Container.Beat.Duration),this.RestGlyph.Beat=this.Container.Beat,this.RestGlyph.BeamingHelper=this.BeamingHelper,this.AddGlyph(this.RestGlyph),this.Container.Beat.Dots>0&&tabRenderer.ShowRests){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i1=0;i10&&tabRenderer.RenderRhythm){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i=0;i0&&(-1==this._releaseMinValue||value0&&(-1==this._releaseMinValue||value0&&(-1==this._releaseMinValue||value=0&&(renderPoints[1].LineValue=value);break;case 4:renderPoints[1].LineValue=this._bendMiddleMinValue,(value=note1.IsTieOrigin?this._releaseContinuedMinValue:this._releaseMinValue)>=0&&(renderPoints[2].LineValue=value);break;case 6:renderPoints[0].LineValue=this._preBendMinValue;break;case 7:renderPoints[0].LineValue=this._preBendMinValue,renderPoints[1].LineValue=note1.IsTieOrigin?this._bendEndContinuedMinValue:this._bendEndMinValue;break;case 8:renderPoints[0].LineValue=this._preBendMinValue,(value=note1.IsTieOrigin?this._releaseContinuedMinValue:this._releaseMinValue)>=0&&(renderPoints[1].LineValue=value)}}this.Width=0;this._notes.sort(function(a1,b1){return b=b1,(a=a1).get_IsStringed()?a.String-b.String:a.get_RealValue()-b.get_RealValue();var a,b})},CreateRenderingPoints:function(note){var renderingPoints=[];switch(note.BendType){case 1:for(var bendPoint=$iterator(note.BendPoints)();bendPoint.hasNext();){var bendPoint1=bendPoint.next();renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(bendPoint1.Offset,bendPoint1.Value))}break;case 4:renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(0,note.BendPoints[0].Value)),renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(30,note.BendPoints[1].Value)),renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(60,note.BendPoints[3].Value));break;case 2:case 3:case 5:case 6:case 7:case 8:renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(0,note.BendPoints[0].Value)),renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(60,note.BendPoints[1].Value))}return renderingPoints},Paint:function(cx,cy,canvas){var color=canvas.get_Color();this._notes.length>1&&canvas.set_Color(this.Renderer.get_Resources().SecondaryGlyphColor);for(var note=$iterator(this._notes)();note.hasNext();){for(var endNoteRenderer,note1=note.next(),renderPoints=this._renderPoints[note1.Id],startNoteRenderer=this.Renderer,endNote=note1,isMultiBeatBend=!1,endNoteHasBend=!1,slurText=1==note1.BendStyle?"grad.":"",endBeat=null;endNote.IsTieOrigin;){var nextNote=endNote.TieDestination;if(null==(endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),nextNote.Beat.Voice.Bar))||startNoteRenderer.Staff!=endNoteRenderer.Staff)break;if(isMultiBeatBend=!0,(endNote=nextNote).get_HasBend()||!this.Renderer.get_Settings().ExtendBendArrowsOnTiedNotes){endNoteHasBend=!0;break}}endBeat=endNote.Beat,endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endBeat.Voice.Bar),endBeat.get_IsLastOfVoice()&&!endNote.get_HasBend()&&this.Renderer.get_Settings().ExtendBendArrowsOnTiedNotes&&(endBeat=null);var startX=0,endX=0,topY=cy+startNoteRenderer.Y;startNoteRenderer.Y,startNoteRenderer.GetNoteY(note1,!1);startX=cx+startNoteRenderer.X,renderPoints[0].Value>0||note1.IsContinuedBend?startX+=startNoteRenderer.GetBeatX(note1.Beat,2):startX+=startNoteRenderer.GetNoteX(note1,!0),endX=null==endBeat||endBeat.get_IsLastOfVoice()&&!endNoteHasBend?cx+endNoteRenderer.X+endNoteRenderer.get_PostBeatGlyphsStart():endNoteHasBend||null==endBeat.NextBeat?cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat,2):5==note1.BendType?cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat.NextBeat,1):cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat.NextBeat,0),isMultiBeatBend||(endX-=6*this.get_Scale());var dX=(endX-startX)/60;canvas.BeginPath();for(var i=0,j=renderPoints.length-1;ifirstPt.Value){y2+arrowSize>y1&&(y2=y1-arrowSize),canvas.BeginPath(),canvas.MoveTo(x2,y2);canvas.LineTo(x2-.5*arrowSize,y2+arrowSize);canvas.LineTo(x2+.5*arrowSize,y2+arrowSize),canvas.ClosePath(),canvas.Fill(),arrowOffset=arrowSize}else if(secondPt.Value!=firstPt.Value){y20){var dashX=x2,dashSize=3*this.get_Scale(),end=x1+dashSize;if((dashX-x1)/(2*dashSize)<1)canvas.MoveTo(dashX,y1),canvas.LineTo(x1,y1);else for(;dashX>end;)canvas.MoveTo(dashX,y1),canvas.LineTo(dashX-dashSize,y1),dashX-=2*dashSize;canvas.Stroke()}}else x2>x1?(canvas.MoveTo(x1,y1),canvas.BezierCurveTo((x1+x2)/2,y1,x2,y1,x2,y2+arrowOffset),canvas.Stroke()):(canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2),canvas.Stroke());if(null!=slurText&&0!=slurText.length&&firstPt.Offsety2){var h=Math.abs(y1-y2);y=h>1.3*canvas.get_Font().Size?y1-h/2:y1,x=(x1+x2-size)/2}else y=y1,x=x2-size;canvas.FillText(slurText,x,y)}if(0!=secondPt.Value&&firstPt.Value!=secondPt.Value){var dV=secondPt.Value,up=secondPt.Value>firstPt.Value,s="";if(4==(dV=Math.abs(dV)))s="full",dV-=4;else if(dV>=4||dV<=-4){var steps=dV/4|0;s+=Std.string(steps),dV-=4*steps}if(dV>0&&(s+=alphaTab.rendering.glyphs.TabBendGlyph.GetFractionSign(dV)),""!=s){var startY=y2=cy-bendValueHeight*secondPt.Value;if(!up){startY=y1+1*Math.abs(y2-y1)/3}canvas.set_Font(res.TablatureFont);var size1=canvas.MeasureText(s),y3=startY-.5*res.TablatureFont.Size-2*this.get_Scale(),x3=x2-size1/2;canvas.FillText(s,x3,y3)}}},__class__:alphaTab.rendering.glyphs.TabBendGlyph}),alphaTab.rendering.glyphs.TabBendRenderPoint=$hx_exports.alphaTab.rendering.glyphs.TabBendRenderPoint=function(offset,value){null==value&&(value=0),null==offset&&(offset=0),alphaTab.model.BendPoint.call(this,offset,value),this.LineValue=0,this.LineValue=value},alphaTab.rendering.glyphs.TabBendRenderPoint.__name__=["alphaTab","rendering","glyphs","TabBendRenderPoint"],alphaTab.rendering.glyphs.TabBendRenderPoint.__super__=alphaTab.model.BendPoint,alphaTab.rendering.glyphs.TabBendRenderPoint.prototype=$extend(alphaTab.model.BendPoint.prototype,{__class__:alphaTab.rendering.glyphs.TabBendRenderPoint}),alphaTab.rendering.glyphs.TabBrushGlyph=$hx_exports.alphaTab.rendering.glyphs.TabBrushGlyph=function(beat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._beat=null,this._beat=beat},alphaTab.rendering.glyphs.TabBrushGlyph.__name__=["alphaTab","rendering","glyphs","TabBrushGlyph"],alphaTab.rendering.glyphs.TabBrushGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabBrushGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=10*this.get_Scale()},Paint:function(cx,cy,canvas){var tabBarRenderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer),res=this.Renderer.get_Resources(),startY=cy+this.X+(tabBarRenderer.GetNoteY(this._beat.MaxNote,!1)-res.TablatureFont.Size/2),endY=cy+this.Y+tabBarRenderer.GetNoteY(this._beat.MinNote,!1)+res.TablatureFont.Size/2,arrowX=system.Convert.ToInt32_Single(cx+this.X+this.Width/2),arrowSize=8*this.get_Scale();if(0!=this._beat.BrushType){if(1==this._beat.BrushType||2==this._beat.BrushType){canvas.BeginPath();var this1=arrowX;canvas.MoveTo(this1,startY);var this2=arrowX;canvas.LineTo(this2,endY),canvas.Stroke()}else if(3==this._beat.BrushType){var lineStartY=startY-arrowSize,lineEndY=endY-arrowSize;canvas.BeginRotate(cx+this.X+2*this.get_Scale(),lineEndY,-90);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=Math.abs(lineEndY-lineStartY),glyph.Paint(0,0,canvas),canvas.EndRotate()}else if(4==this._beat.BrushType){var lineStartY1=startY+arrowSize,lineEndY1=endY+arrowSize;canvas.BeginRotate(cx+this.X+7*this.get_Scale(),lineStartY1,90);var glyph1=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph1.Renderer=this.Renderer,glyph1.DoLayout(),glyph1.Width=Math.abs(lineEndY1-lineStartY1),glyph1.Paint(0,0,canvas),canvas.EndRotate()}if(1==this._beat.BrushType||3==this._beat.BrushType){canvas.BeginPath();var this3=arrowX;canvas.MoveTo(this3,endY),canvas.LineTo(arrowX+arrowSize/2,endY-arrowSize),canvas.LineTo(arrowX-arrowSize/2,endY-arrowSize),canvas.ClosePath(),canvas.Fill()}else{canvas.BeginPath();var this4=arrowX;canvas.MoveTo(this4,startY),canvas.LineTo(arrowX+arrowSize/2,startY+arrowSize),canvas.LineTo(arrowX-arrowSize/2,startY+arrowSize),canvas.ClosePath(),canvas.Fill()}}},__class__:alphaTab.rendering.glyphs.TabBrushGlyph}),alphaTab.rendering.glyphs.TabClefGlyph=$hx_exports.alphaTab.rendering.glyphs.TabClefGlyph=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y)},alphaTab.rendering.glyphs.TabClefGlyph.__name__=["alphaTab","rendering","glyphs","TabClefGlyph"],alphaTab.rendering.glyphs.TabClefGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabClefGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=28*this.get_Scale()},Paint:function(cx,cy,canvas){var scale,strings=this.Renderer.Bar.Staff.Tuning.length,correction=strings*this.get_Scale()*.5,symbol=strings<=4?57454:57453;if(strings<=4){scale=strings/4.5}else{scale=strings/6.5}canvas.FillMusicFontSymbol(cx+this.X+5*this.get_Scale(),cy+this.Y-correction,scale*this.get_Scale(),symbol)},__class__:alphaTab.rendering.glyphs.TabClefGlyph}),alphaTab.rendering.glyphs.TabNoteChordGlyph=$hx_exports.alphaTab.rendering.glyphs.TabNoteChordGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this._notes=null,this._isGrace=!1,this.Beat=null,this.BeamingHelper=null,this.MinStringNote=null,this.BeatEffects=null,this.NotesPerString=null,this.NoteStringWidth=0,this._isGrace=isGrace;this._notes=[];this.BeatEffects={};this.NotesPerString={}},alphaTab.rendering.glyphs.TabNoteChordGlyph.__name__=["alphaTab","rendering","glyphs","TabNoteChordGlyph"],alphaTab.rendering.glyphs.TabNoteChordGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabNoteChordGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{GetNoteX:function(note,onEnd){if(null==onEnd&&(onEnd=!0),this.NotesPerString.hasOwnProperty(note.String)){var n=this.NotesPerString[note.String],pos=this.X+n.X;return onEnd&&(pos+=n.Width),pos}return 0},GetNoteY:function(note,aboveNote){return null==aboveNote&&(aboveNote=!1),this.NotesPerString.hasOwnProperty(note.String)?this.Y+this.NotesPerString[note.String].Y+(aboveNote?-this.NotesPerString[note.String].Height/2:0):0},DoLayout:function(){for(var w=0,noteStringWidth=0,i=0,j=this._notes.length;iw&&(w=g.Width),g.NoteStringWidth>noteStringWidth&&(noteStringWidth=g.NoteStringWidth),++i}this.NoteStringWidth=noteStringWidth;for(var tabHeight=this.Renderer.get_Resources().TablatureFont.Size,effectY=this.GetNoteY(this.MinStringNote,!1)+tabHeight/2,effectSpacing=7*this.get_Scale(),this1=this.BeatEffects,beatEffectKey=$iterator(Object.keys(this1))();beatEffectKey.hasNext();){var beatEffectKey1=beatEffectKey.next(),g1=this.BeatEffects[beatEffectKey1];g1.Y=g1.Y+effectY,g1.X=g1.X+this.Width/2,g1.Renderer=this.Renderer,effectY+=effectSpacing,g1.DoLayout()}this.Width=w},AddNoteGlyph:function(noteGlyph,note){this._notes.push(noteGlyph),this.NotesPerString[note.String]=noteGlyph,(null==this.MinStringNote||note.Stringthis._startNote.Fret?(startOffsetY=sizeY,endOffsetY=-1*sizeY):(startOffsetY=-1*sizeY,endOffsetY=sizeY),startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,3),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+startOffsetY,null!=this._startNote.SlideTarget){var endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startNote.SlideTarget.Beat.Voice.Bar);null==endNoteRenderer||endNoteRenderer.Staff!=startNoteRenderer.Staff?(endX=cx+startNoteRenderer.X+this._parent.X,endY=startY):(endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(this._startNote.SlideTarget.Beat,1),endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(this._startNote.SlideTarget,!1)+endOffsetY)}else endX=cx+startNoteRenderer.X+this._parent.X,endY=startY;break;case 3:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+sizeY;break;case 4:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-sizeY;break;case 5:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-sizeY;break;case 6:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+sizeY;break;case 7:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-2*sizeY,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=startY+3*sizeY,waves=!0;break;case 8:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+sizeY,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=startY-3*sizeY,waves=!0;break;default:return}if(waves){var b=endX-startX,a=endY-startY,this1=a,this2=b,this3=a/Math.sqrt(Math.pow(this1,2)+Math.pow(this2,2)),angle=js.Boot.__cast(57.29577951308238*Math.asin(this3),Float);canvas.BeginRotate(startX,startY,angle);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=b,glyph.Paint(0,0,canvas),canvas.EndRotate()}else canvas.BeginPath(),canvas.MoveTo(startX,startY),canvas.LineTo(endX,endY),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.TabSlideLineGlyph}),alphaTab.rendering.glyphs.TabSlurGlyph=$hx_exports.alphaTab.rendering.glyphs.TabSlurGlyph=function(startNote){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._startNote=null,this._startNote=startNote},alphaTab.rendering.glyphs.TabSlurGlyph.__name__=["alphaTab","rendering","glyphs","TabSlurGlyph"],alphaTab.rendering.glyphs.TabSlurGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabSlurGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{GetBeamDirection:function(note){return note.String>3||note.Beat.Notes.length>1&¬e.String==note.Beat.MaxStringNote.String?0:1},Paint:function(cx,cy,canvas){var slurId="tab.slur."+this._startNote.SlurOrigin.Beat.Id+"."+this._startNote.SlurOrigin.SlurDestination.Beat.Id,renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(!renderer.Staff.GetSharedLayoutData(slurId,!1)){renderer.Staff.SetSharedLayoutData(slurId,!0);var startNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startNote.Beat.Voice.Bar),direction=this.GetBeamDirection(this._startNote),startX=cx+startNoteRenderer.X,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!0);1==direction&&(startY+=renderer.GetTabY(1,0)),this._startNote.SlurOrigin.Id==this._startNote.Id&&(startX+=startNoteRenderer.GetBeatX(this._startNote.Beat,2));var endX,endNote=this._startNote.SlurOrigin.SlurDestination,endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endNote.Beat.Voice.Bar),endY=startY;endX=null==endNoteRenderer||startNoteRenderer.Staff!=endNoteRenderer.Staff?cx+(endNoteRenderer=startNoteRenderer.Staff.BarRenderers[startNoteRenderer.Staff.BarRenderers.length-1]).X+endNoteRenderer.Width:cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endNote.Beat,2),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==direction,22,4),canvas.Fill()}},__class__:alphaTab.rendering.glyphs.TabSlurGlyph}),alphaTab.rendering.glyphs.TabTieGlyph=$hx_exports.alphaTab.rendering.glyphs.TabTieGlyph=function(startNote,endNote,forSlide,forEnd){null==forEnd&&(forEnd=!1),alphaTab.rendering.glyphs.TieGlyph.call(this,startNote.Beat,endNote.Beat,forEnd),this._startNote=null,this._endNote=null,this._forSlide=!1,this._startNote=startNote,this._endNote=endNote,this._forSlide=forSlide},alphaTab.rendering.glyphs.TabTieGlyph.__name__=["alphaTab","rendering","glyphs","TabTieGlyph"],alphaTab.rendering.glyphs.TabTieGlyph.__super__=alphaTab.rendering.glyphs.TieGlyph,alphaTab.rendering.glyphs.TabTieGlyph.prototype=$extend(alphaTab.rendering.glyphs.TieGlyph.prototype,{get_Offset:function(){return this._forSlide?5*this.get_Scale():0},GetBeamDirection:function(beat,noteRenderer){return this._startNote.String>3?0:1},GetStartY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this._startNote,!1)-this.get_Offset()},GetEndY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this._endNote,!1)-this.get_Offset()},GetStartX:function(noteRenderer){return noteRenderer.GetNoteX(this._startNote,!0)},GetEndX:function(noteRenderer){return noteRenderer.GetNoteX(this._endNote,!1)},__class__:alphaTab.rendering.glyphs.TabTieGlyph}),alphaTab.rendering.glyphs.TabTimeSignatureGlyph=$hx_exports.alphaTab.rendering.glyphs.TabTimeSignatureGlyph=function(x,y,numerator,denominator,isCommon){alphaTab.rendering.glyphs.TimeSignatureGlyph.call(this,x,y,numerator,denominator,isCommon)},alphaTab.rendering.glyphs.TabTimeSignatureGlyph.__name__=["alphaTab","rendering","glyphs","TabTimeSignatureGlyph"],alphaTab.rendering.glyphs.TabTimeSignatureGlyph.__super__=alphaTab.rendering.glyphs.TimeSignatureGlyph,alphaTab.rendering.glyphs.TabTimeSignatureGlyph.prototype=$extend(alphaTab.rendering.glyphs.TimeSignatureGlyph.prototype,{get_CommonY:function(){return js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer).GetTabY(0,0)},get_NumeratorY:function(){var offset,renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(renderer.Bar.Staff.Tuning.length<=4){offset=.25}else{offset=1/3}return renderer.get_LineOffset()*renderer.Bar.Staff.Tuning.length*offset*this.get_Scale()},get_DenominatorY:function(){var offset,renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(renderer.Bar.Staff.Tuning.length<=4){offset=.6}else{offset=.6}return renderer.get_LineOffset()*renderer.Bar.Staff.Tuning.length*offset*this.get_Scale()},get_CommonScale:function(){return 1},get_NumberScale:function(){return js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer).Bar.Staff.Tuning.length<=4?.75:1},__class__:alphaTab.rendering.glyphs.TabTimeSignatureGlyph}),alphaTab.rendering.glyphs.TabWhammyBarGlyph=$hx_exports.alphaTab.rendering.glyphs.TabWhammyBarGlyph=function(beat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._beat=null,this._renderPoints=null,this._isSimpleDip=!1,this._beat=beat,this._renderPoints=this.CreateRenderingPoints(beat),this._isSimpleDip=!1},alphaTab.rendering.glyphs.TabWhammyBarGlyph.__name__=["alphaTab","rendering","glyphs","TabWhammyBarGlyph"],alphaTab.rendering.glyphs.TabWhammyBarGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabWhammyBarGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{CreateRenderingPoints:function(beat){if(1==beat.WhammyBarType)return beat.WhammyBarPoints;var renderingPoints=[];switch(beat.WhammyBarType){case 3:renderingPoints.push(new alphaTab.model.BendPoint(0,beat.WhammyBarPoints[0].Value)),renderingPoints.push(new alphaTab.model.BendPoint(30,beat.WhammyBarPoints[1].Value)),renderingPoints.push(new alphaTab.model.BendPoint(60,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1].Value));break;case 2:case 4:case 5:case 6:renderingPoints.push(new alphaTab.model.BendPoint(0,beat.WhammyBarPoints[0].Value)),renderingPoints.push(new alphaTab.model.BendPoint(60,beat.WhammyBarPoints[1].Value))}return renderingPoints},DoLayout:function(){alphaTab.rendering.glyphs.Glyph.prototype.DoLayout.call(this),this._isSimpleDip=1==this.Renderer.get_Settings().DisplayMode&&3==this._beat.WhammyBarType;for(var minValue=null,maxValue=null,beat=this._beat;null!=beat&&beat.get_HasWhammyBar();)(null==minValue||minValue.Value>beat.MinWhammyPoint.Value)&&(minValue=beat.MinWhammyPoint),(null==maxValue||maxValue.Value0?Math.abs(this.GetOffset(maxValue.Value)):0;if(topOffset>0||0!=this._beat.WhammyBarPoints[0].Value||this.Renderer.get_Settings().ShowZeroOnDiveWhammy){topOffset+=2*this.Renderer.get_Resources().TablatureFont.Size}var bottomOffset=minValue.Value<0?Math.abs(this.GetOffset(minValue.Value)):0;this.Renderer.RegisterOverflowTop(topOffset+bottomOffset);topOffset>this.Renderer.Staff.GetSharedLayoutData("tab.whammy.topoffset",-1)&&this.Renderer.Staff.SetSharedLayoutData("tab.whammy.topoffset",topOffset)},GetOffset:function(value){if(0==value)return 0;var offset=6*this.get_Scale()+6*Math.log2(Math.abs(value)/2)*this.get_Scale();return value<0&&(offset=-offset),offset},Paint:function(cx,cy,canvas){var startNoteRenderer=this.Renderer,endBeat=this._beat.NextBeat,endNoteRenderer=null,endXPositionType=0;null!=endBeat&&(null==(endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endBeat.Voice.Bar))||endNoteRenderer.Staff!=startNoteRenderer.Staff?(endBeat=null,endNoteRenderer=null):endNoteRenderer==startNoteRenderer||endBeat.get_HasWhammyBar()?endXPositionType=!endBeat.get_HasWhammyBar()||1==startNoteRenderer.get_Settings().DisplayMode&&3==endBeat.WhammyBarType?0:2:(endBeat=null,endNoteRenderer=null));var startX,endX;this._isSimpleDip?(startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,1)-2*this.get_Scale(),endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,3)+2*this.get_Scale()):(startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,2),endX=null==endNoteRenderer?cx+startNoteRenderer.X+startNoteRenderer.Width-2*this.get_Scale():cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat,endXPositionType));var old=canvas.get_TextAlign();if(canvas.set_TextAlign(1),this._renderPoints.length>=2){var dx=(endX-startX)/60;canvas.BeginPath();for(var zeroY=cy+this.Renderer.Staff.GetSharedLayoutData("tab.whammy.topoffset",0),slurText=1==this._beat.WhammyStyle?"grad.":"",i=0,j=this._renderPoints.length-1;idashStartY;)canvas.MoveTo(x1,dashStartY),canvas.LineTo(x1,dashStartY+dashSize),dashStartY+=2*dashSize;canvas.Stroke()}else if(firstPt.Value==secondPt.Value){var dashSize1=3*this.get_Scale();if(Math.abs(x2-x1)/(2*dashSize1)<1)canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2);else for(var dashEndX=Math.max(x1,x2),dashStartX=Math.min(x1,x2);dashEndX>dashStartX;)canvas.MoveTo(dashEndX,y1),canvas.LineTo(dashEndX-dashSize1,y1),dashEndX-=2*dashSize1;canvas.Stroke()}else canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2);var res=canvas.get_Resources();if(isFirst&&!this._beat.IsContinuedWhammy&&!this._isSimpleDip){var y=y1;y-=res.TablatureFont.Size+2*this.get_Scale(),this.Renderer.get_Settings().ShowZeroOnDiveWhammy&&canvas.FillText("0",x1,y),null!=slurText&&(y-=res.TablatureFont.Size+2*this.get_Scale(),canvas.FillText(slurText,x1,y))}var dV=Math.abs(secondPt.Value);if((0!=dV||this.Renderer.get_Settings().ShowZeroOnDiveWhammy&&!this._isSimpleDip)&&firstPt.Value!=secondPt.Value){var s="";if(secondPt.Value<0&&(s+="-"),dV>=4){var steps=dV/4|0;s+=Std.string(steps),dV-=4*steps}else 0==dV&&(s+="0");dV>0&&(s+=alphaTab.rendering.glyphs.TabBendGlyph.GetFractionSign(dV));var y3;this._isSimpleDip?y3=Math.min(y1,y2)-res.TablatureFont.Size-2*this.get_Scale():(y3=firstPt.Offset==secondPt.Offset?Math.min(y1,y2):y2,y3-=res.TablatureFont.Size+2*this.get_Scale(),null!=nextPt&&nextPt.Value>secondPt.Value&&(y3-=2*this.get_Scale()));var x=x2;canvas.FillText(s,x,y3)}},__class__:alphaTab.rendering.glyphs.TabWhammyBarGlyph}),alphaTab.rendering.glyphs.TempoGlyph=$hx_exports.alphaTab.rendering.glyphs.TempoGlyph=function(x,y,tempo){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y),this._tempo=0,this._tempo=tempo},alphaTab.rendering.glyphs.TempoGlyph.__name__=["alphaTab","rendering","glyphs","TempoGlyph"],alphaTab.rendering.glyphs.TempoGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.TempoGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=25*this.get_Scale()},Paint:function(cx,cy,canvas){var res=this.Renderer.get_Resources();canvas.set_Font(res.MarkerFont);canvas.FillMusicFontSymbol(cx+this.X,cy+this.Y+.8*this.Height,.75*this.get_Scale(),57813),canvas.FillText("= "+this._tempo,cx+this.X+this.Height/2,cy+this.Y+canvas.get_Font().Size/2)},__class__:alphaTab.rendering.glyphs.TempoGlyph}),alphaTab.rendering.glyphs.TextGlyph=$hx_exports.alphaTab.rendering.glyphs.TextGlyph=function(x,y,text,font,textAlign){null==textAlign&&(textAlign=0),alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y),this._lines=null,this.Font=null,this.TextAlign=0;var this2=system.Convert.ToUInt16(10);this._lines=system._CsString.CsString_Impl_.Split_CharArray(text,[this2]),this.Font=font,this.TextAlign=textAlign},alphaTab.rendering.glyphs.TextGlyph.__name__=["alphaTab","rendering","glyphs","TextGlyph"],alphaTab.rendering.glyphs.TextGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.TextGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=this.Font.Size*this._lines.length},Paint:function(cx,cy,canvas){canvas.set_Font(this.Font);for(var old=canvas.get_TextAlign(),y=cy+this.Y,line=HxOverrides.iter(this._lines);line.hasNext();){var line1=line.next();canvas.set_TextAlign(this.TextAlign),canvas.FillText(line1,cx+this.X,y),canvas.set_TextAlign(old),y+=this.Font.Size}},__class__:alphaTab.rendering.glyphs.TextGlyph}),alphaTab.rendering.glyphs.TremoloPickingGlyph=$hx_exports.alphaTab.rendering.glyphs.TremoloPickingGlyph=function(x,y,duration){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.TremoloPickingGlyph.GetSymbol(duration))},alphaTab.rendering.glyphs.TremoloPickingGlyph.__name__=["alphaTab","rendering","glyphs","TremoloPickingGlyph"],alphaTab.rendering.glyphs.TremoloPickingGlyph.GetSymbol=function(duration){switch(duration){case 8:return 57888;case 16:return 57889;case 32:return 57890;default:return-1}},alphaTab.rendering.glyphs.TremoloPickingGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.TremoloPickingGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=12*this.get_Scale()},__class__:alphaTab.rendering.glyphs.TremoloPickingGlyph}),alphaTab.rendering.glyphs.TrillGlyph=$hx_exports.alphaTab.rendering.glyphs.TrillGlyph=function(x,y){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y)},alphaTab.rendering.glyphs.TrillGlyph.__name__=["alphaTab","rendering","glyphs","TrillGlyph"],alphaTab.rendering.glyphs.TrillGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.TrillGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=20*this.get_Scale()},Paint:function(cx,cy,canvas){var res=this.Renderer.get_Resources();canvas.set_Font(res.MarkerFont);var textw=canvas.MeasureText("tr");canvas.FillText("tr",cx+this.X,cy+this.Y+canvas.get_Font().Size/2);for(var startX=textw+3*this.get_Scale(),endX=this.Width-startX,step=11*this.get_Scale()*1.2,loops=Math.max(1,(endX-startX)/step),loopX=startX,loopY=cy+this.Y+this.Height,i=0;i0){var beatWidth=currentBeatGlyph.X-beatGlyphs[i-1].X;beatGlyphs[i-1].ScaleToWidth(beatWidth)}if(i==j-1){var beatWidth1=this.Width-beatGlyphs[beatGlyphs.length-1].X;currentBeatGlyph.ScaleToWidth(beatWidth1)}++i}},RegisterLayoutingInfo:function(info){info.UpdateVoiceSize(this.Width);for(var b=$iterator(this.BeatGlyphs)();b.hasNext();){b.next().RegisterLayoutingInfo(info)}},ApplyLayoutingInfo:function(info){for(var b=$iterator(this.BeatGlyphs)();b.hasNext();){b.next().ApplyLayoutingInfo(info)}this.ScaleToForce(Math.max(this.Renderer.get_Settings().StretchForce,info.MinStretchForce))},AddGlyph:function(g){g.X=0==this.BeatGlyphs.length?0:this.BeatGlyphs[this.BeatGlyphs.length-1].X+this.BeatGlyphs[this.BeatGlyphs.length-1].Width,g.Renderer=this.Renderer,g.DoLayout(),this.BeatGlyphs.push(js.Boot.__cast(g,alphaTab.rendering.glyphs.BeatContainerGlyph)),this.Width=g.X+g.Width},DoLayout:function(){this.MinWidth=this.Width},Paint:function(cx,cy,canvas){canvas.set_Color(0==this.Voice.Index?this.Renderer.ScoreRenderer.RenderingResources.MainGlyphColor:this.Renderer.ScoreRenderer.RenderingResources.SecondaryGlyphColor);for(var i=0,j=this.BeatGlyphs.length;ithis.VoiceSize&&(this.VoiceSize=size,this.Version++)},SetPreBeatSize:function(beat,size){(!this.PreBeatSizes.hasOwnProperty(beat.Index)||this.PreBeatSizes[beat.Index]spring.LongestDuration&&(spring.LongestDuration=duration),spring.AllDurations.push(duration);else{if((spring=new alphaTab.rendering.staves.Spring).TimePosition=start,spring.AllDurations.push(duration),this._timeSortedSprings.length>0)for(var smallestDuration=duration,previousSpring=this._timeSortedSprings[this._timeSortedSprings.length-1],prevDuration=$iterator(previousSpring.AllDurations)();prevDuration.hasNext();){var prevDuration1=prevDuration.next();previousSpring.TimePosition+prevDuration1>=start&&prevDuration10&&timeSorted[insertPos].TimePosition>start;)--insertPos;this._timeSortedSprings.splice(insertPos+1,0,spring)}return this._minTime>start&&(this._minTime=start),spring},AddBeatSpring:function(beat,preBeatSize,postBeatSize){var start=beat.get_AbsoluteDisplayStart();return this.AddSpring(start,beat.DisplayDuration,preBeatSize,postBeatSize)},Finish:function(){this.CalculateSpringConstants(),this.Version++},CalculateSpringConstants:function(){this._xMin=0;for(var springs=this.Springs,time=$iterator(Object.keys(springs))();time.hasNext();){var spring=springs[time.next()];spring.get_SpringWidth()m&&(m=r.TopOverflow),++i}return m},get_BottomOverflow:function(){for(var m=0,i=0,j=this.BarRenderers.length;im&&(m=r.BottomOverflow),++i}return m},FinalizeStaff:function(){var x=0;this.Height=0;for(var topOverflow=this.get_TopOverflow(),bottomOverflow=this.get_BottomOverflow(),i=0;i0&&(this.Height=this.Height+(this.TopSpacing+topOverflow+bottomOverflow+this.BottomSpacing))},Paint:function(cx,cy,canvas,startIndex,count){if(0!=this.Height&&0!=count)for(var i=startIndex,j=Math.min(startIndex+count,this.BarRenderers.length);i1){var toRemove=this.MasterBarsRenderers[this.MasterBarsRenderers.length-1],index=this.MasterBarsRenderers.length-1;-1!=index&&this.MasterBarsRenderers.splice(index,1);for(var w=0,i=0,j=this._allStaves.length;irealWidth&&(realWidth=s.BarRenderers[s.BarRenderers.length-1].Width),++i}return this.Width=this.Width+realWidth,realWidth},CalculateAccoladeSpacing:function(tracks){if(!this._accoladeSpacingCalculated&&0==this.Index)if(this._accoladeSpacingCalculated=!0,this.Layout.Renderer.Settings.Layout.Get("hideTrackNames",!1))this.AccoladeSpacing=0;else{var canvas=this.Layout.Renderer.Canvas,res=this.Layout.Renderer.RenderingResources.EffectFont;canvas.set_Font(res);for(var t=HxOverrides.iter(tracks);t.hasNext();){var t1=t.next(),this1=Math.max(this.AccoladeSpacing,canvas.MeasureText(t1.ShortName));this.AccoladeSpacing=js.Boot.__cast(Math.ceil(this1),Float)}this.AccoladeSpacing=this.AccoladeSpacing+20,this.Width=this.Width+this.AccoladeSpacing}},GetStaveTrackGroup:function(track){for(var i=0,j=this.Staves.length;i0&&0==startIndex){if(null!=this._firstStaffInAccolade&&null!=this._lastStaffInAccolade){var firstStart=cy+this._firstStaffInAccolade.Y+this._firstStaffInAccolade.StaveTop+this._firstStaffInAccolade.TopSpacing+this._firstStaffInAccolade.get_TopOverflow(),lastEnd=cy+this._lastStaffInAccolade.Y+this._lastStaffInAccolade.TopSpacing+this._lastStaffInAccolade.get_TopOverflow()+this._lastStaffInAccolade.StaveBottom,acooladeX=cx+this._firstStaffInAccolade.X;canvas.set_Color(res.BarSeperatorColor),canvas.BeginPath(),canvas.MoveTo(acooladeX,firstStart),canvas.LineTo(acooladeX,lastEnd),canvas.Stroke()}canvas.set_Font(res.EffectFont);for(var i1=0,j1=this.Staves.length;i10?this._firstStaffInAccolade.BarRenderers[0].TopPadding:0),visualHeight=visualBottom-visualTop,lineHeight=cy+this.Y+lastStaff.Y+lastStaff.Height-lastStaff.BottomSpacing-lastStaff.get_BottomOverflow()-(lastStaff.BarRenderers.length>0?lastStaff.BarRenderers[0].BottomPadding:0)-lineTop,realHeight=realBottom-realTop,x=this.X+this._firstStaffInAccolade.X,staveGroupBounds=new alphaTab.rendering.utils.StaveGroupBounds,_tmp=new alphaTab.rendering.utils.Bounds;_tmp.X=cx,_tmp.Y=cy+this.Y,_tmp.W=this.Width,_tmp.H=this.get_Height(),staveGroupBounds.VisualBounds=_tmp;var _tmp1=new alphaTab.rendering.utils.Bounds;_tmp1.X=cx,_tmp1.Y=cy+this.Y,_tmp1.W=this.Width,_tmp1.H=this.get_Height(),staveGroupBounds.RealBounds=_tmp1,this.Layout.Renderer.get_BoundsLookup().AddStaveGroup(staveGroupBounds);for(var masterBarBoundsLookup=[],i=0;ithis.MaxNoteValue)&&(this.MaxNoteValue=noteValue,this.MaxNoteValueBeat=note.Beat),this.GetAccidental(line,noteValue,quarterBend)},ApplyAccidentalForValue:function(relatedBeat,noteValue,quarterBend){var line=this.RegisterNoteValueLine(noteValue);return(-1==this.MinNoteValue||noteValuethis.MaxNoteValue)&&(this.MaxNoteValue=noteValue,this.MaxNoteValueBeat=relatedBeat),this.GetAccidental(line,noteValue,quarterBend)},GetAccidental:function(line,noteValue,quarterBend){var accidentalToSet=0;if(2!=this._bar.Staff.StaffKind){var ksi=this._bar.get_MasterBar().KeySignature+7,index=noteValue%12,keySignatureAccidental=ksi<7?3:2,hasNoteAccidentalForKeySignature=alphaTab.rendering.utils.AccidentalHelper.KeySignatureLookup[ksi][index],isAccidentalNote=alphaTab.rendering.utils.AccidentalHelper.AccidentalNotes[index];if(quarterBend)accidentalToSet=isAccidentalNote?keySignatureAccidental:1;else{var isAccidentalRegistered=this._registeredAccidentals.hasOwnProperty(line);if(hasNoteAccidentalForKeySignature==isAccidentalNote||isAccidentalRegistered){if(hasNoteAccidentalForKeySignature==isAccidentalNote&&isAccidentalRegistered){delete this._registeredAccidentals[line],accidentalToSet=isAccidentalNote?keySignatureAccidental:1}}else this._registeredAccidentals[line]=!0,accidentalToSet=isAccidentalNote?keySignatureAccidental:1}}if(quarterBend)switch(accidentalToSet){case 1:return 4;case 2:return 5;case 3:return 6}return accidentalToSet},RegisterNoteLine:function(n,noteValue){var steps=this.CalculateNoteLine(noteValue,n.AccidentalMode);return this._appliedScoreLines[n.Id]=steps,this._notesByValue[noteValue]=n,steps},RegisterNoteValueLine:function(noteValue){var steps=this.CalculateNoteLine(noteValue,0);return this._appliedScoreLinesByValue[noteValue]=steps,steps},CalculateNoteLine:function(noteValue,mode){var value=2==this._bar.Staff.StaffKind?alphaTab.rendering.utils.PercussionMapper.MapNoteForDisplay(noteValue):noteValue,ks=this._bar.get_MasterBar().KeySignature,clef=this._bar.Clef,index=value%12,octave=(value/12|0)-1,steps=alphaTab.rendering.utils.AccidentalHelper.OctaveSteps[clef];steps-=7*octave;var stepList=alphaTab.model.ModelUtils.KeySignatureIsSharp(ks)||alphaTab.model.ModelUtils.KeySignatureIsNatural(ks)?alphaTab.rendering.utils.AccidentalHelper.SharpNoteSteps:alphaTab.rendering.utils.AccidentalHelper.FlatNoteSteps;return stepList[index],steps-=stepList[index]},GetNoteLine:function(n){return this._appliedScoreLines[n.Id]},GetNoteLineForValue:function(rawValue,searchForNote){return null==searchForNote&&(searchForNote=!1),this._appliedScoreLinesByValue.hasOwnProperty(rawValue)?this._appliedScoreLinesByValue[rawValue]:searchForNote&&this._notesByValue.hasOwnProperty(rawValue)?this.GetNoteLine(this._notesByValue[rawValue]):0},__class__:alphaTab.rendering.utils.AccidentalHelper},alphaTab.rendering.utils.BarBounds=$hx_exports.alphaTab.rendering.utils.BarBounds=function(){this.MasterBarBounds=null,this.VisualBounds=null,this.RealBounds=null,this.Bar=null,this.Beats=null;this.Beats=[]},alphaTab.rendering.utils.BarBounds.__name__=["alphaTab","rendering","utils","BarBounds"],alphaTab.rendering.utils.BarBounds.prototype={AddBeat:function(bounds){bounds.BarBounds=this,this.Beats.push(bounds),this.MasterBarBounds.AddBeat(bounds)},FindBeatAtPos:function(x){for(var beat=null,i=0;ix)break;++i}return beat},__class__:alphaTab.rendering.utils.BarBounds},alphaTab.rendering.utils.BarHelpers=$hx_exports.alphaTab.rendering.utils.BarHelpers=function(bar){this.BeamHelpers=null,this.BeamHelperLookup=null,this.TupletHelpers=null;this.BeamHelpers=[];this.BeamHelperLookup=[];this.TupletHelpers=[];var currentBeamHelper=null,currentTupletHelper=null;if(null!=bar)for(var i=0,j=bar.Voices.length;i1):forceNewTupletHelper=!0,(currentBeamHelper=new alphaTab.rendering.utils.BeamingHelper(bar.Staff)).CheckBeat(b),this.BeamHelpers[v.Index].push(currentBeamHelper)),b.get_HasTuplet()){var previousBeat=b.PreviousBeat;null!=previousBeat&&previousBeat.Voice!=b.Voice&&(previousBeat=null),forceNewTupletHelper&&null!=currentTupletHelper&¤tTupletHelper.Finish(),null!=previousBeat&&null!=currentTupletHelper&¤tTupletHelper.Check(b)||((currentTupletHelper=new alphaTab.rendering.utils.TupletHelper(v.Index)).Check(b),this.TupletHelpers[v.Index].push(currentTupletHelper))}this.BeamHelperLookup[v.Index][b.Index]=currentBeamHelper,++k}null!=currentBeamHelper&¤tBeamHelper.Finish(),null!=currentTupletHelper&¤tTupletHelper.Finish(),currentBeamHelper=null,currentTupletHelper=null,++i}},alphaTab.rendering.utils.BarHelpers.__name__=["alphaTab","rendering","utils","BarHelpers"],alphaTab.rendering.utils.BarHelpers.prototype={GetBeamingHelperForBeat:function(beat){return this.BeamHelperLookup[beat.Voice.Index][beat.Index]},__class__:alphaTab.rendering.utils.BarHelpers},alphaTab.rendering.utils._BeamDirection={},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_=$hx_exports.alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_={},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.__name__=["alphaTab","rendering","utils","_BeamDirection","BeamDirection_Impl_"],alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.toString=function(this1){switch(this1){case 0:return"Up";case 1:return"Down"}return""},alphaTab.rendering.utils.BeamingHelper=$hx_exports.alphaTab.rendering.utils.BeamingHelper=function(staff){this._staff=null,this._beatLineXPositions=null,this.Voice=null,this.Beats=null,this.ShortestDuration=-4,this.FingeringCount=0,this.HasTuplet=!1,this.FirstMinNoteValue=0,this.FirstMaxNoteValue=0,this.LastMinNoteValue=0,this.LastMaxNoteValue=0,this.MinNoteValue=0,this.MinNoteBeat=null,this.MaxNoteValue=0,this.MaxNoteBeat=null,this.InvertBeamDirection=!1,this.IsGrace=!1,this.Direction=0,this._staff=staff;this.Beats=[];this._beatLineXPositions={},this.ShortestDuration=-4,this.MaxNoteValue=-2147483648,this.MinNoteValue=-2147483648,this.FirstMinNoteValue=-2147483648,this.FirstMaxNoteValue=-2147483648,this.LastMinNoteValue=-2147483648,this.LastMaxNoteValue=-2147483648},alphaTab.rendering.utils.BeamingHelper.__name__=["alphaTab","rendering","utils","BeamingHelper"],alphaTab.rendering.utils.BeamingHelper.CanJoin=function(b1,b2){if(null==b1||null==b2||b1.get_IsRest()||b2.get_IsRest()||b1.GraceType!=b2.GraceType||3==b1.GraceType||3==b2.GraceType)return!1;var m1=b1.Voice.Bar;if(m1!=b1.Voice.Bar)return!1;var start1=b1.PlaybackStart,start2=b2.PlaybackStart;if(!alphaTab.rendering.utils.BeamingHelper.CanJoinDuration(b1.Duration)||!alphaTab.rendering.utils.BeamingHelper.CanJoinDuration(b2.Duration))return start1==start2;var divisionLength=960;8==m1.get_MasterBar().TimeSignatureDenominator&&m1.get_MasterBar().TimeSignatureNumerator%3==0&&(divisionLength+=480);return(0|(divisionLength+start1)/divisionLength)==(0|(divisionLength+start2)/divisionLength)},alphaTab.rendering.utils.BeamingHelper.CanJoinDuration=function(d){switch(d){case 1:case 2:case 4:return!1;default:return!0}},alphaTab.rendering.utils.BeamingHelper.IsFullBarJoin=function(a,b,barIndex){return alphaTab.model.ModelUtils.GetIndex(a.Duration)-2-barIndex>0&&alphaTab.model.ModelUtils.GetIndex(b.Duration)-2-barIndex>0},alphaTab.rendering.utils.BeamingHelper.prototype={GetValue:function(n){return 2==this._staff.StaffKind?alphaTab.rendering.utils.PercussionMapper.MapNoteForDisplay(n.get_RealValue()):n.get_DisplayValue()},GetMaxValue:function(n){var value=this.GetValue(n);return 0!=n.HarmonicType&&1!=n.HarmonicType&&(value=n.get_RealValue()-this._staff.DisplayTranspositionPitch),value},GetMinValue:function(n){return this.GetValue(n)},GetBeatLineX:function(beat){if(this.HasBeatLineX(beat)){if(0==this.Direction){return system.Convert.ToInt32_Single(this._beatLineXPositions[beat.Index].Up)}return system.Convert.ToInt32_Single(this._beatLineXPositions[beat.Index].Down)}return 0},HasBeatLineX:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)},RegisterBeatLineX:function(staffId,beat,up,down){var positions=this.GetOrCreateBeatPositions(beat);positions.StaffId=staffId,positions.Up=up,positions.Down=down},GetOrCreateBeatPositions:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)?this._beatLineXPositions[beat.Index]:this._beatLineXPositions[beat.Index]=new alphaTab.rendering.utils.BeatLinePositions},Finish:function(){this.Direction=this.CalculateDirection()},CalculateDirection:function(){if(this.Voice.Index>0)return this.Invert(1);if(this.Voice.Bar.Voices.length>1)for(var v=1;vthis.FingeringCount&&(this.FingeringCount=fingeringCount),this.LastMinNoteValue=-2147483648,this.LastMaxNoteValue=-2147483648,this.CheckNote(beat.MinNote),this.CheckNote(beat.MaxNote),positions.MinNoteValue=this.LastMinNoteValue,positions.MaxNoteValue=this.LastMaxNoteValue,this.ShortestDurationthis.FirstMaxNoteValue)&&(this.FirstMaxNoteValue=value)),(-2147483648==this.LastMinNoteValue||valuethis.LastMaxNoteValue)&&(this.LastMaxNoteValue=value);var minValue=this.GetMinValue(note);(-2147483648==this.MinNoteValue||this.MinNoteValue>minValue)&&(this.MinNoteValue=minValue,this.MinNoteBeat=note.Beat);var maxValue=this.GetMaxValue(note);(-2147483648==this.MaxNoteValue||this.MaxNoteValueendY&&startY-endY>maxDistance&&(endY=startY-maxDistance),1==direction&&endY>startY&&endY-startY>maxDistance&&(startY=endY-maxDistance),0==direction&&startYmaxDistance&&(endY=startY+maxDistance),0==direction&&endYmaxDistance&&(startY=endY+maxDistance),startX==endX?startY:(endY-startY)/(endX-startX)*(xPosition-startX)+startY},IsPositionFrom:function(staffId,beat){return!this._beatLineXPositions.hasOwnProperty(beat.Index)||this._beatLineXPositions[beat.Index].StaffId==staffId},GetBeatMinValue:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)?this._beatLineXPositions[beat.Index].MinNoteValue:beat.MinNote.get_DisplayValue()},GetBeatMaxValue:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)?this._beatLineXPositions[beat.Index].MaxNoteValue:beat.MaxNote.get_DisplayValue()},__class__:alphaTab.rendering.utils.BeamingHelper},alphaTab.rendering.utils.BeatBounds=$hx_exports.alphaTab.rendering.utils.BeatBounds=function(){this.BarBounds=null,this.VisualBounds=null,this.RealBounds=null,this.Beat=null},alphaTab.rendering.utils.BeatBounds.__name__=["alphaTab","rendering","utils","BeatBounds"],alphaTab.rendering.utils.BeatBounds.prototype={__class__:alphaTab.rendering.utils.BeatBounds},alphaTab.rendering.utils.BeatLinePositions=$hx_exports.alphaTab.rendering.utils.BeatLinePositions=function(){this.StaffId=null,this.Up=0,this.Down=0,this.MinNoteValue=0,this.MaxNoteValue=0},alphaTab.rendering.utils.BeatLinePositions.__name__=["alphaTab","rendering","utils","BeatLinePositions"],alphaTab.rendering.utils.BeatLinePositions.prototype={__class__:alphaTab.rendering.utils.BeatLinePositions},alphaTab.rendering.utils.Bounds=$hx_exports.alphaTab.rendering.utils.Bounds=function(){this.X=0,this.Y=0,this.W=0,this.H=0},alphaTab.rendering.utils.Bounds.__name__=["alphaTab","rendering","utils","Bounds"],alphaTab.rendering.utils.Bounds.prototype={__class__:alphaTab.rendering.utils.Bounds},alphaTab.rendering.utils.BoundsLookup=$hx_exports.alphaTab.rendering.utils.BoundsLookup=function(){this._beatLookup=null,this._masterBarLookup=null,this._currentStaveGroup=null,this.StaveGroups=null,this.IsFinished=!1;this.StaveGroups=[];this._beatLookup={};this._masterBarLookup={}},alphaTab.rendering.utils.BoundsLookup.__name__=["alphaTab","rendering","utils","BoundsLookup"],alphaTab.rendering.utils.BoundsLookup.FromJson=function(json,score){for(var lookup=new alphaTab.rendering.utils.BoundsLookup,staveGroup=$iterator(json.StaveGroups)();staveGroup.hasNext();){var staveGroup1=staveGroup.next(),sg=new alphaTab.rendering.utils.StaveGroupBounds;sg.VisualBounds=staveGroup1.VisualBounds,sg.RealBounds=staveGroup1.RealBounds,lookup.AddStaveGroup(sg);for(var masterBar=$iterator(staveGroup1.Bars)();masterBar.hasNext();){var masterBar1=masterBar.next(),mb=new alphaTab.rendering.utils.MasterBarBounds;mb.Index=masterBar1.Index,mb.IsFirstOfLine=masterBar1.IsFirstOfLine,mb.LineAlignedBounds=masterBar1.LineAlignedBounds,mb.VisualBounds=masterBar1.VisualBounds,mb.RealBounds=masterBar1.RealBounds,sg.AddBar(mb);for(var bar=$iterator(masterBar1.Bars)();bar.hasNext();){var bar1=bar.next(),b=new alphaTab.rendering.utils.BarBounds;b.VisualBounds=bar1.VisualBounds,b.RealBounds=bar1.RealBounds,mb.AddBar(b);for(var beat=$iterator(bar1.Beats)();beat.hasNext();){var beat1=beat.next(),bb=new alphaTab.rendering.utils.BeatBounds;bb.VisualBounds=beat1.VisualBounds,bb.RealBounds=beat1.RealBounds,bb.Beat=score.Tracks[beat1.TrackIndex].Staves[beat1.StaffIndex].Bars[beat1.BarIndex].Voices[beat1.VoiceIndex].Beats[beat1.BeatIndex],b.AddBeat(bb)}}}}return lookup},alphaTab.rendering.utils.BoundsLookup.prototype={ToJson:function(){var json={},staveGroups=[];json.StaveGroups=staveGroups;for(var group=$iterator(this.StaveGroups)();group.hasNext();){var group1=group.next(),g={};g.VisualBounds=this.BoundsToJson(group1.VisualBounds),g.RealBounds=this.BoundsToJson(group1.RealBounds);g.Bars=[];for(var masterBar=$iterator(group1.Bars)();masterBar.hasNext();){var masterBar1=masterBar.next(),mb={};mb.LineAlignedBounds=this.BoundsToJson(masterBar1.LineAlignedBounds),mb.VisualBounds=this.BoundsToJson(masterBar1.VisualBounds),mb.RealBounds=this.BoundsToJson(masterBar1.RealBounds),mb.Index=masterBar1.Index;mb.Bars=[];for(var bar=$iterator(masterBar1.Bars)();bar.hasNext();){var bar1=bar.next(),b={};b.VisualBounds=this.BoundsToJson(bar1.VisualBounds),b.RealBounds=this.BoundsToJson(bar1.RealBounds);b.Beats=[];for(var beat=$iterator(bar1.Beats)();beat.hasNext();){var beat1=beat.next(),bb={};bb.VisualBounds=this.BoundsToJson(beat1.VisualBounds),bb.RealBounds=this.BoundsToJson(beat1.RealBounds),bb.BeatIndex=beat1.Beat.Index,bb.VoiceIndex=beat1.Beat.Voice.Index,bb.BarIndex=beat1.Beat.Voice.Bar.Index,bb.StaffIndex=beat1.Beat.Voice.Bar.Staff.Index,bb.TrackIndex=beat1.Beat.Voice.Bar.Staff.Track.Index,b.Beats.push(bb)}mb.Bars.push(b)}g.Bars.push(mb)}staveGroups.push(g)}return json},BoundsToJson:function(bounds){var json={};return json.X=bounds.X,json.Y=bounds.Y,json.W=bounds.W,json.H=bounds.H,json},Finish:function(){for(var i=0;i=group.RealBounds.Y&&y<=group.RealBounds.Y+group.RealBounds.H){staveGroupIndex=middle;break}yb.RealBounds.Y?1:a.RealBounds.Xb.RealBounds.X?1:0;var a,b})},AddBeat:function(bounds){this.StaveGroupBounds.BoundsLookup.AddBeat(bounds)},__class__:alphaTab.rendering.utils.MasterBarBounds},alphaTab.rendering.utils.PercussionMapper=$hx_exports.alphaTab.rendering.utils.PercussionMapper=function(){},alphaTab.rendering.utils.PercussionMapper.__name__=["alphaTab","rendering","utils","PercussionMapper"],alphaTab.rendering.utils.PercussionMapper.MidiFromElementVariation=function(note){return alphaTab.rendering.utils.PercussionMapper.ElementVariationToMidi[note.Element][note.Variation]},alphaTab.rendering.utils.PercussionMapper.MapNoteForDisplay=function(value){return 61==value||66==value?50:60==value||65==value?52:value>=35&&value<=36||44==value?53:41==value||64==value?55:43==value||62==value?57:45==value||63==value?59:47==value||54==value?62:48==value||56==value?64:50==value?65:42==value||46==value||value>=49&&value<=53||57==value||59==value?67:60},alphaTab.rendering.utils.PercussionMapper.prototype={__class__:alphaTab.rendering.utils.PercussionMapper},alphaTab.rendering.utils.StaveGroupBounds=$hx_exports.alphaTab.rendering.utils.StaveGroupBounds=function(){this.Index=0,this.VisualBounds=null,this.RealBounds=null,this.Bars=null,this.BoundsLookup=null;this.Bars=[],this.Index=0},alphaTab.rendering.utils.StaveGroupBounds.__name__=["alphaTab","rendering","utils","StaveGroupBounds"],alphaTab.rendering.utils.StaveGroupBounds.prototype={Finish:function(){for(var i=0;ithis.Bars[i].RealBounds.X+this.Bars[i].RealBounds.W)break;++i}return b},__class__:alphaTab.rendering.utils.StaveGroupBounds},alphaTab.rendering.utils.TupletHelper=$hx_exports.alphaTab.rendering.utils.TupletHelper=function(voice){this._isFinished=!1,this.Beats=null,this.VoiceIndex=0,this.Tuplet=0,this.VoiceIndex=voice;this.Beats=[]},alphaTab.rendering.utils.TupletHelper.__name__=["alphaTab","rendering","utils","TupletHelper"],alphaTab.rendering.utils.TupletHelper.prototype={get_IsFull:function(){return this.Beats.length==this.Tuplet},Finish:function(){this._isFinished=!0},Check:function(beat){if(0==this.Beats.length)this.Tuplet=beat.TupletNumerator;else if(beat.Voice.Index!=this.VoiceIndex||beat.TupletNumerator!=this.Tuplet||this.get_IsFull()||this._isFinished)return!1;return this.Beats.push(beat),!0},__class__:alphaTab.rendering.utils.TupletHelper},alphaTab.util.Lazy=$hx_exports.alphaTab.util.Lazy=function(factory){this._factory=null,this._created=!1,this._value=null,this._factory=factory},alphaTab.util.Lazy.__name__=["alphaTab","util","Lazy"],alphaTab.util.Lazy.prototype={get_Value:function(){return this._created||(this._value=this._factory(),this._created=!0),this._value},__class__:alphaTab.util.Lazy},alphaTab.util._LogLevel={},alphaTab.util._LogLevel.LogLevel_Impl_=$hx_exports.alphaTab.util._LogLevel.LogLevel_Impl_={},alphaTab.util._LogLevel.LogLevel_Impl_.__name__=["alphaTab","util","_LogLevel","LogLevel_Impl_"],alphaTab.util._LogLevel.LogLevel_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Debug";case 2:return"Info";case 3:return"Warning";case 4:return"Error"}return""},alphaTab.utils={},alphaTab.utils._UnionData={},alphaTab.utils._UnionData.UnionData_Impl_=$hx_exports.alphaTab.utils._UnionData.UnionData_Impl_={},alphaTab.utils._UnionData.UnionData_Impl_.__name__=["alphaTab","utils","_UnionData","UnionData_Impl_"],alphaTab.utils._UnionData.UnionData_Impl_._new=function(){return new DataView(new ArrayBuffer(8))},alphaTab.utils._UnionData.UnionData_Impl_.get_Double1=function(this1){return this1.getFloat64(0,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Float1=function(this1){return this1.getFloat32(0,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Float2=function(this1){return this1.getFloat32(4,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Int1=function(this1){return this1.getInt32(0,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Int2=function(this1){return this1.getInt32(4,!0)},alphaTab.xml={},alphaTab.xml.XmlNode=$hx_exports.alphaTab.xml.XmlNode=function(){this.NodeType=0,this.LocalName=null,this.Value=null,this.ChildNodes=null,this.Attributes=null,this.FirstChild=null,this.FirstElement=null;this.Attributes={};this.ChildNodes=[]},alphaTab.xml.XmlNode.__name__=["alphaTab","xml","XmlNode"],alphaTab.xml.XmlNode.prototype={AddChild:function(node){this.ChildNodes.push(node),this.FirstChild=node,1==node.NodeType&&(this.FirstElement=node)},GetAttribute:function(name){return this.Attributes.hasOwnProperty(name)?this.Attributes[name]:""},GetElementsByTagName:function(name,recursive){null==recursive&&(recursive=!1);var tags=[];return this.SearchElementsByTagName(this.ChildNodes,tags,name,recursive),tags},SearchElementsByTagName:function(all,result,name,recursive){null==recursive&&(recursive=!1);for(var c=$iterator(all)();c.hasNext();){var c1=c.next();null!=c1&&1==c1.NodeType&&c1.LocalName==name&&result.push(c1),recursive&&this.SearchElementsByTagName(c1.ChildNodes,result,name,!0)}},FindChildElement:function(name){for(var c=$iterator(this.ChildNodes)();c.hasNext();){var c1=c.next();if(null!=c1&&1==c1.NodeType&&c1.LocalName==name)return c1}return null},get_InnerText:function(){if(1==this.NodeType||9==this.NodeType){for(var txt="",c=$iterator(this.ChildNodes)();c.hasNext();){var c1=c.next();txt+=Std.string(c1.get_InnerText())}return StringTools.trim(txt)}return this.Value},__class__:alphaTab.xml.XmlNode},alphaTab.xml.XmlDocument=$hx_exports.alphaTab.xml.XmlDocument=function(xml){alphaTab.xml.XmlNode.call(this),this.DocumentElement=null,this.NodeType=9,alphaTab.xml.XmlParser.Parse(xml,0,this);for(var child=$iterator(this.ChildNodes)();child.hasNext();){var child1=child.next();if(1==child1.NodeType){this.DocumentElement=child1;break}}},alphaTab.xml.XmlDocument.__name__=["alphaTab","xml","XmlDocument"],alphaTab.xml.XmlDocument.__super__=alphaTab.xml.XmlNode,alphaTab.xml.XmlDocument.prototype=$extend(alphaTab.xml.XmlNode.prototype,{__class__:alphaTab.xml.XmlDocument}),alphaTab.xml.XmlException=$hx_exports.alphaTab.xml.XmlException=function(){alphaTab.AlphaTabException.call(this),this.Xml=null,this.Pos=0},alphaTab.xml.XmlException.__name__=["alphaTab","xml","XmlException"],alphaTab.xml.XmlException.__super__=alphaTab.AlphaTabException,alphaTab.xml.XmlException.prototype=$extend(alphaTab.AlphaTabException.prototype,{XmlException:function(message,xml,pos){return this.AlphaTabException(message),this.Xml=null,this.Pos=0,this.Xml=xml,this.Pos=pos,this},__class__:alphaTab.xml.XmlException}),alphaTab.xml._XmlNodeType={},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_=$hx_exports.alphaTab.xml._XmlNodeType.XmlNodeType_Impl_={},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.__name__=["alphaTab","xml","_XmlNodeType","XmlNodeType_Impl_"],alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Element";case 2:return"Attribute";case 3:return"Text";case 4:return"CDATA";case 5:return"EntityReference";case 6:return"Entity";case 7:return"ProcessingInstruction";case 8:return"Comment";case 9:return"Document";case 10:return"DocumentType";case 11:return"DocumentFragment";case 12:return"Notation";case 13:return"Whitespace";case 14:return"SignificantWhitespace";case 15:return"EndElement";case 16:return"EndEntity";case 17:return"XmlDeclaration"}return""},alphaTab.xml.XmlParser=$hx_exports.alphaTab.xml.XmlParser=function(){},alphaTab.xml.XmlParser.__name__=["alphaTab","xml","XmlParser"],alphaTab.xml.XmlParser.Parse=function(str,p,parent){for(var c=system.Convert.ToUInt16(HxOverrides.cca(str,p)),state=1,next=1,start=0,buf="",escapeNext=1,xml=null,aname=null,nbrackets=0,attrValQuote=0;p";throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException(tmp3,str,p))}state=0,next=12;continue}break;case 11:if(62!=c)throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException("Expected >",str,p));state=1;break;case 12:if(62==c)return p;throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException("Expected >",str,p));case 13:if(60==c){buf+=Std.string(HxOverrides.substr(str,start,p-start));var child=new alphaTab.xml.XmlNode;child.NodeType=3,child.Value=buf;buf="",parent.AddChild(child),state=0,next=2}else 38==c&&(buf+=Std.string(HxOverrides.substr(str,start,p-start)),state=18,escapeNext=13,start=p+1);break;case 14:var tmp4;if(63==c){tmp4=62==system.Convert.ToUInt16(HxOverrides.cca(str,p+1))}else tmp4=!1;tmp4&&(++p,state=1);break;case 15:var tmp5,tmp6;if(45==c){tmp6=45==system.Convert.ToUInt16(HxOverrides.cca(str,p+1))}else tmp6=!1;if(tmp6){tmp5=62==system.Convert.ToUInt16(HxOverrides.cca(str,p+2))}else tmp5=!1;tmp5&&(p+=2,state=1);break;case 16:if(91==c)++nbrackets;else if(93==c)--nbrackets;else if(62==c&&0==nbrackets){var node=new alphaTab.xml.XmlNode;node.NodeType=10,node.Value=HxOverrides.substr(str,start,p-start),parent.AddChild(node),state=1}break;case 17:var tmp7,tmp8;if(93==c){tmp8=93==system.Convert.ToUInt16(HxOverrides.cca(str,p+1))}else tmp8=!1;if(tmp8){tmp7=62==system.Convert.ToUInt16(HxOverrides.cca(str,p+2))}else tmp7=!1;if(tmp7){var child1=new alphaTab.xml.XmlNode;child1.NodeType=4,child1.Value=HxOverrides.substr(str,start,p-start),parent.AddChild(child1),p+=2,state=1}break;case 18:if(c==system.Convert.ToUInt16(59)){var s=HxOverrides.substr(str,start,p-start);if(35==system.Convert.ToUInt16(HxOverrides.cca(s,0))){var code;code=120==system.Convert.ToUInt16(HxOverrides.cca(s,1))?alphaTab.platform.Platform.ParseInt("0"+HxOverrides.substr(s,1,s.length-1)):alphaTab.platform.Platform.ParseInt(HxOverrides.substr(s,1,s.length-1)),buf+=String.fromCharCode(code)}else alphaTab.xml.XmlParser.Escapes.hasOwnProperty(s)?buf+=Std.string(alphaTab.xml.XmlParser.Escapes[s]):buf+=Std.string("&"+s+";");start=p+1,state=escapeNext}else alphaTab.xml.XmlParser.IsValidChar(c)||35==c||(buf+=Std.string("&"),buf+=Std.string(HxOverrides.substr(str,start,p-start)),start=--p+1,state=escapeNext)}++p}if(1==state&&(start=p,state=13),13==state){if(p!=start){buf+=Std.string(HxOverrides.substr(str,start,p-start));var node1=new alphaTab.xml.XmlNode;node1.NodeType=3,node1.Value=buf,parent.AddChild(node1)}return p}if(18==state&&13==escapeNext){buf+=Std.string("&"),buf+=Std.string(HxOverrides.substr(str,start,p-start));var node2=new alphaTab.xml.XmlNode;return node2.NodeType=3,node2.Value=buf,parent.AddChild(node2),p}throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException("Unexpected end",str,p))},alphaTab.xml.XmlParser.IsValidChar=function(c){return c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||58==c||46==c||95==c||45==c},alphaTab.xml.XmlParser.prototype={__class__:alphaTab.xml.XmlParser},alphaTab.xml.XmlParser_XmlState=$hx_exports.alphaTab.xml.XmlParser_XmlState=function(){},alphaTab.xml.XmlParser_XmlState.__name__=["alphaTab","xml","XmlParser_XmlState"],alphaTab.xml.XmlParser_XmlState.prototype={__class__:alphaTab.xml.XmlParser_XmlState},haxe.IMap=function(){},haxe.IMap.__name__=["haxe","IMap"],haxe._Int64={},haxe._Int64.___Int64=function(high,low){this.high=high,this.low=low},haxe._Int64.___Int64.__name__=["haxe","_Int64","___Int64"],haxe._Int64.___Int64.prototype={__class__:haxe._Int64.___Int64},haxe.crypto={},haxe.crypto.Adler32=function(){this.a1=1,this.a2=0},haxe.crypto.Adler32.__name__=["haxe","crypto","Adler32"],haxe.crypto.Adler32.read=function(i){var a=new haxe.crypto.Adler32,a2a=i.readByte(),a2b=i.readByte(),a1a=i.readByte(),a1b=i.readByte();return a.a1=a1a<<8|a1b,a.a2=a2a<<8|a2b,a},haxe.crypto.Adler32.prototype={update:function(b,pos,len){for(var a1=this.a1,a2=this.a2,_g1=pos,_g=pos+len;_g1<_g;){var p=_g1++;a2=(a2+(a1=(a1+b.b[p])%65521))%65521}this.a1=a1,this.a2=a2},equals:function(a){return a.a1==this.a1&&a.a2==this.a2},__class__:haxe.crypto.Adler32};haxe.ds={},haxe.ds.IntMap=function(){this.h={}},haxe.ds.IntMap.__name__=["haxe","ds","IntMap"],haxe.ds.IntMap.__interfaces__=[haxe.IMap],haxe.ds.IntMap.prototype={__class__:haxe.ds.IntMap},haxe.io.Bytes=function(data){this.length=data.byteLength,this.b=new Uint8Array(data),this.b.bufferValue=data,data.hxBytes=this,data.bytes=this.b},haxe.io.Bytes.__name__=["haxe","io","Bytes"],haxe.io.Bytes.prototype={blit:function(pos,src,srcpos,len){if(pos<0||srcpos<0||len<0||pos+len>this.length||srcpos+len>src.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);0==srcpos&&len==src.b.byteLength?this.b.set(src.b,pos):this.b.set(src.b.subarray(srcpos,srcpos+len),pos)},getString:function(pos,len){if(pos<0||len<0||pos+len>this.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);for(var s="",b=this.b,fcc=String.fromCharCode,i=pos,max=pos+len;i>10)),s+=fcc(1023&u|56320)}}return s},toString:function(){return this.getString(0,this.length)},__class__:haxe.io.Bytes},haxe.io.BytesBuffer=function(){this.b=[]},haxe.io.BytesBuffer.__name__=["haxe","io","BytesBuffer"],haxe.io.BytesBuffer.prototype={getBytes:function(){var bytes=new haxe.io.Bytes(new Uint8Array(this.b).buffer);return this.b=null,bytes},__class__:haxe.io.BytesBuffer},haxe.io.Eof=function(){},haxe.io.Eof.__name__=["haxe","io","Eof"],haxe.io.Eof.prototype={toString:function(){return"Eof"},__class__:haxe.io.Eof},haxe.io.Error={__ename__:!0,__constructs__:["Blocked","Overflow","OutsideBounds","Custom"]},haxe.io.Error.Blocked=["Blocked",0],haxe.io.Error.Blocked.toString=$estr,haxe.io.Error.Blocked.__enum__=haxe.io.Error,haxe.io.Error.Overflow=["Overflow",1],haxe.io.Error.Overflow.toString=$estr,haxe.io.Error.Overflow.__enum__=haxe.io.Error,haxe.io.Error.OutsideBounds=["OutsideBounds",2],haxe.io.Error.OutsideBounds.toString=$estr,haxe.io.Error.OutsideBounds.__enum__=haxe.io.Error,haxe.io.Error.Custom=function(e){var $x=["Custom",3,e];return $x.__enum__=haxe.io.Error,$x.toString=$estr,$x},haxe.io.FPHelper=function(){},haxe.io.FPHelper.__name__=["haxe","io","FPHelper"],haxe.io.FPHelper.i32ToFloat=function(i){var exp=i>>>23&255,sig=8388607&i;return 0==sig&&0==exp?0:(1-(i>>>31<<1))*(1+Math.pow(2,-23)*sig)*Math.pow(2,exp-127)},haxe.io.FPHelper.floatToI32=function(f){if(0==f)return 0;var af=f<0?-f:f,exp=Math.floor(Math.log(af)/.6931471805599453);exp<-127?exp=-127:exp>128&&(exp=128);var sig=Math.round(8388608*(af/Math.pow(2,exp)-1));return 8388608==sig&&exp<128&&(sig=0,++exp),(f<0?-2147483648:0)|exp+127<<23|sig},haxe.io.FPHelper.i64ToDouble=function(low,high){var exp=(high>>20&2047)-1023,sig=4294967296*(1048575&high)+2147483648*(low>>>31)+(2147483647&low);return 0==sig&&-1023==exp?0:(1-(high>>>31<<1))*(1+Math.pow(2,-52)*sig)*Math.pow(2,exp)},haxe.io.FPHelper.doubleToI64=function(v){var i64=haxe.io.FPHelper.i64tmp;if(0==v)i64.low=0,i64.high=0;else if(isFinite(v)){var av=v<0?-v:v,exp=Math.floor(Math.log(av)/.6931471805599453),sig=Math.round(4503599627370496*(av/Math.pow(2,exp)-1)),sig_l=0|sig,sig_h=sig/4294967296|0;i64.low=sig_l,i64.high=(v<0?-2147483648:0)|exp+1023<<20|sig_h}else v>0?(i64.low=0,i64.high=2146435072):(i64.low=0,i64.high=-1048576);return i64},haxe.zip={},haxe.zip.ExtraField={__ename__:!0,__constructs__:["FUnknown","FInfoZipUnicodePath","FUtf8"]},haxe.zip.ExtraField.FUnknown=function(tag,bytes){var $x=["FUnknown",0,tag,bytes];return $x.__enum__=haxe.zip.ExtraField,$x.toString=$estr,$x},haxe.zip.ExtraField.FInfoZipUnicodePath=function(name,crc){var $x=["FInfoZipUnicodePath",1,name,crc];return $x.__enum__=haxe.zip.ExtraField,$x.toString=$estr,$x},haxe.zip.ExtraField.FUtf8=["FUtf8",2],haxe.zip.ExtraField.FUtf8.toString=$estr,haxe.zip.ExtraField.FUtf8.__enum__=haxe.zip.ExtraField,haxe.zip.Huffman={__ename__:!0,__constructs__:["Found","NeedBit","NeedBits"]},haxe.zip.Huffman.Found=function(i){var $x=["Found",0,i];return $x.__enum__=haxe.zip.Huffman,$x.toString=$estr,$x},haxe.zip.Huffman.NeedBit=function(left,right){var $x=["NeedBit",1,left,right];return $x.__enum__=haxe.zip.Huffman,$x.toString=$estr,$x},haxe.zip.Huffman.NeedBits=function(n,table){var $x=["NeedBits",2,n,table];return $x.__enum__=haxe.zip.Huffman,$x.toString=$estr,$x},haxe.zip.HuffTools=function(){},haxe.zip.HuffTools.__name__=["haxe","zip","HuffTools"],haxe.zip.HuffTools.prototype={treeDepth:function(t){switch(t[1]){case 0:return 0;case 1:var b=t[3],a=t[2],da=this.treeDepth(a),db=this.treeDepth(b);return 1+(da0?(this.treeWalk(table,p,cd+1,d-1,a),this.treeWalk(table,p|1<maxbits)throw new js._Boot.HaxeError("Invalid huffman");var idx=v<<5|len;return bits.h.hasOwnProperty(idx)?haxe.zip.Huffman.Found(bits.h[idx]):(v<<=1,++len,haxe.zip.Huffman.NeedBit(this.treeMake(bits,maxbits,v,len),this.treeMake(bits,maxbits,1|v,len)))},make:function(lengths,pos,nlengths,maxbits){var counts=[],tmp=[];if(maxbits>32)throw new js._Boot.HaxeError("Invalid huffman");for(var _g1=0,_g=maxbits;_g1<_g;){_g1++;counts.push(0),tmp.push(0)}for(var _g11=0,_g2=nlengths;_g11<_g2;){var p=lengths[_g11+++pos];if(p>=maxbits)throw new js._Boot.HaxeError("Invalid huffman");counts[p]++}for(var code=0,_g12=1,_g3=maxbits-1;_g12<_g3;){var i2=_g12++;code=code+counts[i2]<<1,tmp[i2]=code}for(var bits=new haxe.ds.IntMap,_g13=0,_g4=nlengths;_g13<_g4;){var i3=_g13++,l=lengths[i3+pos];if(0!=l){var n=tmp[l-1];tmp[l-1]=n+1,bits.h[n<<5|l]=i3}}return this.treeCompress(haxe.zip.Huffman.NeedBit(this.treeMake(bits,maxbits,0,1),this.treeMake(bits,maxbits,1,1)))},__class__:haxe.zip.HuffTools},haxe.zip._InflateImpl={},haxe.zip._InflateImpl.Window=function(hasCrc){this.buffer=new haxe.io.Bytes(new ArrayBuffer(65536)),this.pos=0,hasCrc&&(this.crc=new haxe.crypto.Adler32)},haxe.zip._InflateImpl.Window.__name__=["haxe","zip","_InflateImpl","Window"],haxe.zip._InflateImpl.Window.prototype={slide:function(){null!=this.crc&&this.crc.update(this.buffer,0,32768);var b=new haxe.io.Bytes(new ArrayBuffer(65536));this.pos-=32768,b.blit(0,this.buffer,32768,this.pos),this.buffer=b},addBytes:function(b,p,len){this.pos+len>65536&&this.slide(),this.buffer.blit(this.pos,b,p,len),this.pos+=len},addByte:function(c){65536==this.pos&&this.slide(),this.buffer.b[this.pos]=255&c,this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){return null!=this.crc&&this.crc.update(this.buffer,0,this.pos),this.crc},__class__:haxe.zip._InflateImpl.Window},haxe.zip._InflateImpl.State={__ename__:!0,__constructs__:["Head","Block","CData","Flat","Crc","Dist","DistOne","Done"]},haxe.zip._InflateImpl.State.Head=["Head",0],haxe.zip._InflateImpl.State.Head.toString=$estr,haxe.zip._InflateImpl.State.Head.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Block=["Block",1],haxe.zip._InflateImpl.State.Block.toString=$estr,haxe.zip._InflateImpl.State.Block.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.CData=["CData",2],haxe.zip._InflateImpl.State.CData.toString=$estr,haxe.zip._InflateImpl.State.CData.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Flat=["Flat",3],haxe.zip._InflateImpl.State.Flat.toString=$estr,haxe.zip._InflateImpl.State.Flat.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Crc=["Crc",4],haxe.zip._InflateImpl.State.Crc.toString=$estr,haxe.zip._InflateImpl.State.Crc.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Dist=["Dist",5],haxe.zip._InflateImpl.State.Dist.toString=$estr,haxe.zip._InflateImpl.State.Dist.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.DistOne=["DistOne",6],haxe.zip._InflateImpl.State.DistOne.toString=$estr,haxe.zip._InflateImpl.State.DistOne.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Done=["Done",7],haxe.zip._InflateImpl.State.Done.toString=$estr,haxe.zip._InflateImpl.State.Done.__enum__=haxe.zip._InflateImpl.State,haxe.zip.InflateImpl=function(i,header,crc){null==crc&&(crc=!0),null==header&&(header=!0),this.final=!1,this.htools=new haxe.zip.HuffTools,this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.len=0,this.dist=0,this.state=header?haxe.zip._InflateImpl.State.Head:haxe.zip._InflateImpl.State.Block,this.input=i,this.bits=0,this.nbits=0,this.needed=0,this.output=null,this.outpos=0,this.lengths=[];for(var _g=0;_g<19;){_g++;this.lengths.push(-1)}this.window=new haxe.zip._InflateImpl.Window(crc)},haxe.zip.InflateImpl.__name__=["haxe","zip","InflateImpl"],haxe.zip.InflateImpl.prototype={buildFixedHuffman:function(){if(null!=haxe.zip.InflateImpl.FIXED_HUFFMAN)return haxe.zip.InflateImpl.FIXED_HUFFMAN;for(var a=[],_g=0;_g<288;){var n=_g++;a.push(n<=143?8:n<=255?9:n<=279?7:8)}return haxe.zip.InflateImpl.FIXED_HUFFMAN=this.htools.make(a,0,288,10),haxe.zip.InflateImpl.FIXED_HUFFMAN},readBytes:function(b,pos,len){if(this.needed=len,this.outpos=pos,this.output=b,len>0)for(;this.inflateLoop(););return len-this.needed},getBits:function(n){for(;this.nbits>=n,b},getBit:function(){0==this.nbits&&(this.nbits=8,this.bits=this.input.readByte());var b=1==(1&this.bits);return this.nbits--,this.bits>>=1,b},getRevBits:function(n){return 0==n?0:this.getBit()?1<max)throw new js._Boot.HaxeError("Invalid data");for(;imax)throw new js._Boot.HaxeError("Invalid data");break;case 18:if((i+=11+this.getBits(7))>max)throw new js._Boot.HaxeError("Invalid data");break;default:throw new js._Boot.HaxeError("Invalid data")}}},inflateLoop:function(){switch(this.state[1]){case 0:var cmf=this.input.readByte();if(8!=(15&cmf))throw new js._Boot.HaxeError("Invalid data");var flg=this.input.readByte(),fdict=0!=(32&flg);if(((cmf<<8)+flg)%31!=0)throw new js._Boot.HaxeError("Invalid data");if(fdict)throw new js._Boot.HaxeError("Unsupported dictionary");return this.state=haxe.zip._InflateImpl.State.Block,!0;case 1:this.final=this.getBit();switch(this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw new js._Boot.HaxeError("Invalid data");this.state=haxe.zip._InflateImpl.State.Flat;var r=this.inflateLoop();return this.resetBits(),r;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=haxe.zip._InflateImpl.State.CData,!0;case 2:for(var hlit=this.getBits(5)+257,hdist=this.getBits(5)+1,hclen=this.getBits(4)+4,_g11=0,_g2=hclen;_g11<_g2;){var i=_g11++;this.lengths[haxe.zip.InflateImpl.CODE_LENGTHS_POS[i]]=this.getBits(3)}for(var _g3=hclen;_g3<19;){var i1=_g3++;this.lengths[haxe.zip.InflateImpl.CODE_LENGTHS_POS[i1]]=0}this.huffman=this.htools.make(this.lengths,0,19,8);for(var lengths=[],_g12=0,_g4=hlit+hdist;_g12<_g4;){_g12++;lengths.push(0)}return this.inflateLengths(lengths,hlit+hdist),this.huffdist=this.htools.make(lengths,hlit,hdist,16),this.huffman=this.htools.make(lengths,0,hlit,16),this.state=haxe.zip._InflateImpl.State.CData,!0;default:throw new js._Boot.HaxeError("Invalid data")}break;case 2:var n=this.applyHuffman(this.huffman);if(n<256)return this.addByte(n),this.needed>0;if(256==n)return this.state=this.final?haxe.zip._InflateImpl.State.Crc:haxe.zip._InflateImpl.State.Block,!0;n-=257;var extra_bits=haxe.zip.InflateImpl.LEN_EXTRA_BITS_TBL[n];if(-1==extra_bits)throw new js._Boot.HaxeError("Invalid data");this.len=haxe.zip.InflateImpl.LEN_BASE_VAL_TBL[n]+this.getBits(extra_bits);var dist_code=null==this.huffdist?this.getRevBits(5):this.applyHuffman(this.huffdist);if(-1==(extra_bits=haxe.zip.InflateImpl.DIST_EXTRA_BITS_TBL[dist_code]))throw new js._Boot.HaxeError("Invalid data");if(this.dist=haxe.zip.InflateImpl.DIST_BASE_VAL_TBL[dist_code]+this.getBits(extra_bits),this.dist>this.window.available())throw new js._Boot.HaxeError("Invalid data");return this.state=1==this.dist?haxe.zip._InflateImpl.State.DistOne:haxe.zip._InflateImpl.State.Dist,!0;case 3:var rlen=this.len0;case 4:var calc=this.window.checksum();if(null==calc)return this.state=haxe.zip._InflateImpl.State.Done,!0;var crc=haxe.crypto.Adler32.read(this.input);if(!calc.equals(crc))throw new js._Boot.HaxeError("Invalid CRC");return this.state=haxe.zip._InflateImpl.State.Done,!0;case 5:for(;this.len>0&&this.needed>0;){var rdist=this.len0;case 6:var rlen2=this.len0;case 7:return!1}},__class__:haxe.zip.InflateImpl},haxe.zip.Reader=function(i){this.i=i},haxe.zip.Reader.__name__=["haxe","zip","Reader"],haxe.zip.Reader.prototype={readZipDate:function(){var t=this.i.readUInt16(),hour=t>>11&31,min=t>>5&63,sec=31&t,d=this.i.readUInt16();return new Date((d>>9)+1980,(d>>5&15)-1,31&d,hour,min,sec<<1)},readExtraFields:function(length){for(var fields=new List;length>0;){if(length<4)throw new js._Boot.HaxeError("Invalid extra fields data");var tag=this.i.readUInt16(),len=this.i.readUInt16();if(lengthtmp.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);out.b;for(var b2=tmp.b,_g1=0,_g=n;_g1<_g;){var i=_g1++;out.b.push(b2[i])}if(n<65536)break}e.data=out.getBytes()}else e.data=this.i.read(e.dataSize);e.crc32=this.i.readInt32(),134695760==e.crc32&&(e.crc32=this.i.readInt32()),e.dataSize=this.i.readInt32(),e.fileSize=this.i.readInt32(),e.dataSize=e.fileSize,e.compressed=!1}else e.data=this.i.read(e.dataSize);l.add(e)}return l},__class__:haxe.zip.Reader},js._Boot={},js._Boot.HaxeError=function(val){Error.call(this),this.val=val,this.message=String(val),Error.captureStackTrace&&Error.captureStackTrace(this,js._Boot.HaxeError)},js._Boot.HaxeError.__name__=["js","_Boot","HaxeError"],js._Boot.HaxeError.wrap=function(val){return val instanceof Error?val:new js._Boot.HaxeError(val)},js._Boot.HaxeError.__super__=Error,js._Boot.HaxeError.prototype=$extend(Error.prototype,{__class__:js._Boot.HaxeError}),js.html={},js.html.compat={},js.html.compat.ArrayBuffer=function(a){if(a instanceof Array&&null==a.__enum__)this.a=a,this.byteLength=a.length;else{var len=a;this.a=[];for(var _g1=0,_g=len;_g1<_g;){var i=_g1++;this.a[i]=0}this.byteLength=len}},js.html.compat.ArrayBuffer.__name__=["js","html","compat","ArrayBuffer"],js.html.compat.ArrayBuffer.sliceImpl=function(begin,end){var u=new Uint8Array(this,begin,null==end?null:end-begin),result=new ArrayBuffer(u.byteLength);return new Uint8Array(result).set(u),result},js.html.compat.ArrayBuffer.prototype={slice:function(begin,end){return new js.html.compat.ArrayBuffer(this.a.slice(begin,end))},__class__:js.html.compat.ArrayBuffer},js.html.compat.DataView=function(buffer,byteOffset,byteLength){if(this.buf=buffer,this.offset=null==byteOffset?0:byteOffset,this.length=null==byteLength?buffer.byteLength-this.offset:byteLength,this.offset<0||this.length<0||this.offset+this.length>buffer.byteLength)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);this.byteLength=this.length,this.byteOffset=this.offset,this.buffer=this.buf},js.html.compat.DataView.__name__=["js","html","compat","DataView"],js.html.compat.DataView.prototype={getInt8:function(byteOffset){var v=this.buf.a[this.offset+byteOffset];return v>=128?v-256:v},getUint8:function(byteOffset){return this.buf.a[this.offset+byteOffset]},getInt16:function(byteOffset,littleEndian){var v=this.getUint16(byteOffset,littleEndian);return v>=32768?v-65536:v},getUint16:function(byteOffset,littleEndian){return littleEndian?this.buf.a[this.offset+byteOffset]|this.buf.a[this.offset+byteOffset+1]<<8:this.buf.a[this.offset+byteOffset]<<8|this.buf.a[this.offset+byteOffset+1]},getInt32:function(byteOffset,littleEndian){var p=this.offset+byteOffset,a=this.buf.a[p++],b=this.buf.a[p++],c=this.buf.a[p++],d=this.buf.a[p++];return littleEndian?a|b<<8|c<<16|d<<24:d|c<<8|b<<16|a<<24},getUint32:function(byteOffset,littleEndian){var v=this.getInt32(byteOffset,littleEndian);return v<0?v+4294967296:v},getFloat32:function(byteOffset,littleEndian){return haxe.io.FPHelper.i32ToFloat(this.getInt32(byteOffset,littleEndian))},getFloat64:function(byteOffset,littleEndian){var a=this.getInt32(byteOffset,littleEndian),b=this.getInt32(byteOffset+4,littleEndian);return haxe.io.FPHelper.i64ToDouble(littleEndian?a:b,littleEndian?b:a)},setInt8:function(byteOffset,value){this.buf.a[byteOffset+this.offset]=value<0?value+128&255:255&value},setUint8:function(byteOffset,value){this.buf.a[byteOffset+this.offset]=255&value},setInt16:function(byteOffset,value,littleEndian){this.setUint16(byteOffset,value<0?value+65536:value,littleEndian)},setUint16:function(byteOffset,value,littleEndian){var p=byteOffset+this.offset;littleEndian?(this.buf.a[p]=255&value,this.buf.a[p++]=value>>8&255):(this.buf.a[p++]=value>>8&255,this.buf.a[p]=255&value)},setInt32:function(byteOffset,value,littleEndian){this.setUint32(byteOffset,value,littleEndian)},setUint32:function(byteOffset,value,littleEndian){var p=byteOffset+this.offset;littleEndian?(this.buf.a[p++]=255&value,this.buf.a[p++]=value>>8&255,this.buf.a[p++]=value>>16&255,this.buf.a[p++]=value>>>24):(this.buf.a[p++]=value>>>24,this.buf.a[p++]=value>>16&255,this.buf.a[p++]=value>>8&255,this.buf.a[p++]=255&value)},setFloat32:function(byteOffset,value,littleEndian){this.setUint32(byteOffset,haxe.io.FPHelper.floatToI32(value),littleEndian)},setFloat64:function(byteOffset,value,littleEndian){var i64=haxe.io.FPHelper.doubleToI64(value);littleEndian?(this.setUint32(byteOffset,i64.low),this.setUint32(byteOffset,i64.high)):(this.setUint32(byteOffset,i64.high),this.setUint32(byteOffset,i64.low))},__class__:js.html.compat.DataView},js.html.compat.Float32Array=function(){},js.html.compat.Float32Array.__name__=["js","html","compat","Float32Array"],js.html.compat.Float32Array._new=function(arg1,offset,length){var arr;if("number"==typeof arg1){arr=[];for(var _g1=0,_g=arg1;_g1<_g;){arr[_g1++]=0}arr.byteLength=arr.length<<2,arr.byteOffset=0;for(var _g2=[],_g21=0,_g11=arr.length<<2;_g21<_g11;){_g21++;_g2.push(0)}arr.buffer=new js.html.compat.ArrayBuffer(_g2)}else if(js.Boot.__instanceof(arg1,js.html.compat.ArrayBuffer)){var buffer=arg1;null==offset&&(offset=0),null==length&&(length=buffer.byteLength-offset>>2),arr=[];for(var _g12=0,_g3=length;_g12<_g3;){_g12++;var val=buffer.a[offset++]|buffer.a[offset++]<<8|buffer.a[offset++]<<16|buffer.a[offset++]<<24;arr.push(haxe.io.FPHelper.i32ToFloat(val))}arr.byteLength=arr.length<<2,arr.byteOffset=offset,arr.buffer=buffer}else{if(!(arg1 instanceof Array&&null==arg1.__enum__))throw new js._Boot.HaxeError("TODO "+Std.string(arg1));arr=arg1.slice();for(var buffer1=[],_g4=0;_g4>8&255),buffer1.push(i3>>16&255),buffer1.push(i3>>>24)}arr.byteLength=arr.length<<2,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(buffer1)}return arr.subarray=js.html.compat.Float32Array._subarray,arr.set=js.html.compat.Float32Array._set,arr},js.html.compat.Float32Array._set=function(arg,offset){if(js.Boot.__instanceof(arg.buffer,js.html.compat.ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g1=0,_g=arg.byteLength;_g1<_g;){var i=_g1++;this[i+offset]=a[i]}}else{if(!(arg instanceof Array&&null==arg.__enum__))throw new js._Boot.HaxeError("TODO");var a1=arg;if(a1.length+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g11=0,_g2=a1.length;_g11<_g2;){var i1=_g11++;this[i1+offset]=a1[i1]}}},js.html.compat.Float32Array._subarray=function(start,end){var a=js.html.compat.Float32Array._new(this.slice(start,end));return a.byteOffset=4*start,a},js.html.compat.Float64Array=function(){},js.html.compat.Float64Array.__name__=["js","html","compat","Float64Array"],js.html.compat.Float64Array._new=function(arg1,offset,length){var arr;if("number"==typeof arg1){arr=[];for(var _g1=0,_g=arg1;_g1<_g;){arr[_g1++]=0}arr.byteLength=arr.length<<3,arr.byteOffset=0;for(var _g2=[],_g21=0,_g11=arr.length<<3;_g21<_g11;){_g21++;_g2.push(0)}arr.buffer=new js.html.compat.ArrayBuffer(_g2)}else if(js.Boot.__instanceof(arg1,js.html.compat.ArrayBuffer)){var buffer=arg1;null==offset&&(offset=0),null==length&&(length=buffer.byteLength-offset>>3),arr=[];for(var _g12=0,_g3=length;_g12<_g3;){_g12++;var val1=buffer.a[offset++]|buffer.a[offset++]<<8|buffer.a[offset++]<<16|buffer.a[offset++]<<24,val2=buffer.a[offset++]|buffer.a[offset++]<<8|buffer.a[offset++]<<16|buffer.a[offset++]<<24;arr.push(haxe.io.FPHelper.i64ToDouble(val1,val2))}arr.byteLength=arr.length<<3,arr.byteOffset=offset,arr.buffer=buffer}else{if(!(arg1 instanceof Array&&null==arg1.__enum__))throw new js._Boot.HaxeError("TODO "+Std.string(arg1));arr=arg1.slice();for(var buffer1=[],_g4=0;_g4>8&255),buffer1.push(i3>>16&255),buffer1.push(i3>>>24);var i4=v.high;buffer1.push(255&i4),buffer1.push(i4>>8&255),buffer1.push(i4>>16&255),buffer1.push(i4>>>24)}arr.byteLength=arr.length<<3,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(buffer1)}return arr.subarray=js.html.compat.Float64Array._subarray,arr.set=js.html.compat.Float64Array._set,arr},js.html.compat.Float64Array._set=function(arg,offset){if(js.Boot.__instanceof(arg.buffer,js.html.compat.ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g1=0,_g=arg.byteLength;_g1<_g;){var i=_g1++;this[i+offset]=a[i]}}else{if(!(arg instanceof Array&&null==arg.__enum__))throw new js._Boot.HaxeError("TODO");var a1=arg;if(a1.length+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g11=0,_g2=a1.length;_g11<_g2;){var i1=_g11++;this[i1+offset]=a1[i1]}}},js.html.compat.Float64Array._subarray=function(start,end){var a=js.html.compat.Float64Array._new(this.slice(start,end));return a.byteOffset=8*start,a},js.html.compat.Uint8Array=function(){},js.html.compat.Uint8Array.__name__=["js","html","compat","Uint8Array"],js.html.compat.Uint8Array._new=function(arg1,offset,length){var arr;if("number"==typeof arg1){arr=[];for(var _g1=0,_g=arg1;_g1<_g;){arr[_g1++]=0}arr.byteLength=arr.length,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(arr)}else if(js.Boot.__instanceof(arg1,js.html.compat.ArrayBuffer)){var buffer=arg1;null==offset&&(offset=0),null==length&&(length=buffer.byteLength-offset),(arr=0==offset?buffer.a:buffer.a.slice(offset,offset+length)).byteLength=arr.length,arr.byteOffset=offset,arr.buffer=buffer}else{if(!(arg1 instanceof Array&&null==arg1.__enum__))throw new js._Boot.HaxeError("TODO "+Std.string(arg1));(arr=arg1.slice()).byteLength=arr.length,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(arr)}return arr.subarray=js.html.compat.Uint8Array._subarray,arr.set=js.html.compat.Uint8Array._set,arr},js.html.compat.Uint8Array._set=function(arg,offset){if(js.Boot.__instanceof(arg.buffer,js.html.compat.ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g1=0,_g=arg.byteLength;_g1<_g;){var i=_g1++;this[i+offset]=a[i]}}else{if(!(arg instanceof Array&&null==arg.__enum__))throw new js._Boot.HaxeError("TODO");var a1=arg;if(a1.length+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g11=0,_g2=a1.length;_g11<_g2;){var i1=_g11++;this[i1+offset]=a1[i1]}}},js.html.compat.Uint8Array._subarray=function(start,end){var a=js.html.compat.Uint8Array._new(this.slice(start,end));return a.byteOffset=start,a},system.collections={},system.collections.generic={},system.collections.generic.IEnumerable=function(){},system.collections.generic.IEnumerable.__name__=["system","collections","generic","IEnumerable"],system._CsString={},system._CsString.CsString_Impl_={},system._CsString.CsString_Impl_.__name__=["system","_CsString","CsString_Impl_"],system._CsString.CsString_Impl_.Split_CharArray=function(this1,chars){for(var strings=[],startPos=0,_g1=0,_g=this1.length;_g1<_g;){var i=_g1++,cc=HxOverrides.cca(this1,i);if(chars.indexOf(cc)>=0){var endPos=i;endPosother?1:0},system.Int32ArrayIterator=function(array){this._array=array,this._i=0},system.Int32ArrayIterator.__name__=["system","Int32ArrayIterator"],system.Int32ArrayIterator.prototype={hasNext:function(){return this._i",alphaTab.xml.XmlParser.Escapes.amp="&",alphaTab.xml.XmlParser.Escapes.quot='"',alphaTab.xml.XmlParser.Escapes.apos="'";var ArrayBuffer=$global.ArrayBuffer||js.html.compat.ArrayBuffer;null==ArrayBuffer.prototype.slice&&(ArrayBuffer.prototype.slice=js.html.compat.ArrayBuffer.sliceImpl);var DataView=$global.DataView||js.html.compat.DataView,Float32Array=$global.Float32Array||js.html.compat.Float32Array._new,Float64Array=$global.Float64Array||($global.Float32Array?"notsupported":null)||js.html.compat.Float64Array._new,Uint8Array=$global.Uint8Array||js.html.compat.Uint8Array._new;alphaTab._DisplayMode.DisplayMode_Impl_.GuitarPro=0,alphaTab._DisplayMode.DisplayMode_Impl_.SongBook=1,alphaTab.platform.svg.SvgCanvas.BlurCorrection=0,alphaTab.platform.model.Color.BlackRgb="#000000",system.Convert._conversionBuffer=new ArrayBuffer(8),system.Convert._int8Buffer=new Int8Array(system.Convert._conversionBuffer),system.Convert._uint8Buffer=new Uint8Array(system.Convert._conversionBuffer),system.Convert._int16Buffer=new Int16Array(system.Convert._conversionBuffer),system.Convert._uint16Buffer=new Uint16Array(system.Convert._conversionBuffer),system.Convert._int32Buffer=new Int32Array(system.Convert._conversionBuffer),system.Convert._uint32Buffer=new Uint32Array(system.Convert._conversionBuffer),alphaTab.platform.javaScript.Html5Canvas.BlurCorrection=0,js.Boot.__toStr={}.toString,alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPrefix="alphaSynth.",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdInitialize="alphaSynth.initialize",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetLogLevel="alphaSynth.setLogLevel",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetMasterVolume="alphaSynth.setMasterVolume",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetMetronomeVolume="alphaSynth.setMetronomeVolume",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetPlaybackSpeed="alphaSynth.setPlaybackSpeed",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetTickPosition="alphaSynth.setTickPosition",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetTimePosition="alphaSynth.setTimePosition",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetPlaybackRange="alphaSynth.setPlaybackRange",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetIsLooping="alphaSynth.setIsLooping",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPlay="alphaSynth.play",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPause="alphaSynth.pause",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPlayPause="alphaSynth.playPause",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdStop="alphaSynth.stop",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdLoadSoundFontBytes="alphaSynth.loadSoundFontBytes",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdLoadMidi="alphaSynth.loadMidi",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelMute="alphaSynth.setChannelMute",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelSolo="alphaSynth.setChannelSolo",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelVolume="alphaSynth.setChannelVolume",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelProgram="alphaSynth.setChannelProgram",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdResetChannelStates="alphaSynth.resetChannelStates",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdReady="alphaSynth.ready",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdReadyForPlayback="alphaSynth.readyForPlayback",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPositionChanged="alphaSynth.positionChanged",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPlayerStateChanged="alphaSynth.playerStateChanged",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdFinished="alphaSynth.finished",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSoundFontLoaded="alphaSynth.soundFontLoaded",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSoundFontLoadFailed="alphaSynth.soundFontLoadFailed",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdMidiLoaded="alphaSynth.midiLoaded",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdMidiLoadFailed="alphaSynth.midiLoadFailed",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdLog="alphaSynth.log",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputPrefix="alphaSynth.output.",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputSequencerFinished="alphaSynth.output.sequencerFinished",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputAddSamples="alphaSynth.output.addSamples",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputPlay="alphaSynth.output.play",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputPause="alphaSynth.output.pause",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputResetSamples="alphaSynth.output.resetSamples",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputSampleRequest="alphaSynth.output.sampleRequest",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputFinished="alphaSynth.output.finished",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputSamplesPlayed="alphaSynth.output.samplesPlayed",alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSine=new alphaTab.audio.synth.bank.components.generators.SineGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSaw=new alphaTab.audio.synth.bank.components.generators.SawGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSquare=new alphaTab.audio.synth.bank.components.generators.SquareGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultTriangle=new alphaTab.audio.synth.bank.components.generators.TriangleGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.rendering.layout.PageViewLayout.PagePadding=new Float32Array([40,40,40,40]),alphaTab.rendering.layout.PageViewLayout.GroupSpacing=20,alphaTab.rendering.layout.HorizontalScreenLayout.PagePadding=new Float32Array([20,20,20,20]),alphaTab.rendering.layout.HorizontalScreenLayout.GroupSpacing=20,alphaTab.Environment.StaveProfileScoreTab="score-tab",alphaTab.Environment.StaveProfileTab="tab",alphaTab.Environment.StaveProfileTabMixed="tab-mixed",alphaTab.Environment.StaveProfileScore="score",alphaTab._FingeringMode.FingeringMode_Impl_.Score=0,alphaTab._FingeringMode.FingeringMode_Impl_.SingleNoteEffectBand=1,alphaTab.audio.MidiUtils.QuarterTime=960,alphaTab.audio.MidiUtils.MinVelocity=15,alphaTab.audio.MidiUtils.VelocityIncrement=16,alphaTab.audio.generator.MidiFileGenerator.DefaultDurationDead=30,alphaTab.audio.generator.MidiFileGenerator.DefaultDurationPalmMute=80,alphaTab.audio.generator.MidiFileGenerator.DefaultBend=64,alphaTab.audio.generator.MidiFileGenerator.DefaultBendSemitone=2.75,alphaTab.audio.synth._PlayerState.PlayerState_Impl_.Paused=0,alphaTab.audio.synth._PlayerState.PlayerState_Impl_.Playing=1,alphaTab.audio.synth.bank.PatchBank.DrumBank=128,alphaTab.audio.synth.bank.PatchBank.BankSize=128,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Delay=0,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Attack=1,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Hold=2,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Decay=3,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Sustain=4,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Release=5,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.None=6,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.None=0,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.BiquadLowpass=1,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.BiquadHighpass=2,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.OnePoleLowpass=3,alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.Delay=0,alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.Sustain=1,alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.Neg3dBCenter=0,alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.Neg6dBCenter=1,alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ZeroCenter=2,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.PreLoop=0,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.Loop=1,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.PostLoop=2,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.Finished=3,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.NoLoop=0,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.OneShot=1,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.Continuous=2,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.LoopUntilNoteOff=3,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Sine=0,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Square=1,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Saw=2,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Triangle=3,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.SampleData=4,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.WhiteNoise=5,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.ChannelKeyVelocity=0,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.ChannelKey=1,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.KeyVelocity=2,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.Key=3,alphaTab.audio.synth.midi.MidiHelper.MicroSecondsPerMinute=6e7,alphaTab.audio.synth.midi.MidiHelper.MinChannel=0,alphaTab.audio.synth.midi.MidiHelper.MaxChannel=15,alphaTab.audio.synth.midi.MidiHelper.DrumChannel=9,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.BankSelectCoarse=0,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ModulationCoarse=1,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.DataEntryCoarse=6,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.VolumeCoarse=7,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.PanCoarse=10,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ExpressionControllerCoarse=11,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ModulationFine=33,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.DataEntryFine=38,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.VolumeFine=39,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.PanFine=42,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ExpressionControllerFine=43,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.HoldPedal=64,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.LegatoPedal=68,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.NonRegisteredParameterFine=98,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.NonRegisteredParameterCourse=99,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.RegisteredParameterFine=100,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.RegisteredParameterCourse=101,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ResetControllers=121,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.AllNotesOff=123,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SequenceNumber=0,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.TextEvent=1,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.CopyrightNotice=2,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SequenceOrTrackName=3,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.InstrumentName=4,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.LyricText=5,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.MarkerText=6,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.CuePoint=7,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.PatchName=8,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.PortName=9,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.MidiChannel=32,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.MidiPort=33,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.EndOfTrack=47,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.Tempo=81,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SmpteOffset=84,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.TimeSignature=88,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.KeySignature=89,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SequencerSpecific=127,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.NoteOff=128,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.NoteOn=144,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.NoteAftertouch=160,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.Controller=176,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ProgramChange=192,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ChannelAftertouch=208,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.PitchBend=224,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.Meta=255,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SystemExclusive=240,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.MtcQuarterFrame=241,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SongPosition=242,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SongSelect=243,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.TuneRequest=246,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SystemExclusive2=247,alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.MinToMax=0,alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.MaxToMin=1,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartAddressOffset=0,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndAddressOffset=1,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartLoopAddressOffset=2,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndLoopAddressOffset=3,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartAddressCoarseOffset=4,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationLFOToPitch=5,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.VibratoLFOToPitch=6,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationEnvelopeToPitch=7,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.InitialFilterCutoffFrequency=8,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.InitialFilterQ=9,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationLFOToFilterCutoffFrequency=10,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationEnvelopeToFilterCutoffFrequency=11,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndAddressCoarseOffset=12,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationLFOToVolume=13,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused1=14,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ChorusEffectsSend=15,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ReverbEffectsSend=16,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Pan=17,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused2=18,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused3=19,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused4=20,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayModulationLFO=21,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.FrequencyModulationLFO=22,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayVibratoLFO=23,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.FrequencyVibratoLFO=24,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayModulationEnvelope=25,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.AttackModulationEnvelope=26,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.HoldModulationEnvelope=27,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DecayModulationEnvelope=28,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SustainModulationEnvelope=29,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ReleaseModulationEnvelope=30,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToModulationEnvelopeHold=31,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToModulationEnvelopeDecay=32,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayVolumeEnvelope=33,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.AttackVolumeEnvelope=34,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.HoldVolumeEnvelope=35,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DecayVolumeEnvelope=36,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SustainVolumeEnvelope=37,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ReleaseVolumeEnvelope=38,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToVolumeEnvelopeHold=39,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToVolumeEnvelopeDecay=40,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Instrument=41,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Reserved1=42,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyRange=43,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.VelocityRange=44,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartLoopAddressCoarseOffset=45,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumber=46,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Velocity=47,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.InitialAttenuation=48,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Reserved2=49,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndLoopAddressCoarseOffset=50,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.CoarseTune=51,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.FineTune=52,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SampleID=53,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SampleModes=54,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Reserved3=55,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ScaleTuning=56,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ExclusiveClass=57,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.OverridingRootKey=58,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused5=59,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.UnusedEnd=60,alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.Unipolar=0,alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.Bipolar=1,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.MonoSample=1,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RightSample=2,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.LeftSample=4,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.LinkedSample=8,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.OggVobis=16,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomMonoSample=32769,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomRightSample=32770,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomLeftSample=32772,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomLinkedSample=32776,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Linear=0,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Concave=1,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Convex=2,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Switch=3,alphaTab.audio.synth.sf2._TransformEnum.TransformEnum_Impl_.Linear=0,alphaTab.audio.synth.sf2._TransformEnum.TransformEnum_Impl_.AbsoluteValue=2,alphaTab.audio.synth.synthesis._VoiceStateEnum.VoiceStateEnum_Impl_.Stopped=0,alphaTab.audio.synth.synthesis._VoiceStateEnum.VoiceStateEnum_Impl_.Stopping=1,alphaTab.audio.synth.synthesis._VoiceStateEnum.VoiceStateEnum_Impl_.Playing=2,alphaTab.audio.synth.util.SynthConstants.AudioChannels=2,alphaTab.audio.synth.util.SynthConstants.Pi=3.14159265358979,alphaTab.audio.synth.util.SynthConstants.TwoPi=6.28318530717958,alphaTab.audio.synth.util.SynthConstants.HalfPi=1.570796326794895,alphaTab.audio.synth.util.SynthConstants.InverseSqrtOfTwo=.707106781186,alphaTab.audio.synth.util.SynthConstants.DefaultLfoFrequency=8,alphaTab.audio.synth.util.SynthConstants.DefaultModDepth=100,alphaTab.audio.synth.util.SynthConstants.DefaultPolyphony=40,alphaTab.audio.synth.util.SynthConstants.MinPolyphony=5,alphaTab.audio.synth.util.SynthConstants.MaxPolyphony=250,alphaTab.audio.synth.util.SynthConstants.DefaultBlockSize=64,alphaTab.audio.synth.util.SynthConstants.MaxBufferSize=.05,alphaTab.audio.synth.util.SynthConstants.MinBufferSize=.001,alphaTab.audio.synth.util.SynthConstants.DenormLimit=1e-38,alphaTab.audio.synth.util.SynthConstants.NonAudible=1e-5,alphaTab.audio.synth.util.SynthConstants.SincWidth=16,alphaTab.audio.synth.util.SynthConstants.SincResolution=64,alphaTab.audio.synth.util.SynthConstants.MaxVoiceComponents=4,alphaTab.audio.synth.util.SynthConstants.DefaultChannelCount=17,alphaTab.audio.synth.util.SynthConstants.DefaultKeyCount=128,alphaTab.audio.synth.util.SynthConstants.DefaultMixGain=.35,alphaTab.audio.synth.util.SynthConstants.MinVolume=0,alphaTab.audio.synth.util.SynthConstants.MaxVolume=10,alphaTab.audio.synth.util.SynthConstants.MinProgram=0,alphaTab.audio.synth.util.SynthConstants.MaxProgram=127,alphaTab.audio.synth.util.SynthConstants.MinPlaybackSpeed=.125,alphaTab.audio.synth.util.SynthConstants.MaxPlaybackSpeed=8,alphaTab.importer.AlphaTexImporter.Eof=0,alphaTab.importer.AlphaTexImporter.TrackChannels=new Int32Array([0,1]),alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.No=0,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Eof=1,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Number=2,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.DoubleDot=3,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Dot=4,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.String=5,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Tuning=6,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.LParensis=7,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.RParensis=8,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.LBrace=9,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.RBrace=10,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Pipe=11,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.MetaCommand=12,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Multiply=13,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.LowerThan=14,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Boolean=0,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Integer=1,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Float=2,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.String=3,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Point=4,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Size=5,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Rectangle=6,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Color=7,alphaTab.importer.Gp3To5Importer.VersionString="FICHIER GUITAR PRO ",alphaTab.importer.Gp3To5Importer.BendStep=25,alphaTab.importer.GpifParser.InvalidId="-1",alphaTab.importer.GpifParser.BendPointPositionFactor=.6,alphaTab.importer.GpifParser.BendPointValueFactor=.04,alphaTab.importer.GpxFileSystem.HeaderBcFs="BCFS",alphaTab.importer.GpxFileSystem.HeaderBcFz="BCFZ",alphaTab.importer.GpxFileSystem.ScoreGpif="score.gpif",alphaTab.importer.GpxFileSystem.BinaryStylesheet="BinaryStylesheet",alphaTab.importer.MusicXmlImporter.MergePartGroupsSetting="musicXMLMergePartGroups",alphaTab.io.BitReader.ByteSize=8,alphaTab.model._AccentuationType.AccentuationType_Impl_.None=0,alphaTab.model._AccentuationType.AccentuationType_Impl_.Normal=1,alphaTab.model._AccentuationType.AccentuationType_Impl_.Heavy=2,alphaTab.model._AccidentalType.AccidentalType_Impl_.None=0,alphaTab.model._AccidentalType.AccidentalType_Impl_.Natural=1,alphaTab.model._AccidentalType.AccidentalType_Impl_.Sharp=2,alphaTab.model._AccidentalType.AccidentalType_Impl_.Flat=3,alphaTab.model._AccidentalType.AccidentalType_Impl_.NaturalQuarterNoteUp=4,alphaTab.model._AccidentalType.AccidentalType_Impl_.SharpQuarterNoteUp=5,alphaTab.model._AccidentalType.AccidentalType_Impl_.FlatQuarterNoteUp=6,alphaTab.model._AutomationType.AutomationType_Impl_.Tempo=0,alphaTab.model._AutomationType.AutomationType_Impl_.Volume=1,alphaTab.model._AutomationType.AutomationType_Impl_.Instrument=2,alphaTab.model._AutomationType.AutomationType_Impl_.Balance=3,alphaTab.model.Bar.GlobalBarId=0,alphaTab.model.Beat.GlobalBeatId=0,alphaTab.model.BendPoint.MaxPosition=60,alphaTab.model.BendPoint.MaxValue=12,alphaTab.model._BendStyle.BendStyle_Impl_.Default=0,alphaTab.model._BendStyle.BendStyle_Impl_.Gradual=1,alphaTab.model._BendStyle.BendStyle_Impl_.Fast=2,alphaTab.model._BendType.BendType_Impl_.None=0,alphaTab.model._BendType.BendType_Impl_.Custom=1,alphaTab.model._BendType.BendType_Impl_.Bend=2,alphaTab.model._BendType.BendType_Impl_.Release=3,alphaTab.model._BendType.BendType_Impl_.BendRelease=4,alphaTab.model._BendType.BendType_Impl_.Hold=5,alphaTab.model._BendType.BendType_Impl_.Prebend=6,alphaTab.model._BendType.BendType_Impl_.PrebendBend=7,alphaTab.model._BendType.BendType_Impl_.PrebendRelease=8,alphaTab.model._BrushType.BrushType_Impl_.None=0,alphaTab.model._BrushType.BrushType_Impl_.BrushUp=1,alphaTab.model._BrushType.BrushType_Impl_.BrushDown=2,alphaTab.model._BrushType.BrushType_Impl_.ArpeggioUp=3,alphaTab.model._BrushType.BrushType_Impl_.ArpeggioDown=4,alphaTab.model._Clef.Clef_Impl_.Neutral=0,alphaTab.model._Clef.Clef_Impl_.C3=1,alphaTab.model._Clef.Clef_Impl_.C4=2,alphaTab.model._Clef.Clef_Impl_.F4=3,alphaTab.model._Clef.Clef_Impl_.G2=4,alphaTab.model._CrescendoType.CrescendoType_Impl_.None=0,alphaTab.model._CrescendoType.CrescendoType_Impl_.Crescendo=1,alphaTab.model._CrescendoType.CrescendoType_Impl_.Decrescendo=2,alphaTab.model._Duration.Duration_Impl_.QuadrupleWhole=-4,alphaTab.model._Duration.Duration_Impl_.DoubleWhole=-2,alphaTab.model._Duration.Duration_Impl_.Whole=1,alphaTab.model._Duration.Duration_Impl_.Half=2,alphaTab.model._Duration.Duration_Impl_.Quarter=4,alphaTab.model._Duration.Duration_Impl_.Eighth=8,alphaTab.model._Duration.Duration_Impl_.Sixteenth=16,alphaTab.model._Duration.Duration_Impl_.ThirtySecond=32,alphaTab.model._Duration.Duration_Impl_.SixtyFourth=64,alphaTab.model._Duration.Duration_Impl_.OneHundredTwentyEighth=128,alphaTab.model._Duration.Duration_Impl_.TwoHundredFiftySixth=256,alphaTab.model._DynamicValue.DynamicValue_Impl_.PPP=0,alphaTab.model._DynamicValue.DynamicValue_Impl_.PP=1,alphaTab.model._DynamicValue.DynamicValue_Impl_.P=2,alphaTab.model._DynamicValue.DynamicValue_Impl_.MP=3,alphaTab.model._DynamicValue.DynamicValue_Impl_.MF=4,alphaTab.model._DynamicValue.DynamicValue_Impl_.F=5,alphaTab.model._DynamicValue.DynamicValue_Impl_.FF=6,alphaTab.model._DynamicValue.DynamicValue_Impl_.FFF=7,alphaTab.model._FermataType.FermataType_Impl_.Short=0,alphaTab.model._FermataType.FermataType_Impl_.Medium=1,alphaTab.model._FermataType.FermataType_Impl_.Long=2,alphaTab.model._Fingers.Fingers_Impl_.Unknown=-2,alphaTab.model._Fingers.Fingers_Impl_.NoOrDead=-1,alphaTab.model._Fingers.Fingers_Impl_.Thumb=0,alphaTab.model._Fingers.Fingers_Impl_.IndexFinger=1,alphaTab.model._Fingers.Fingers_Impl_.MiddleFinger=2,alphaTab.model._Fingers.Fingers_Impl_.AnnularFinger=3,alphaTab.model._Fingers.Fingers_Impl_.LittleFinger=4,alphaTab.model._GraceType.GraceType_Impl_.None=0,alphaTab.model._GraceType.GraceType_Impl_.OnBeat=1,alphaTab.model._GraceType.GraceType_Impl_.BeforeBeat=2,alphaTab.model._GraceType.GraceType_Impl_.BendGrace=3,alphaTab.model._HarmonicType.HarmonicType_Impl_.None=0,alphaTab.model._HarmonicType.HarmonicType_Impl_.Natural=1,alphaTab.model._HarmonicType.HarmonicType_Impl_.Artificial=2,alphaTab.model._HarmonicType.HarmonicType_Impl_.Pinch=3,alphaTab.model._HarmonicType.HarmonicType_Impl_.Tap=4,alphaTab.model._HarmonicType.HarmonicType_Impl_.Semi=5,alphaTab.model._HarmonicType.HarmonicType_Impl_.Feedback=6,alphaTab.model._KeySignature.KeySignature_Impl_.Cb=-7,alphaTab.model._KeySignature.KeySignature_Impl_.Gb=-6,alphaTab.model._KeySignature.KeySignature_Impl_.Db=-5,alphaTab.model._KeySignature.KeySignature_Impl_.Ab=-4,alphaTab.model._KeySignature.KeySignature_Impl_.Eb=-3,alphaTab.model._KeySignature.KeySignature_Impl_.Bb=-2,alphaTab.model._KeySignature.KeySignature_Impl_.F=-1,alphaTab.model._KeySignature.KeySignature_Impl_.C=0,alphaTab.model._KeySignature.KeySignature_Impl_.G=1,alphaTab.model._KeySignature.KeySignature_Impl_.D=2,alphaTab.model._KeySignature.KeySignature_Impl_.A=3,alphaTab.model._KeySignature.KeySignature_Impl_.E=4,alphaTab.model._KeySignature.KeySignature_Impl_.B=5,alphaTab.model._KeySignature.KeySignature_Impl_.FSharp=6,alphaTab.model._KeySignature.KeySignature_Impl_.CSharp=7,alphaTab.model._KeySignatureType.KeySignatureType_Impl_.Major=0,alphaTab.model._KeySignatureType.KeySignatureType_Impl_.Minor=1,alphaTab.model.Lyrics.CharCodeLF=10,alphaTab.model.Lyrics.CharCodeTab=9,alphaTab.model.Lyrics.CharCodeCR=13,alphaTab.model.Lyrics.CharCodeSpace=32,alphaTab.model.Lyrics.CharCodeBrackedClose=93,alphaTab.model.Lyrics.CharCodeBrackedOpen=91,alphaTab.model.Lyrics.CharCodeDash=45,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.IgnoreSpaces=0,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Begin=1,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Text=2,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Comment=3,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Dash=4,alphaTab.model.MasterBar.MaxAlternateEndings=8,alphaTab.model.Note.GlobalNoteId=0,alphaTab.model.Note.MaxOffsetForSameLineSearch=3,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.Default=0,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.SwapAccidentals=1,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.ForceNatural=2,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.ForceSharp=3,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.ForceFlat=4,alphaTab.model._Ottavia.Ottavia_Impl_._15ma=0,alphaTab.model._Ottavia.Ottavia_Impl_._8va=1,alphaTab.model._Ottavia.Ottavia_Impl_.Regular=2,alphaTab.model._Ottavia.Ottavia_Impl_._8vb=3,alphaTab.model._Ottavia.Ottavia_Impl_._15mb=4,alphaTab.model._PickStroke.PickStroke_Impl_.None=0,alphaTab.model._PickStroke.PickStroke_Impl_.Up=1,alphaTab.model._PickStroke.PickStroke_Impl_.Down=2,alphaTab.model._SimileMark.SimileMark_Impl_.None=0,alphaTab.model._SimileMark.SimileMark_Impl_.Simple=1,alphaTab.model._SimileMark.SimileMark_Impl_.FirstOfDouble=2,alphaTab.model._SimileMark.SimileMark_Impl_.SecondOfDouble=3,alphaTab.model._SlideType.SlideType_Impl_.None=0,alphaTab.model._SlideType.SlideType_Impl_.Shift=1,alphaTab.model._SlideType.SlideType_Impl_.Legato=2,alphaTab.model._SlideType.SlideType_Impl_.IntoFromBelow=3,alphaTab.model._SlideType.SlideType_Impl_.IntoFromAbove=4,alphaTab.model._SlideType.SlideType_Impl_.OutUp=5,alphaTab.model._SlideType.SlideType_Impl_.OutDown=6,alphaTab.model._SlideType.SlideType_Impl_.PickSlideDown=7,alphaTab.model._SlideType.SlideType_Impl_.PickSlideUp=8,alphaTab.model._StaffKind.StaffKind_Impl_.Tablature=0,alphaTab.model._StaffKind.StaffKind_Impl_.Score=1,alphaTab.model._StaffKind.StaffKind_Impl_.Percussion=2,alphaTab.model._StaffKind.StaffKind_Impl_.Mixed=3,alphaTab.model.Track.ShortNameMaxLength=10,alphaTab.model._TripletFeel.TripletFeel_Impl_.NoTripletFeel=0,alphaTab.model._TripletFeel.TripletFeel_Impl_.Triplet16th=1,alphaTab.model._TripletFeel.TripletFeel_Impl_.Triplet8th=2,alphaTab.model._TripletFeel.TripletFeel_Impl_.Dotted16th=3,alphaTab.model._TripletFeel.TripletFeel_Impl_.Dotted8th=4,alphaTab.model._TripletFeel.TripletFeel_Impl_.Scottish16th=5,alphaTab.model._TripletFeel.TripletFeel_Impl_.Scottish8th=6,alphaTab.model._VibratoType.VibratoType_Impl_.None=0,alphaTab.model._VibratoType.VibratoType_Impl_.Slight=1,alphaTab.model._VibratoType.VibratoType_Impl_.Wide=2,alphaTab.model._WhammyType.WhammyType_Impl_.None=0,alphaTab.model._WhammyType.WhammyType_Impl_.Custom=1,alphaTab.model._WhammyType.WhammyType_Impl_.Dive=2,alphaTab.model._WhammyType.WhammyType_Impl_.Dip=3,alphaTab.model._WhammyType.WhammyType_Impl_.Hold=4,alphaTab.model._WhammyType.WhammyType_Impl_.Predive=5,alphaTab.model._WhammyType.WhammyType_Impl_.PrediveDive=6,alphaTab.platform.javaScript.AlphaSynthFlashOutput.PreferredSampleRate=44100,alphaTab.platform.javaScript.AlphaSynthFlashOutput.Id="alphaSynthFlashPlayer",alphaTab.platform.javaScript.AlphaSynthWebAudioOutput.BufferSize=4096,alphaTab.platform.javaScript.AlphaSynthWebAudioOutput.BufferCount=10,alphaTab.platform.model._FontStyle.FontStyle_Impl_.Plain=0,alphaTab.platform.model._FontStyle.FontStyle_Impl_.Bold=1,alphaTab.platform.model._FontStyle.FontStyle_Impl_.Italic=2,alphaTab.platform.model._TextAlign.TextAlign_Impl_.Left=0,alphaTab.platform.model._TextAlign.TextAlign_Impl_.Center=1,alphaTab.platform.model._TextAlign.TextAlign_Impl_.Right=2,alphaTab.platform.model._TextBaseline.TextBaseline_Impl_.Top=0,alphaTab.platform.model._TextBaseline.TextBaseline_Impl_.Middle=1,alphaTab.platform.model._TextBaseline.TextBaseline_Impl_.Bottom=2,alphaTab.platform.svg.FontSizes.TimesNewRoman=new Uint8Array([3,4,5,6,6,9,9,2,4,4,6,6,3,4,3,3,6,6,6,6,6,6,6,6,6,6,3,3,6,6,6,5,10,8,7,7,8,7,6,7,8,4,4,8,7,10,8,8,7,8,7,5,8,8,7,11,8,8,7,4,3,4,5,6,4,5,5,5,5,5,4,5,6,3,3,6,3,9,6,6,6,5,4,4,4,5,6,7,6,6,5,5,2,5,6,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,0,3,4,6,6,6,6,2,5,4,8,4,6,6,0,8,6,4,6,3,3,4,5,5,4,4,3,3,6,8,8,8,5,8,8,8,8,8,8,11,7,7,7,7,7,4,4,4,4,8,8,8,8,8,8,8,6,8,8,8,8,8,8,6,5,5,5,5,5,5,5,8,5,5,5,5,5,3,3,3,3,6,6,6,6,6,6,6,6,6,5,5,5,5,6,6]),alphaTab.platform.svg.FontSizes.Arial11Pt=new Uint8Array([3,3,4,6,6,10,7,2,4,4,4,6,3,4,3,3,6,6,6,6,6,6,6,6,6,6,3,3,6,6,6,6,11,7,7,8,8,7,7,9,8,3,6,7,6,9,8,9,7,9,8,7,7,8,7,10,7,7,7,3,3,3,5,6,4,6,6,6,6,6,3,6,6,2,2,6,2,9,6,6,6,6,4,6,3,6,6,8,6,6,6,4,3,4,6,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,0,3,4,6,6,6,6,3,6,4,8,4,6,6,0,8,6,4,6,4,4,4,6,6,4,4,4,4,6,9,9,9,7,7,7,7,7,7,7,11,8,7,7,7,7,3,3,3,3,8,8,9,9,9,9,9,6,9,8,8,8,8,7,7,7,6,6,6,6,6,6,10,6,6,6,6,6,3,3,3,3,6,6,6,6,6,6,6,6,7,6,6,6,6,6,6]),alphaTab.platform.svg.FontSizes.ControlChars=32,alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.TimesNewRoman=0,alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.Arial=1,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.PreNotes=0,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.OnNotes=1,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.MiddleNotes=2,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.PostNotes=3,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.EndBeat=4,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.SinglePreBeat=0,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.SingleOnBeat=1,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.SingleOnBeatToEnd=2,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.GroupedBeforeBeat=3,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.GroupedOnBeat=4,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.GroupedOnBeatToEnd=5,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.FullBar=6,alphaTab.rendering.ScoreBarRenderer.StaffId="score",alphaTab.rendering.ScoreBarRenderer.SharpKsSteps=new Int32Array([1,4,0,3,6,2,5]),alphaTab.rendering.ScoreBarRenderer.FlatKsSteps=new Int32Array([5,2,6,3,7,4,8]),alphaTab.rendering.ScoreBarRenderer.LineSpacing=8,alphaTab.rendering.ScoreBarRenderer.StemWidth=1.3,alphaTab.rendering.TabBarRenderer.StaffId="tab",alphaTab.rendering.TabBarRenderer.LineSpacing=10,alphaTab.rendering.glyphs.AccidentalGroupGlyph.NonReserved=-3e3,alphaTab.rendering.glyphs.AlternateEndingsGlyph.Padding=3,alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.ElementPadding=2,alphaTab.rendering.glyphs.CrescendoGlyph.Padding=4,alphaTab.rendering.glyphs.GhostParenthesisGlyph.Size=6,alphaTab.rendering.glyphs.LineRangedGlyph.LineSpacing=3,alphaTab.rendering.glyphs.LineRangedGlyph.LineTopPadding=4,alphaTab.rendering.glyphs.LineRangedGlyph.LineTopOffset=5,alphaTab.rendering.glyphs.LineRangedGlyph.LineSize=8,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.None=-1,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefG=57424,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefC=57436,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefF=57442,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefNeutral=57449,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefTab=57453,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefTabSmall=57454,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestQuadrupleWhole=58593,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestDoubleWhole=58594,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestWhole=58595,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestHalf=58596,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestQuarter=58597,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestEighth=58598,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestSixteenth=58599,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestThirtySecond=58600,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestSixtyFourth=58601,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestOneHundredTwentyEighth=58602,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestTwoHundredFiftySixth=58603,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Trill=58726,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num0=57472,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num1=57473,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num2=57474,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num3=57475,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num4=57476,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num5=57477,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num6=57478,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num7=57479,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num8=57480,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num9=57481,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TimeSignatureCommon=57482,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TimeSignatureCutCommon=57483,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteQuadrupleWhole=57505,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteDoubleWhole=57504,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteWhole=57506,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHalf=57507,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteQuarter=57508,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteDead=57514,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHarmonic=57564,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHarmonicWhole=57566,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHiHat=57523,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteSideStick=57513,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHiHatHalf=57591,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteChineseCymbal=57593,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpEighth=57920,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownEighth=57921,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpSixteenth=57922,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownSixteenth=57923,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpThirtySecond=57924,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownThirtySecond=57925,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpSixtyFourth=57926,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownSixtyFourth=57927,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpOneHundredTwentyEighth=57928,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownOneHundredTwentyEighth=57929,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpTwoHundredFiftySixth=57930,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownTwoHundredFiftySixth=57931,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicPPP=58666,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicPP=58667,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicP=58656,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicMP=58668,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicMF=58669,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicF=58658,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicFF=58671,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicFFF=58672,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Accentuation=58528,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.HeavyAccentuation=58540,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.WaveHorizontalSlight=60068,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.WaveHorizontalWide=60126,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.PickStrokeDown=58896,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.PickStrokeUp=58898,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TremoloPickingThirtySecond=57890,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TremoloPickingSixteenth=57889,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TremoloPickingEighth=57888,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Tempo=57813,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteEighth=57815,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalFlat=57952,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalNatural=57953,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalSharp=57954,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalQuarterToneFlatArrowUp=57968,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalQuarterToneSharpArrowUp=57972,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalQuarterToneNaturalArrowUp=57970,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava8=58640,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava8va=58641,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava8vb=58652,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava15=58644,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava15ma=58645,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.OttavaMBaseline=60565,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.OttavaBBaseline=60563,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.SimileMarkSimple=58624,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.SimileMarkDouble=58625,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FermataMedium=58560,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FermataShort=58564,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FermataLong=58566,alphaTab.rendering.glyphs.NoteHeadGlyph.GraceScale=.75,alphaTab.rendering.glyphs.NoteHeadGlyph.NoteHeadHeight=9,alphaTab.rendering.glyphs.NoteHeadGlyph.QuarterNoteHeadWidth=8,alphaTab.rendering.glyphs.NoteVibratoGlyph.SlightWaveOffset=10,alphaTab.rendering.glyphs.NoteVibratoGlyph.SlightWaveSize=8.5,alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.SlurHeight=11,alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.EndPadding=7,alphaTab.rendering.glyphs.ScoreWhammyBarGlyph.SimpleDipHeight=12,alphaTab.rendering.glyphs.ScoreWhammyBarGlyph.SimpleDipPadding=2,alphaTab.rendering.glyphs.TabBendGlyph.ArrowSize=6,alphaTab.rendering.glyphs.TabBendGlyph.DashSize=3,alphaTab.rendering.glyphs.TabBendGlyph.BendValueHeight=6,alphaTab.rendering.glyphs.TabWhammyBarGlyph.TopOffsetSharedDataKey="tab.whammy.topoffset",alphaTab.rendering.glyphs.TabWhammyBarGlyph.PerHalfSize=6,alphaTab.rendering.glyphs.TabWhammyBarGlyph.DashSize=3,alphaTab.rendering.glyphs.TripletFeelGlyph.NoteScale=.4,alphaTab.rendering.glyphs.TripletFeelGlyph.NoteHeight=12,alphaTab.rendering.glyphs.TripletFeelGlyph.NoteSeparation=12,alphaTab.rendering.glyphs.TripletFeelGlyph.BarHeight=2,alphaTab.rendering.glyphs.TripletFeelGlyph.BarSeparation=3,alphaTab.rendering.glyphs._TripletFeelGlyph_BarType.TripletFeelGlyph_BarType_Impl_.Full=0,alphaTab.rendering.glyphs._TripletFeelGlyph_BarType.TripletFeelGlyph_BarType_Impl_.PartialLeft=1,alphaTab.rendering.glyphs._TripletFeelGlyph_BarType.TripletFeelGlyph_BarType_Impl_.PartialRight=2,alphaTab.rendering.glyphs.VoiceContainerGlyph.KeySizeBeat="Beat",alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.None=0,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Title=1,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.SubTitle=2,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Artist=4,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Album=8,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Words=16,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Music=32,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.WordsAndMusic=64,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Copyright=128,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.PageNumber=256,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.All=511,alphaTab.rendering.staves.BarLayoutingInfo.MinDuration=30,alphaTab.rendering.staves.BarLayoutingInfo.MinDurationWidth=10,alphaTab.rendering.staves.StaveGroup.AccoladeLabelSpacing=10,alphaTab.rendering.utils.AccidentalHelper.KeySignatureLookup=[[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0],[!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0],[!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!0,!0],[!1,!1,!1,!0,!0,!1,!1,!1,!0,!0,!0,!0],[!1,!1,!1,!0,!0,!1,!1,!1,!1,!1,!0,!0],[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0],[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1],[!1,!1,!1,!1,!1,!0,!0,!1,!1,!1,!1,!1],[!0,!0,!1,!1,!1,!0,!0,!1,!1,!1,!1,!1],[!0,!0,!1,!1,!1,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!0,!1,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]],alphaTab.rendering.utils.AccidentalHelper.AccidentalNotes=[!1,!0,!1,!0,!1,!1,!0,!1,!0,!1,!0,!1],alphaTab.rendering.utils.AccidentalHelper.StepsPerOctave=7,alphaTab.rendering.utils.AccidentalHelper.OctaveSteps=new Int32Array([40,34,32,28,40]),alphaTab.rendering.utils.AccidentalHelper.SharpNoteSteps=new Int32Array([0,0,1,1,2,3,3,4,4,5,5,6]),alphaTab.rendering.utils.AccidentalHelper.FlatNoteSteps=new Int32Array([0,1,1,2,2,3,4,4,5,5,6,6]),alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.Up=0,alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.Down=1,alphaTab.rendering.utils.BeamingHelper.ScoreMiddleKeys=new Int32Array([60,60,57,50,71]),alphaTab.rendering.utils.PercussionMapper.ElementVariationToMidi=[new Int32Array([35,35,35]),new Int32Array([38,38,37]),new Int32Array([56,56,56]),new Int32Array([56,56,56]),new Int32Array([56,56,56]),new Int32Array([41,41,41]),new Int32Array([43,43,43]),new Int32Array([45,45,45]),new Int32Array([47,47,47]),new Int32Array([48,48,48]),new Int32Array([42,46,46]),new Int32Array([44,44,44]),new Int32Array([49,49,49]),new Int32Array([57,57,57]),new Int32Array([55,55,55]),new Int32Array([51,59,53]),new Int32Array([52,52,52])],alphaTab.util._LogLevel.LogLevel_Impl_.None=0,alphaTab.util._LogLevel.LogLevel_Impl_.Debug=1,alphaTab.util._LogLevel.LogLevel_Impl_.Info=2,alphaTab.util._LogLevel.LogLevel_Impl_.Warning=3,alphaTab.util._LogLevel.LogLevel_Impl_.Error=4,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.None=0,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Element=1,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Attribute=2,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Text=3,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.CDATA=4,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.EntityReference=5,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Entity=6,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ProcessingInstruction=7,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Comment=8,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Document=9,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.DocumentType=10,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.DocumentFragment=11,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Notation=12,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Whitespace=13,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.SignificantWhitespace=14,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.EndElement=15,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.EndEntity=16,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.XmlDeclaration=17,alphaTab.xml.XmlParser.CharCodeLF=10,alphaTab.xml.XmlParser.CharCodeTab=9,alphaTab.xml.XmlParser.CharCodeCR=13,alphaTab.xml.XmlParser.CharCodeSpace=32,alphaTab.xml.XmlParser.CharCodeLowerThan=60,alphaTab.xml.XmlParser.CharCodeAmp=38,alphaTab.xml.XmlParser.CharCodeBrackedClose=93,alphaTab.xml.XmlParser.CharCodeBrackedOpen=91,alphaTab.xml.XmlParser.CharCodeGreaterThan=62,alphaTab.xml.XmlParser.CharCodeExclamation=33,alphaTab.xml.XmlParser.CharCodeUpperD=68,alphaTab.xml.XmlParser.CharCodeLowerD=100,alphaTab.xml.XmlParser.CharCodeMinus=45,alphaTab.xml.XmlParser.CharCodeQuestion=63,alphaTab.xml.XmlParser.CharCodeSlash=47,alphaTab.xml.XmlParser.CharCodeEquals=61,alphaTab.xml.XmlParser.CharCodeDoubleQuote=34,alphaTab.xml.XmlParser.CharCodeSingleQuote=39,alphaTab.xml.XmlParser.CharCodeSharp=35,alphaTab.xml.XmlParser.CharCodeLowerX=120,alphaTab.xml.XmlParser.CharCodeLowerA=97,alphaTab.xml.XmlParser.CharCodeLowerZ=122,alphaTab.xml.XmlParser.CharCodeUpperA=65,alphaTab.xml.XmlParser.CharCodeUpperZ=90,alphaTab.xml.XmlParser.CharCode0=48,alphaTab.xml.XmlParser.CharCode9=57,alphaTab.xml.XmlParser.CharCodeColon=58,alphaTab.xml.XmlParser.CharCodeDot=46,alphaTab.xml.XmlParser.CharCodeUnderscore=95,alphaTab.xml.XmlParser_XmlState.IGNORE_SPACES=0,alphaTab.xml.XmlParser_XmlState.BEGIN=1,alphaTab.xml.XmlParser_XmlState.BEGIN_NODE=2,alphaTab.xml.XmlParser_XmlState.TAG_NAME=3,alphaTab.xml.XmlParser_XmlState.BODY=4,alphaTab.xml.XmlParser_XmlState.ATTRIB_NAME=5,alphaTab.xml.XmlParser_XmlState.EQUALS=6,alphaTab.xml.XmlParser_XmlState.ATTVAL_BEGIN=7,alphaTab.xml.XmlParser_XmlState.ATTRIB_VAL=8,alphaTab.xml.XmlParser_XmlState.CHILDS=9,alphaTab.xml.XmlParser_XmlState.CLOSE=10,alphaTab.xml.XmlParser_XmlState.WAIT_END=11,alphaTab.xml.XmlParser_XmlState.WAIT_END_RET=12,alphaTab.xml.XmlParser_XmlState.PCDATA=13,alphaTab.xml.XmlParser_XmlState.HEADER=14,alphaTab.xml.XmlParser_XmlState.COMMENT=15,alphaTab.xml.XmlParser_XmlState.DOCTYPE=16,alphaTab.xml.XmlParser_XmlState.CDATA=17,alphaTab.xml.XmlParser_XmlState.ESCAPE=18,haxe.io.FPHelper.i64tmp=new haxe._Int64.___Int64(0,0),haxe.zip.InflateImpl.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1],haxe.zip.InflateImpl.LEN_BASE_VAL_TBL=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],haxe.zip.InflateImpl.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1],haxe.zip.InflateImpl.DIST_BASE_VAL_TBL=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],haxe.zip.InflateImpl.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],js.html.compat.Float32Array.BYTES_PER_ELEMENT=4,js.html.compat.Float64Array.BYTES_PER_ELEMENT=8,js.html.compat.Uint8Array.BYTES_PER_ELEMENT=1,alphaTab.Main.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function($hx_exports,$global){"use strict";$hx_exports.alphaTab=$hx_exports.alphaTab||{},$hx_exports.alphaTab.xml=$hx_exports.alphaTab.xml||{},$hx_exports.alphaTab.xml._XmlNodeType=$hx_exports.alphaTab.xml._XmlNodeType||{},$hx_exports.alphaTab.utils=$hx_exports.alphaTab.utils||{},$hx_exports.alphaTab.utils._UnionData=$hx_exports.alphaTab.utils._UnionData||{},$hx_exports.alphaTab.model=$hx_exports.alphaTab.model||{},$hx_exports.alphaTab.model._WhammyType=$hx_exports.alphaTab.model._WhammyType||{},$hx_exports.alphaTab.model._VibratoType=$hx_exports.alphaTab.model._VibratoType||{},$hx_exports.alphaTab.model._TripletFeel=$hx_exports.alphaTab.model._TripletFeel||{},$hx_exports.alphaTab.model._StaffKind=$hx_exports.alphaTab.model._StaffKind||{},$hx_exports.alphaTab.model._SlideType=$hx_exports.alphaTab.model._SlideType||{},$hx_exports.alphaTab.model._SimileMark=$hx_exports.alphaTab.model._SimileMark||{},$hx_exports.alphaTab.model._PickStroke=$hx_exports.alphaTab.model._PickStroke||{},$hx_exports.alphaTab.model._Ottavia=$hx_exports.alphaTab.model._Ottavia||{},$hx_exports.alphaTab.model._NoteAccidentalMode=$hx_exports.alphaTab.model._NoteAccidentalMode||{},$hx_exports.alphaTab.model._Lyrics_LyricsState=$hx_exports.alphaTab.model._Lyrics_LyricsState||{},$hx_exports.alphaTab.model._KeySignatureType=$hx_exports.alphaTab.model._KeySignatureType||{},$hx_exports.alphaTab.model._KeySignature=$hx_exports.alphaTab.model._KeySignature||{},$hx_exports.alphaTab.model._HarmonicType=$hx_exports.alphaTab.model._HarmonicType||{},$hx_exports.alphaTab.model._GraceType=$hx_exports.alphaTab.model._GraceType||{},$hx_exports.alphaTab.model._Fingers=$hx_exports.alphaTab.model._Fingers||{},$hx_exports.alphaTab.model._FermataType=$hx_exports.alphaTab.model._FermataType||{},$hx_exports.alphaTab.model._DynamicValue=$hx_exports.alphaTab.model._DynamicValue||{},$hx_exports.alphaTab.model._Duration=$hx_exports.alphaTab.model._Duration||{},$hx_exports.alphaTab.model._CrescendoType=$hx_exports.alphaTab.model._CrescendoType||{},$hx_exports.alphaTab.model._Clef=$hx_exports.alphaTab.model._Clef||{},$hx_exports.alphaTab.model._BrushType=$hx_exports.alphaTab.model._BrushType||{},$hx_exports.alphaTab.model._BendType=$hx_exports.alphaTab.model._BendType||{},$hx_exports.alphaTab.model._BendStyle=$hx_exports.alphaTab.model._BendStyle||{},$hx_exports.alphaTab.model._AutomationType=$hx_exports.alphaTab.model._AutomationType||{},$hx_exports.alphaTab.model._AccidentalType=$hx_exports.alphaTab.model._AccidentalType||{},$hx_exports.alphaTab.model._AccentuationType=$hx_exports.alphaTab.model._AccentuationType||{},$hx_exports.alphaTab.io=$hx_exports.alphaTab.io||{},$hx_exports.alphaTab.importer=$hx_exports.alphaTab.importer||{},$hx_exports.alphaTab.importer._BinaryStylesheetParser_DataType=$hx_exports.alphaTab.importer._BinaryStylesheetParser_DataType||{},$hx_exports.alphaTab.importer._AlphaTexSymbols=$hx_exports.alphaTab.importer._AlphaTexSymbols||{},$hx_exports.alphaTab.exporter=$hx_exports.alphaTab.exporter||{},$hx_exports.alphaTab.collections=$hx_exports.alphaTab.collections||{},$hx_exports.alphaTab.collections._StringBuilder=$hx_exports.alphaTab.collections._StringBuilder||{},$hx_exports.alphaTab.collections._FastList=$hx_exports.alphaTab.collections._FastList||{},$hx_exports.alphaTab.collections._FastDictionary=$hx_exports.alphaTab.collections._FastDictionary||{},$hx_exports.alphaTab._FingeringMode=$hx_exports.alphaTab._FingeringMode||{},$hx_exports.alphaTab.rendering=$hx_exports.alphaTab.rendering||{},$hx_exports.alphaTab.rendering.staves=$hx_exports.alphaTab.rendering.staves||{},$hx_exports.alphaTab.rendering.utils=$hx_exports.alphaTab.rendering.utils||{},$hx_exports.alphaTab.rendering.utils._BeamDirection=$hx_exports.alphaTab.rendering.utils._BeamDirection||{},$hx_exports.alphaTab.rendering._EffectBarGlyphSizing=$hx_exports.alphaTab.rendering._EffectBarGlyphSizing||{},$hx_exports.alphaTab.rendering.glyphs=$hx_exports.alphaTab.rendering.glyphs||{},$hx_exports.alphaTab.rendering.glyphs._TripletFeelGlyph_BarType=$hx_exports.alphaTab.rendering.glyphs._TripletFeelGlyph_BarType||{},$hx_exports.alphaTab.rendering.glyphs._MusicFontSymbol=$hx_exports.alphaTab.rendering.glyphs._MusicFontSymbol||{},$hx_exports.alphaTab.rendering._BeatXPosition=$hx_exports.alphaTab.rendering._BeatXPosition||{},$hx_exports.alphaTab.rendering.effects=$hx_exports.alphaTab.rendering.effects||{},$hx_exports.alphaTab.rendering.layout=$hx_exports.alphaTab.rendering.layout||{},$hx_exports.alphaTab.rendering.layout._HeaderFooterElements=$hx_exports.alphaTab.rendering.layout._HeaderFooterElements||{},$hx_exports.alphaTab.audio=$hx_exports.alphaTab.audio||{},$hx_exports.alphaTab.audio.generator=$hx_exports.alphaTab.audio.generator||{},$hx_exports.alphaTab.audio.synth=$hx_exports.alphaTab.audio.synth||{},$hx_exports.alphaTab.audio.synth.sf2=$hx_exports.alphaTab.audio.synth.sf2||{},$hx_exports.alphaTab.audio.synth.sf2.chunks=$hx_exports.alphaTab.audio.synth.sf2.chunks||{},$hx_exports.alphaTab.audio.synth.sf2._TransformEnum=$hx_exports.alphaTab.audio.synth.sf2._TransformEnum||{},$hx_exports.alphaTab.audio.synth.sf2._SourceTypeEnum=$hx_exports.alphaTab.audio.synth.sf2._SourceTypeEnum||{},$hx_exports.alphaTab.audio.synth.sf2._SFSampleLink=$hx_exports.alphaTab.audio.synth.sf2._SFSampleLink||{},$hx_exports.alphaTab.audio.synth.sf2._PolarityEnum=$hx_exports.alphaTab.audio.synth.sf2._PolarityEnum||{},$hx_exports.alphaTab.audio.synth.sf2._GeneratorEnum=$hx_exports.alphaTab.audio.synth.sf2._GeneratorEnum||{},$hx_exports.alphaTab.audio.synth.sf2._DirectionEnum=$hx_exports.alphaTab.audio.synth.sf2._DirectionEnum||{},$hx_exports.alphaTab.audio.synth.midi=$hx_exports.alphaTab.audio.synth.midi||{},$hx_exports.alphaTab.audio.synth.midi.event=$hx_exports.alphaTab.audio.synth.midi.event||{},$hx_exports.alphaTab.audio.synth.midi.event._SystemCommonTypeEnum=$hx_exports.alphaTab.audio.synth.midi.event._SystemCommonTypeEnum||{},$hx_exports.alphaTab.audio.synth.midi.event._MidiEventType=$hx_exports.alphaTab.audio.synth.midi.event._MidiEventType||{},$hx_exports.alphaTab.audio.synth.midi.event._MetaEventTypeEnum=$hx_exports.alphaTab.audio.synth.midi.event._MetaEventTypeEnum||{},$hx_exports.alphaTab.audio.synth.midi.event._ControllerType=$hx_exports.alphaTab.audio.synth.midi.event._ControllerType||{},$hx_exports.alphaTab.audio.synth._PlayerState=$hx_exports.alphaTab.audio.synth._PlayerState||{},$hx_exports.alphaTab.audio.synth.ds=$hx_exports.alphaTab.audio.synth.ds||{},$hx_exports.alphaTab.audio.synth.ds._SampleArray=$hx_exports.alphaTab.audio.synth.ds._SampleArray||{},$hx_exports.alphaTab.audio.synth.bank=$hx_exports.alphaTab.audio.synth.bank||{},$hx_exports.alphaTab.audio.synth.bank.patch=$hx_exports.alphaTab.audio.synth.bank.patch||{},$hx_exports.alphaTab.audio.synth.bank.patch._IntervalType=$hx_exports.alphaTab.audio.synth.bank.patch._IntervalType||{},$hx_exports.alphaTab.audio.synth.bank.descriptors=$hx_exports.alphaTab.audio.synth.bank.descriptors||{},$hx_exports.alphaTab.audio.synth.bank.descriptors._Waveform=$hx_exports.alphaTab.audio.synth.bank.descriptors._Waveform||{},$hx_exports.alphaTab.audio.synth.bank.components=$hx_exports.alphaTab.audio.synth.bank.components||{},$hx_exports.alphaTab.audio.synth.bank.components._PanFormulaEnum=$hx_exports.alphaTab.audio.synth.bank.components._PanFormulaEnum||{},$hx_exports.alphaTab.audio.synth.bank.components._LfoState=$hx_exports.alphaTab.audio.synth.bank.components._LfoState||{},$hx_exports.alphaTab.audio.synth.bank.components._FilterType=$hx_exports.alphaTab.audio.synth.bank.components._FilterType||{},$hx_exports.alphaTab.audio.synth.bank.components._EnvelopeState=$hx_exports.alphaTab.audio.synth.bank.components._EnvelopeState||{},$hx_exports.alphaTab.audio.synth.bank.components.generators=$hx_exports.alphaTab.audio.synth.bank.components.generators||{},$hx_exports.alphaTab.audio.synth.bank.components.generators._LoopMode=$hx_exports.alphaTab.audio.synth.bank.components.generators._LoopMode||{},$hx_exports.alphaTab.audio.synth.bank.components.generators._GeneratorState=$hx_exports.alphaTab.audio.synth.bank.components.generators._GeneratorState||{},$hx_exports.alphaTab.audio.synth.util=$hx_exports.alphaTab.audio.synth.util||{},$hx_exports.alphaTab.audio.synth.synthesis=$hx_exports.alphaTab.audio.synth.synthesis||{},$hx_exports.alphaTab.audio.synth.synthesis._VoiceStateEnum=$hx_exports.alphaTab.audio.synth.synthesis._VoiceStateEnum||{},$hx_exports.alphaTab.util=$hx_exports.alphaTab.util||{},$hx_exports.alphaTab.util._LogLevel=$hx_exports.alphaTab.util._LogLevel||{},$hx_exports.alphaTab.platform=$hx_exports.alphaTab.platform||{},$hx_exports.alphaTab.platform.javaScript=$hx_exports.alphaTab.platform.javaScript||{},$hx_exports.alphaTab.platform.model=$hx_exports.alphaTab.platform.model||{},$hx_exports.alphaTab.platform.model._TextBaseline=$hx_exports.alphaTab.platform.model._TextBaseline||{},$hx_exports.alphaTab.platform.model._TextAlign=$hx_exports.alphaTab.platform.model._TextAlign||{},$hx_exports.alphaTab.platform.model._FontStyle=$hx_exports.alphaTab.platform.model._FontStyle||{},$hx_exports.alphaTab.platform.svg=$hx_exports.alphaTab.platform.svg||{},$hx_exports.alphaTab.platform.svg._SupportedFonts=$hx_exports.alphaTab.platform.svg._SupportedFonts||{},$hx_exports.alphaTab._DisplayMode=$hx_exports.alphaTab._DisplayMode||{};var $estr=function(){return js.Boot.__string_rec(this,"")};function $extend(from,fields){function Inherit(){}Inherit.prototype=from;var proto=new Inherit;for(var name in fields)proto[name]=fields[name];return fields.toString!==Object.prototype.toString&&(proto.toString=fields.toString),proto}var EReg=function(r,opt){this.r=new RegExp(r,opt.split("u").join(""))};EReg.__name__=["EReg"],EReg.prototype={match:function(s){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(s),this.r.s=s,null!=this.r.m},matched:function(n){if(null!=this.r.m&&n>=0&&n=start.length&&HxOverrides.substr(s,0,start.length)==start},StringTools.endsWith=function(s,end){var elen=end.length,slen=s.length;return slen>=elen&&HxOverrides.substr(s,slen-elen,elen)==end},StringTools.isSpace=function(s,pos){var c=HxOverrides.cca(s,pos);return c>8&&c<14||32==c},StringTools.ltrim=function(s){for(var l=s.length,r=0;r0?HxOverrides.substr(s,r,l-r):s},StringTools.rtrim=function(s){for(var l=s.length,r=0;r0?HxOverrides.substr(s,0,l-r):s},StringTools.trim=function(s){return StringTools.ltrim(StringTools.rtrim(s))},StringTools.replace=function(s,sub,by){return s.split(sub).join(by)};var Type=function(){};Type.__name__=["Type"],Type.getClassName=function(c){var a=c.__name__;return null==a?null:a.join(".")};var system={};system.Exception=function(){},system.Exception.__name__=["system","Exception"],system.Exception.prototype={Exception_CsString:function(message){return this.Message=message,this},__class__:system.Exception};var alphaTab={};alphaTab.AlphaTabException=$hx_exports.alphaTab.AlphaTabException=function(){system.Exception.call(this)},alphaTab.AlphaTabException.__name__=["alphaTab","AlphaTabException"],alphaTab.AlphaTabException.__super__=system.Exception,alphaTab.AlphaTabException.prototype=$extend(system.Exception.prototype,{AlphaTabException:function(message){return this.Exception_CsString(message),this},__class__:alphaTab.AlphaTabException}),alphaTab._DisplayMode={},alphaTab._DisplayMode.DisplayMode_Impl_=$hx_exports.alphaTab._DisplayMode.DisplayMode_Impl_={},alphaTab._DisplayMode.DisplayMode_Impl_.__name__=["alphaTab","_DisplayMode","DisplayMode_Impl_"],alphaTab._DisplayMode.DisplayMode_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._DisplayMode.DisplayMode_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab._DisplayMode.DisplayMode_Impl_.toString=function(this1){switch(this1){case 0:return"GuitarPro";case 1:return"SongBook"}return""},alphaTab.platform={},alphaTab.platform.IPathCanvas=$hx_exports.alphaTab.platform.IPathCanvas=function(){},alphaTab.platform.IPathCanvas.__name__=["alphaTab","platform","IPathCanvas"],alphaTab.platform.IPathCanvas.prototype={__class__:alphaTab.platform.IPathCanvas},alphaTab.platform.ICanvas=$hx_exports.alphaTab.platform.ICanvas=function(){},alphaTab.platform.ICanvas.__name__=["alphaTab","platform","ICanvas"],alphaTab.platform.ICanvas.__interfaces__=[alphaTab.platform.IPathCanvas],alphaTab.platform.ICanvas.prototype={__class__:alphaTab.platform.ICanvas},alphaTab.platform.svg={},alphaTab.platform.svg.SvgCanvas=$hx_exports.alphaTab.platform.svg.SvgCanvas=function(){this.Buffer=null,this._currentPath=null,this._currentPathIsEmpty=!1,this.set_Color(null),this.set_LineWidth(0),this.set_Font(null),this.set_TextAlign(0),this.set_TextBaseline(0),this.set_Resources(null);this._currentPath="",this._currentPathIsEmpty=!0,this.set_Color(new alphaTab.platform.model.Color(255,255,255,255)),this.set_LineWidth(1),this.set_Font(new alphaTab.platform.model.Font("Arial",10,0)),this.set_TextAlign(0),this.set_TextBaseline(0)},alphaTab.platform.svg.SvgCanvas.__name__=["alphaTab","platform","svg","SvgCanvas"],alphaTab.platform.svg.SvgCanvas.__interfaces__=[alphaTab.platform.IPathCanvas,alphaTab.platform.ICanvas],alphaTab.platform.svg.SvgCanvas.prototype={get_Color:function(){return this.__Color},set_Color:function(value){return this.__Color=value},get_LineWidth:function(){return this.__LineWidth},set_LineWidth:function(value){return this.__LineWidth=value},get_Font:function(){return this.__Font},set_Font:function(value){return this.__Font=value},get_TextAlign:function(){return this.__TextAlign},set_TextAlign:function(value){return this.__TextAlign=value},get_TextBaseline:function(){return this.__TextBaseline},set_TextBaseline:function(value){return this.__TextBaseline=value},get_Resources:function(){return this.__Resources},set_Resources:function(value){return this.__Resources=value},BeginRender:function(width,height){this.Buffer="",this.Buffer+=Std.string('\n');this._currentPath="",this._currentPathIsEmpty=!0},BeginGroup:function(identifier){this.Buffer+=Std.string('')},EndGroup:function(){this.Buffer+=Std.string("")},EndRender:function(){return this.Buffer+=Std.string(""),this.Buffer},FillRect:function(x,y,w,h){if(w>0){var s='\n';this.Buffer+=Std.string(s)}},StrokeRect:function(x,y,w,h){var s='\n')},BeginPath:function(){},ClosePath:function(){this._currentPath+=Std.string(" z")},MoveTo:function(x,y){this._currentPath+=Std.string(" M"+(x-0)+","+(y-0))},LineTo:function(x,y){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" L"+(x-0)+","+(y-0))},QuadraticCurveTo:function(cpx,cpy,x,y){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" Q"+cpx+","+cpy+","+x+","+y)},BezierCurveTo:function(cp1x,cp1y,cp2x,cp2y,x,y){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" C"+cp1x+","+cp1y+","+cp2x+","+cp2y+","+x+","+y)},FillCircle:function(x,y,radius){this._currentPathIsEmpty=!1,this._currentPath+=Std.string(" M"+(x-radius)+","+y+" A1,1 0 0,0 "+(x+radius)+","+y+" A1,1 0 0,0 "+(x-radius)+","+y+" z"),this.Fill()},Fill:function(){if(!this._currentPathIsEmpty){if(this.Buffer+=Std.string('')}this._currentPath="",this._currentPathIsEmpty=!0},Stroke:function(){if(!this._currentPathIsEmpty){var s='"+text+"",this.Buffer+=Std.string(s)}},GetSvgTextAlignment:function(){switch(this.get_TextAlign()){case 0:return"start";case 1:return"middle";case 2:return"end"}return""},GetSvgBaseLine:function(){switch(this.get_TextBaseline()){case 0:return"hanging";case 1:return"middle";case 2:return"bottom";default:return""}},MeasureText:function(text){if(null==text||0==text.length)return 0;var font=1;return-1!=this.get_Font().Family.indexOf("Times")&&(font=0),alphaTab.platform.svg.FontSizes.MeasureString(text,font,this.get_Font().Size,this.get_Font().Style)},FillMusicFontSymbol:function(x,y,scale,symbol){throw new js._Boot.HaxeError("abstract")},FillMusicFontSymbols:function(x,y,scale,symbols){throw new js._Boot.HaxeError("abstract")},OnPreRender:function(){return null},OnRenderFinished:function(){return null},BeginRotate:function(centerX,centerY,angle){this.Buffer+=Std.string('')},EndRotate:function(){this.Buffer+=Std.string("")},__class__:alphaTab.platform.svg.SvgCanvas},alphaTab.platform.svg.CssFontSvgCanvas=$hx_exports.alphaTab.platform.svg.CssFontSvgCanvas=function(){alphaTab.platform.svg.SvgCanvas.call(this)},alphaTab.platform.svg.CssFontSvgCanvas.__name__=["alphaTab","platform","svg","CssFontSvgCanvas"],alphaTab.platform.svg.CssFontSvgCanvas.__super__=alphaTab.platform.svg.SvgCanvas,alphaTab.platform.svg.CssFontSvgCanvas.prototype=$extend(alphaTab.platform.svg.SvgCanvas.prototype,{FillMusicFontSymbol:function(x,y,scale,symbol){if(-1!=symbol){var s='&#"+symbol+";")}},FillMusicFontSymbols:function(x,y,scale,symbols){for(var s="",symbol=HxOverrides.iter(symbols);symbol.hasNext();){var symbol1=symbol.next();-1!=symbol1&&(s=s+"&#"+symbol1+";")}var s1='"+s+"")},__class__:alphaTab.platform.svg.CssFontSvgCanvas}),alphaTab.platform.model={},alphaTab.platform.model.Color=$hx_exports.alphaTab.platform.model.Color=function(r,g,b,a){null==a&&(a=255),this.Raw=0,this.RGBA=null,this.Raw=a<<24|r<<16|g<<8|b,255==this.get_A()?this.RGBA="#"+alphaTab.platform.Platform.ToHexString(this.get_R(),2)+alphaTab.platform.Platform.ToHexString(this.get_G(),2)+alphaTab.platform.Platform.ToHexString(this.get_B(),2):this.RGBA="rgba("+this.get_R()+","+this.get_G()+","+this.get_B()+","+this.get_A()/255+")"},alphaTab.platform.model.Color.__name__=["alphaTab","platform","model","Color"],alphaTab.platform.model.Color.Random=function(opacity){return null==opacity&&(opacity=100),new alphaTab.platform.model.Color(system.Convert.ToUInt8(alphaTab.platform.Platform.Random(255)),system.Convert.ToUInt8(alphaTab.platform.Platform.Random(255)),system.Convert.ToUInt8(alphaTab.platform.Platform.Random(255)),opacity)},alphaTab.platform.model.Color.prototype={get_A:function(){return system.Convert.ToUInt8(this.Raw>>24&255)},get_R:function(){return system.Convert.ToUInt8(this.Raw>>16&255)},get_G:function(){return system.Convert.ToUInt8(this.Raw>>8&255)},get_B:function(){return system.Convert.ToUInt8(255&this.Raw)},__class__:alphaTab.platform.model.Color},alphaTab.platform.Platform=$hx_exports.alphaTab.platform.Platform=function(){},alphaTab.platform.Platform.__name__=["alphaTab","platform","Platform"],alphaTab.platform.Platform.ParseFloat=function(s){return parseFloat(s)},alphaTab.platform.Platform.GetCallerName=function(){return arguments.callee.caller.caller.name},alphaTab.platform.Platform.Log=function(logLevel,category,msg,details){msg="[AlphaTab]["+category+"] "+msg;var $console=$global.console;switch(logLevel){case 0:break;case 1:msg="[Debug]"+msg,$console.debug(msg,details);break;case 2:msg="[Info]"+msg,$console.info(msg,details);break;case 3:$console.warn(msg,details);break;case 4:var stack=haxe.CallStack.toString(haxe.CallStack.callStack());$console.error(msg,stack,details)}},alphaTab.platform.Platform.NewObject=function(){return{}},alphaTab.platform.Platform.JsonExists=function(json,property){return json&&property in json},alphaTab.platform.Platform.JsonKeys=function(json){return Object.keys(json)},alphaTab.platform.Platform.Log2=function(f){return Math.log2(f)},alphaTab.platform.Platform.ParseInt=function(s){var val=parseInt(s);return isNaN(val)?-2147483648:val},alphaTab.platform.Platform.CloneArray=function(array){return new Int32Array(array)},alphaTab.platform.Platform.BlockCopy=function(src,srcOffset,dst,dstOffset,count){dst.set(src.subarray(srcOffset,srcOffset+count),dstOffset)},alphaTab.platform.Platform.StringFromCharCode=function(c){return String.fromCharCode(c)},alphaTab.platform.Platform.ReadSignedByte=function(readable){var n=readable.ReadByte();return n>=128?system.Convert.ToInt8(n-256):system.Convert.ToInt8(n)},alphaTab.platform.Platform.ToString=function(data){if($global.TextDecoder){var encoding=alphaTab.platform.Platform.DetectEncoding(data);return new TextDecoder(encoding).decode(data)}for(var s="",i=0;i>18)),s+=String.fromCharCode(1023&u|56320)}}return s},alphaTab.platform.Platform.DetectEncoding=function(data){return 254==data[0]&&255==data[1]?"utf-16be":255==data[0]&&254==data[1]?"utf-16le":0==data[0]&&0==data[1]&&254==data[2]&&255==data[3]?"utf-32be":255==data[0]&&254==data[1]&&0==data[2]&&0==data[3]?"utf-32le":"utf-8"},alphaTab.platform.Platform.StringToByteArray=function(contents){for(var byteArray=new Uint8Array(contents.length),i=0;i=48&&c<=57},alphaTab.platform.Platform.IsWhiteSpace=function(c){return 32==c||11==c||13==c||10==c||9==c},alphaTab.platform.Platform.IsAlmostEqualTo=function(a,b){return Math.abs(a-b)<1e-5},alphaTab.platform.Platform.ToHexString=function(n,digits){null==digits&&(digits=0);for(var s="";;){var this1=system.Convert.ToUInt16(HxOverrides.cca("0123456789ABCDEF",15&n));if(s=String.fromCharCode(this1)+s,!((n>>=4)>0))break}for(;s.length=0){if(v<2147483647.5)return 0|v}else if(v>=-2147483648.5)return 0|v;throw new js._Boot.HaxeError(new system.OverflowException("Value was either too large or too small for a Int32."))},system.Convert.ToInt32_Single=function(v){var this1=v;return system.Convert.ToInt32_Double(this1)},alphaTab.platform.model.Font=$hx_exports.alphaTab.platform.model.Font=function(family,size,style){null==style&&(style=0),this._css=null,this.Family=null,this.Size=0,this.Style=0,this.Family=family,this.Size=size,this.Style=style,this._css=this.ToCssString(1)},alphaTab.platform.model.Font.__name__=["alphaTab","platform","model","Font"],alphaTab.platform.model.Font.prototype={get_IsBold:function(){return 0!=(1&this.Style)},get_IsItalic:function(){return 0!=(2&this.Style)},Clone:function(){return new alphaTab.platform.model.Font(this.Family,this.Size,this.Style)},ToCssString:function(scale){if(null==scale&&(scale=1),null!=this._css&&1==scale)return this._css;var buf="";return this.get_IsBold()&&(buf+=Std.string("bold ")),this.get_IsItalic()&&(buf+=Std.string("italic ")),buf+=Std.string(this.Size*scale),buf+=Std.string("px "),buf+=Std.string("'"),buf+=Std.string(this.Family),buf+=Std.string("'")},__class__:alphaTab.platform.model.Font},alphaTab.platform.javaScript={},alphaTab.platform.javaScript.Html5Canvas=$hx_exports.alphaTab.platform.javaScript.Html5Canvas=function(){this._measureCanvas=null,this._measureContext=null,this._canvas=null,this._context=null,this._color=null,this._font=null,this._musicFont=null,this._lineWidth=0,this.set_Resources(null),this._color=new alphaTab.platform.model.Color(0,0,0,255);var fontElement=window.document.createElement("span");fontElement.classList.add("at"),window.document.body.appendChild(fontElement);var style=window.getComputedStyle(fontElement),family=style.fontFamily;(StringTools.startsWith(family,'"')||StringTools.startsWith(family,"'"))&&(family=HxOverrides.substr(family,1,family.length-2));var s=style.fontSize;this._musicFont=new alphaTab.platform.model.Font(family,parseFloat(s),0),this._measureCanvas=js.Boot.__cast(window.document.createElement("canvas"),HTMLCanvasElement),this._measureCanvas.width=10,this._measureCanvas.height=10,this._measureCanvas.style.width="10px",this._measureCanvas.style.height="10px",this._measureContext=this._measureCanvas.getContext("2d"),this._measureContext.textBaseline="top"},alphaTab.platform.javaScript.Html5Canvas.__name__=["alphaTab","platform","javaScript","Html5Canvas"],alphaTab.platform.javaScript.Html5Canvas.__interfaces__=[alphaTab.platform.ICanvas],alphaTab.platform.javaScript.Html5Canvas.prototype={get_Resources:function(){return this.__Resources},set_Resources:function(value){return this.__Resources=value},OnPreRender:function(){return null},OnRenderFinished:function(){return null},BeginRender:function(width,height){this._canvas=js.Boot.__cast(window.document.createElement("canvas"),HTMLCanvasElement);var tmp=system.Convert.ToInt32_Single(width);this._canvas.width=tmp;var tmp1=system.Convert.ToInt32_Single(height);this._canvas.height=tmp1,this._canvas.style.width=Std.string(width)+"px",this._canvas.style.height=Std.string(height)+"px",this._context=this._canvas.getContext("2d"),this._context.textBaseline="top",this._context.lineWidth=this._lineWidth},EndRender:function(){var result=this._canvas;return this._canvas=null,result},get_Color:function(){return this._color},set_Color:function(value){return this._color.RGBA==value.RGBA?this.get_Color():(this._color=value,this._context.strokeStyle=value.RGBA,this._context.fillStyle=value.RGBA,this.get_Color())},get_LineWidth:function(){return this._lineWidth},set_LineWidth:function(value){return this._lineWidth=value,null!=this._context&&(this._context.lineWidth=value),this.get_LineWidth()},FillRect:function(x,y,w,h){w>0&&this._context.fillRect(system.Convert.ToInt32_Single(x)-0,system.Convert.ToInt32_Single(y)-0,w,h)},StrokeRect:function(x,y,w,h){this._context.strokeRect(x-0,y-0,w,h)},BeginPath:function(){this._context.beginPath()},ClosePath:function(){this._context.closePath()},MoveTo:function(x,y){this._context.moveTo(x-0,y-0)},LineTo:function(x,y){this._context.lineTo(x-0,y-0)},QuadraticCurveTo:function(cpx,cpy,x,y){this._context.quadraticCurveTo(cpx,cpy,x,y)},BezierCurveTo:function(cp1x,cp1y,cp2x,cp2y,x,y){this._context.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y)},FillCircle:function(x,y,radius){this._context.beginPath(),this._context.arc(x,y,radius,0,6.28318530717958,!0),this.Fill()},Fill:function(){this._context.fill()},Stroke:function(){this._context.stroke()},get_Font:function(){return this._font},set_Font:function(value){if(this._font=value,null!=this._context){var tmp=value.ToCssString(1);this._context.font=tmp}var tmp1=value.ToCssString(1);return this._measureContext.font=tmp1,this.get_Font()},get_TextAlign:function(){switch(this._context.textAlign){case"center":return 1;case"left":return 0;case"right":return 2;default:return 0}},set_TextAlign:function(value){switch(value){case 0:this._context.textAlign="left";break;case 1:this._context.textAlign="center";break;case 2:this._context.textAlign="right"}return this.get_TextAlign()},get_TextBaseline:function(){switch(this._context.textBaseline){case"bottom":return 2;case"middle":return 1;case"top":default:return 0}},set_TextBaseline:function(value){switch(value){case 0:this._context.textBaseline="top";break;case 1:this._context.textBaseline="middle";break;case 2:this._context.textBaseline="bottom"}return this.get_TextBaseline()},BeginGroup:function(identifier){},EndGroup:function(){},FillText:function(text,x,y){x=system.Convert.ToInt32_Single(x);y=system.Convert.ToInt32_Single(y),this._context.fillText(text,x,y)},MeasureText:function(text){return js.Boot.__cast(this._measureContext.measureText(text).width,Float)},FillMusicFontSymbol:function(x,y,scale,symbol){if(-1!=symbol){x=system.Convert.ToInt32_Single(x);y=system.Convert.ToInt32_Single(y);var baseLine=this._context.textBaseline,font=this._context.font,tmp=this._musicFont.ToCssString(scale);this._context.font=tmp,this._context.textBaseline="middle",this._context.fillText(String.fromCharCode(symbol),x,y),this._context.textBaseline=baseLine,this._context.font=font}},FillMusicFontSymbols:function(x,y,scale,symbols){x=system.Convert.ToInt32_Single(x);y=system.Convert.ToInt32_Single(y);var baseLine=this._context.textBaseline,font=this._context.font,tmp=this._musicFont.ToCssString(scale);this._context.font=tmp,this._context.textBaseline="middle";for(var s="",symbol=HxOverrides.iter(symbols);symbol.hasNext();){var symbol1=symbol.next();-1!=symbol1&&(s+=String.fromCharCode(symbol1))}this._context.fillText(s,x,y),this._context.textBaseline=baseLine,this._context.font=font},BeginRotate:function(centerX,centerY,angle){this._context.save(),this._context.translate(centerX,centerY);this._context.rotate(3.14159265358979*angle/180)},EndRotate:function(){this._context.restore()},__class__:alphaTab.platform.javaScript.Html5Canvas},alphaTab.platform.javaScript.JQueryAlphaTab=$hx_exports.alphaTab.platform.javaScript.JQueryAlphaTab=function(){this._initListeners=[]},alphaTab.platform.javaScript.JQueryAlphaTab.__name__=["alphaTab","platform","javaScript","JQueryAlphaTab"],alphaTab.platform.javaScript.JQueryAlphaTab.Restore=function(selector){$(selector).empty().removeData("alphaTab")},alphaTab.platform.javaScript.JQueryAlphaTab.prototype={Exec:function(element,method,args){"string"!=typeof method&&(args=[method],method="init");if(95==system.Convert.ToUInt16(HxOverrides.cca(method,0))||"Exec"==method)return null;var jElement=$(element),context=jElement.data("alphaTab");if("destroy"==method&&!context)return null;if("init"!=method&&!context)throw new Error("alphaTab not initialized");var apiMethod=this[method];if(apiMethod){var realArgs=[jElement,context].concat(args);return apiMethod.apply(this,realArgs)}return alphaTab.util.Logger.Error("Api","Method '"+method+"' does not exist on jQuery.alphaTab",null),null},init:function(element,context,options){if(!context){context=new alphaTab.platform.javaScript.AlphaTabApi(element[0],options),element.data("alphaTab",context);for(var listener=$iterator(this._initListeners)();listener.hasNext();){listener.next()(element,context,options)}}},destroy:function(element,context){element.removeData("alphaTab"),context.Destroy()},tex:function(element,context,tex){context.Tex(tex)},tracks:function(element,context,tracks){return tracks&&context.SetTracks(tracks,!0),context.get_Tracks()},api:function(element,context){return context},score:function(element,context,score){return score&&context.ScoreLoaded(score,!0),context.Score},renderer:function(element,context){return context.Renderer},layout:function(element,context,layout){return layout&&context.UpdateLayout(layout),context.Settings.Layout},print:function(element,context,width){context.Print(width)},player:function(element,context){return context.Player},playerOptions:function(element,context,options){return options&&alphaTab.Settings.FillPlayerOptions(context.Settings,options,!1,null),context.Settings},cursorOptions:function(element,context,options){return this.playerOptions(element,context,options)},playerState:function(element,context){return null==context.Player?0:context.Player.get_State()},masterVolume:function(element,context,masterVolume){return null==context.Player?0:(masterVolume&&context.Player.set_MasterVolume(masterVolume),context.Player.get_MasterVolume())},playbackSpeed:function(element,context,playbackSpeed){return null==context.Player?0:(playbackSpeed&&context.Player.set_PlaybackSpeed(playbackSpeed),context.Player.get_PlaybackSpeed())},metronomeVolume:function(element,context,metronomeVolume){return null==context.Player?0:(metronomeVolume&&context.Player.set_MetronomeVolume(metronomeVolume),context.Player.get_MetronomeVolume())},tickPosition:function(element,context,tickPosition){return null==context.Player?0:(tickPosition&&context.Player.set_TickPosition(tickPosition),context.Player.get_TickPosition())},playbackRange:function(element,context,playbackRange){return null==context.Player?null:(playbackRange&&context.Player.set_PlaybackRange(playbackRange),context.Player.get_PlaybackRange())},loop:function(element,context,loop){return null!=context.Player&&(loop&&context.Player.set_IsLooping(loop),context.Player.get_IsLooping())},autoScroll:function(element,context,autoScroll){return null==context.Player?null:(autoScroll&&(context.Settings.ScrollMode=autoScroll),context.Settings.ScrollMode)},play:function(element,context){context.Play()},pause:function(element,context){context.Pause()},playPause:function(element,context){context.PlayPause()},stop:function(element,context){context.Stop()},loadSoundFont:function(element,context,value){context.LoadSoundFont(value)},muteTrack:function(element,context,tracks,mute){context.SetTrackMute(tracks,mute)},soloTrack:function(element,context,tracks,solo){context.SetTrackSolo(tracks,solo)},trackVolume:function(element,context,tracks,volume){context.SetTrackVolume(tracks,volume)},downloadMidi:function(element,context,tracks,volume){context.DownloadMidi()},_oninit:function(listener){this._initListeners.push(listener)},__class__:alphaTab.platform.javaScript.JQueryAlphaTab},alphaTab.util={},alphaTab.util.Logger=$hx_exports.alphaTab.util.Logger=function(){},alphaTab.util.Logger.__name__=["alphaTab","util","Logger"],alphaTab.util.Logger.Debug=function(category,msg,details){alphaTab.util.Logger.Log(1,category,msg,details)},alphaTab.util.Logger.Warning=function(category,msg,details){alphaTab.util.Logger.Log(3,category,msg,details)},alphaTab.util.Logger.Info=function(category,msg,details){alphaTab.util.Logger.Log(2,category,msg,details)},alphaTab.util.Logger.Error=function(category,msg,details){alphaTab.util.Logger.Log(4,category,msg,details)},alphaTab.util.Logger.Log=function(logLevel,category,msg,details){logLevel=0){var className=HxOverrides.substr(fullName,0,idx),methodName=HxOverrides.substr(fullName,idx+1,null);method=haxe.StackItem.Method(className,methodName)}}stack.push(haxe.StackItem.FilePos(method,site.getFileName(),site.getLineNumber()))}return stack};var a=haxe.CallStack.makeStack(e.stack);return Error.prepareStackTrace=oldValue,a},haxe.CallStack.callStack=function(){try{throw new Error}catch(e){e instanceof js._Boot.HaxeError&&(e=e.val);var a=haxe.CallStack.getStack(e);return a.shift(),a}},haxe.CallStack.toString=function(stack){for(var b=new StringBuf,_g=0;_g=5)return"<...>";var t=typeof o;switch("function"==t&&(o.__name__||o.__ename__)&&(t="object"),t){case"function":return"";case"object":if(o instanceof Array){if(o.__enum__){if(2==o.length)return o[0];var str=o[0]+"(";s+="\t";for(var _g1=2,_g=o.length;_g1<_g;){var i=_g1++;str+=2!=i?","+js.Boot.__string_rec(o[i],s):js.Boot.__string_rec(o[i],s)}return str+")"}var l=o.length,str1="[";s+="\t";for(var _g11=0,_g2=l;_g11<_g2;){var i2=_g11++;str1+=(i2>0?",":"")+js.Boot.__string_rec(o[i2],s)}return str1+="]"}var tostr;try{tostr=o.toString}catch(e){return"???"}if(null!=tostr&&tostr!=Object.toString&&"function"==typeof tostr){var s2=o.toString();if("[object Object]"!=s2)return s2}var k=null,str2="{\n";s+="\t";var hasp=null!=o.hasOwnProperty;for(var k in o)hasp&&!o.hasOwnProperty(k)||"prototype"!=k&&"__class__"!=k&&"__super__"!=k&&"__interfaces__"!=k&&"__properties__"!=k&&(2!=str2.length&&(str2+=", \n"),str2+=s+k+" : "+js.Boot.__string_rec(o[k],s));return str2+="\n"+(s=s.substring(1))+"}";case"string":return o;default:return String(o)}},js.Boot.__interfLoop=function(cc,cl){if(null==cc)return!1;if(cc==cl)return!0;var intf=cc.__interfaces__;if(null!=intf)for(var _g1=0,_g=intf.length;_g1<_g;){var i1=intf[_g1++];if(i1==cl||js.Boot.__interfLoop(i1,cl))return!0}return js.Boot.__interfLoop(cc.__super__,cl)},js.Boot.__instanceof=function(o,cl){if(null==cl)return!1;switch(cl){case Array:return o instanceof Array&&null==o.__enum__;case Bool:return"boolean"==typeof o;case Dynamic:return!0;case Float:return"number"==typeof o;case Int:return"number"==typeof o&&(0|o)===o;case String:return"string"==typeof o;default:if(null==o)return!1;if("function"==typeof cl){if(o instanceof cl)return!0;if(js.Boot.__interfLoop(js.Boot.getClass(o),cl))return!0}else if("object"==typeof cl&&js.Boot.__isNativeObj(cl)&&o instanceof cl)return!0;return cl==Class&&null!=o.__name__||(cl==Enum&&null!=o.__ename__||o.__enum__==cl)}},js.Boot.__cast=function(o,t){if(js.Boot.__instanceof(o,t))return o;throw new js._Boot.HaxeError("Cannot cast "+Std.string(o)+" to "+Std.string(t))},js.Boot.__nativeClassName=function(o){var name=js.Boot.__toStr.call(o).slice(8,-1);return"Object"==name||"Function"==name||"Math"==name||"JSON"==name?null:name},js.Boot.__isNativeObj=function(o){return null!=js.Boot.__nativeClassName(o)},js.Boot.__resolveNativeClass=function(name){return $global[name]},haxe.StackItem={__ename__:!0,__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"]},haxe.StackItem.CFunction=["CFunction",0],haxe.StackItem.CFunction.toString=$estr,haxe.StackItem.CFunction.__enum__=haxe.StackItem,haxe.StackItem.Module=function(m){var $x=["Module",1,m];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},haxe.StackItem.FilePos=function(s,file,line){var $x=["FilePos",2,s,file,line];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},haxe.StackItem.Method=function(classname,method){var $x=["Method",3,classname,method];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},haxe.StackItem.LocalFunction=function(v){var $x=["LocalFunction",4,v];return $x.__enum__=haxe.StackItem,$x.toString=$estr,$x},alphaTab.platform.javaScript.AlphaTabWebWorker=$hx_exports.alphaTab.platform.javaScript.AlphaTabWebWorker=function(main){this._renderer=null,this._main=null,this._main=main,this._main.addEventListener("message",$bind(this,this.HandleMessage),!1)},alphaTab.platform.javaScript.AlphaTabWebWorker.__name__=["alphaTab","platform","javaScript","AlphaTabWebWorker"],alphaTab.platform.javaScript.AlphaTabWebWorker.Init=function(){new alphaTab.platform.javaScript.AlphaTabWebWorker($global)},alphaTab.platform.javaScript.AlphaTabWebWorker.prototype={HandleMessage:function(e){var _gthis=this,data=js.Boot.__cast(e,MessageEvent).data;switch(data?data.cmd:""){case"alphaTab.initialize":var settings=alphaTab.Settings.FromJson(data.settings,null);alphaTab.util.Logger.LogLevel=settings.LogLevel,this._renderer=new alphaTab.rendering.ScoreRenderer(settings),this._renderer.PartialRenderFinished=system._EventAction1.EventAction1_Impl_.add(this._renderer.PartialRenderFinished,function(result){_gthis._main.postMessage({cmd:"alphaTab.partialRenderFinished",result:result})}),this._renderer.RenderFinished=system._EventAction1.EventAction1_Impl_.add(this._renderer.RenderFinished,function(result1){_gthis._main.postMessage({cmd:"alphaTab.renderFinished",result:result1})}),this._renderer.PostRenderFinished=system._EventAction.EventAction_Impl_.add(this._renderer.PostRenderFinished,function(){_gthis._main.postMessage({cmd:"alphaTab.postRenderFinished",boundsLookup:_gthis._renderer.get_BoundsLookup().ToJson()})}),this._renderer.PreRender=system._EventAction1.EventAction1_Impl_.add(this._renderer.PreRender,function(result2){_gthis._main.postMessage({cmd:"alphaTab.preRender",result:result2})}),this._renderer.Error=system._EventAction2.EventAction2_Impl_.add(this._renderer.Error,$bind(this,this.Error));break;case"alphaTab.invalidate":this._renderer.Invalidate();break;case"alphaTab.render":var score=alphaTab.model.JsonConverter.JsObjectToScore(data.score,this._renderer.Settings);this.RenderMultiple(score,data.trackIndexes);break;case"alphaTab.resize":this._renderer.Resize(data.width);break;case"alphaTab.updateSettings":this.UpdateSettings(data.settings)}},UpdateSettings:function(settings){this._renderer.UpdateSettings(alphaTab.Settings.FromJson(settings,null))},RenderMultiple:function(score,trackIndexes){try{this._renderer.Render(score,trackIndexes)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;this.Error("render",e)}},Error:function(type,e){alphaTab.util.Logger.Error(type,"An unexpected error occurred in worker",e);var error=JSON.parse(JSON.stringify(e)),e2=e;e2.message&&(error.message=e2.message),e2.stack&&(error.stack=e2.stack),e2.constructor&&e2.constructor.name&&(error.type=e2.constructor.name),this._main.postMessage({cmd:"alphaTab.error",error:{type:type,detail:error}})},__class__:alphaTab.platform.javaScript.AlphaTabWebWorker},alphaTab.platform.javaScript.AlphaSynthWebWorker=$hx_exports.alphaTab.platform.javaScript.AlphaSynthWebWorker=function(main,id){this._player=null,this._main=null,this._main=main,this._main.addEventListener("message",$bind(this,this.HandleMessage)),this._player=new alphaTab.audio.synth.AlphaSynth(new alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput),this._player.PositionChanged=system._EventAction1.EventAction1_Impl_.add(this._player.PositionChanged,$bind(this,this.OnPositionChanged)),this._player.PlayerStateChanged=system._EventAction1.EventAction1_Impl_.add(this._player.PlayerStateChanged,$bind(this,this.OnPlayerStateChanged)),this._player.Finished=system._EventAction1.EventAction1_Impl_.add(this._player.Finished,$bind(this,this.OnFinished)),this._player.SoundFontLoaded=system._EventAction.EventAction_Impl_.add(this._player.SoundFontLoaded,$bind(this,this.OnSoundFontLoaded)),this._player.SoundFontLoadFailed=system._EventAction1.EventAction1_Impl_.add(this._player.SoundFontLoadFailed,$bind(this,this.OnSoundFontLoadFailed)),this._player.SoundFontLoadFailed=system._EventAction1.EventAction1_Impl_.add(this._player.SoundFontLoadFailed,$bind(this,this.OnSoundFontLoadFailed)),this._player.MidiLoaded=system._EventAction.EventAction_Impl_.add(this._player.MidiLoaded,$bind(this,this.OnMidiLoaded)),this._player.MidiLoadFailed=system._EventAction1.EventAction1_Impl_.add(this._player.MidiLoadFailed,$bind(this,this.OnMidiLoadFailed)),this._player.ReadyForPlayback=system._EventAction.EventAction_Impl_.add(this._player.ReadyForPlayback,$bind(this,this.OnReadyForPlayback)),this._main.postMessage({cmd:"alphaSynth.ready"})},alphaTab.platform.javaScript.AlphaSynthWebWorker.__name__=["alphaTab","platform","javaScript","AlphaSynthWebWorker"],alphaTab.platform.javaScript.AlphaSynthWebWorker.Init=function(){var main=$global;main.addEventListener("message",function(e){var data=e.data;"alphaSynth.initialize"==data.cmd&&(alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.PreferredSampleRate=data.sampleRate,alphaTab.util.Logger.LogLevel=data.logLevel,new alphaTab.platform.javaScript.AlphaSynthWebWorker(main,data.id))})},alphaTab.platform.javaScript.AlphaSynthWebWorker.prototype={HandleMessage:function(e){var data=e.data;switch(data.cmd){case"alphaSynth.loadMidi":this._player.LoadMidi(alphaTab.model.JsonConverter.JsObjectToMidiFile(data.midi));break;case"alphaSynth.loadSoundFontBytes":this._player.LoadSoundFont(data.data);break;case"alphaSynth.pause":this._player.Pause();break;case"alphaSynth.play":this._player.Play();break;case"alphaSynth.playPause":this._player.PlayPause();break;case"alphaSynth.resetChannelStates":this._player.ResetChannelStates();break;case"alphaSynth.setChannelMute":this._player.SetChannelMute(data.channel,data.mute);break;case"alphaSynth.setChannelProgram":this._player.SetChannelProgram(data.channel,data.program);break;case"alphaSynth.setChannelSolo":this._player.SetChannelSolo(data.channel,data.solo);break;case"alphaSynth.setChannelVolume":this._player.SetChannelVolume(data.channel,data.volume);break;case"alphaSynth.setIsLooping":this._player.set_IsLooping(data.value);break;case"alphaSynth.setLogLevel":alphaTab.util.Logger.LogLevel=data.value;break;case"alphaSynth.setMasterVolume":this._player.set_MasterVolume(data.value);break;case"alphaSynth.setMetronomeVolume":this._player.set_MetronomeVolume(data.value);break;case"alphaSynth.setPlaybackRange":this._player.set_PlaybackRange(data.value);break;case"alphaSynth.setPlaybackSpeed":this._player.set_PlaybackSpeed(data.value);break;case"alphaSynth.setTickPosition":this._player.set_TickPosition(data.value);break;case"alphaSynth.setTimePosition":this._player.set_TimePosition(data.value);break;case"alphaSynth.stop":this._player.Stop()}},OnPositionChanged:function(e){this._main.postMessage({cmd:"alphaSynth.positionChanged",currentTime:e.CurrentTime,endTime:e.EndTime,currentTick:e.CurrentTick,endTick:e.EndTick})},OnPlayerStateChanged:function(e){this._main.postMessage({cmd:"alphaSynth.playerStateChanged",state:e.State})},OnFinished:function(isLooping){this._main.postMessage({cmd:"alphaSynth.finished",isLooping:isLooping})},OnSoundFontLoaded:function(){this._main.postMessage({cmd:"alphaSynth.soundFontLoaded"})},OnSoundFontLoadFailed:function(e){this._main.postMessage({cmd:"alphaSynth.soundFontLoadFailed",error:this.SerializeException(e)})},SerializeException:function(e){var error=JSON.parse(JSON.stringify(e)),e2=e;return e2.message&&(error.message=e2.message),e2.stack&&(error.stack=e2.stack),e2.constructor&&e2.constructor.name&&(error.type=e2.constructor.name),error},OnMidiLoaded:function(){this._main.postMessage({cmd:"alphaSynth.midiLoaded"})},OnMidiLoadFailed:function(e){this._main.postMessage({cmd:"alphaSynth.midiLoaded",error:this.SerializeException(e)})},OnReadyForPlayback:function(){this._main.postMessage({cmd:"alphaSynth.readyForPlayback"})},SendLog:function(level,s){this._main.postMessage({cmd:"alphaSynth.log",level:level,message:s})},__class__:alphaTab.platform.javaScript.AlphaSynthWebWorker},alphaTab.audio={},alphaTab.audio.synth={},alphaTab.audio.synth.ISynthOutput=$hx_exports.alphaTab.audio.synth.ISynthOutput=function(){},alphaTab.audio.synth.ISynthOutput.__name__=["alphaTab","audio","synth","ISynthOutput"],alphaTab.audio.synth.ISynthOutput.prototype={__class__:alphaTab.audio.synth.ISynthOutput},alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput=$hx_exports.alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput=function(){this._worker=null},alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.__name__=["alphaTab","platform","javaScript","AlphaSynthWorkerSynthOutput"],alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.__interfaces__=[alphaTab.audio.synth.ISynthOutput],alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.prototype={get_SampleRate:function(){return alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.PreferredSampleRate},Open:function(){alphaTab.util.Logger.Debug("AlphaSynth","Initializing webworker worker",null),this._worker=$global,this._worker.addEventListener("message",$bind(this,this.HandleMessage)),system._EventAction.EventAction_Impl_.Invoke(this.Ready)},HandleMessage:function(e){var data=e.data;switch(data.cmd){case"alphaSynth.output.finished":system._EventAction.EventAction_Impl_.Invoke(this.Finished);break;case"alphaSynth.output.sampleRequest":system._EventAction.EventAction_Impl_.Invoke(this.SampleRequest);break;case"alphaSynth.output.samplesPlayed":system._EventAction1.EventAction1_Impl_.Invoke(this.SamplesPlayed,data.samples)}},add_Ready:function(value){return this.Ready=system._EventAction.EventAction_Impl_.add(this.Ready,value)},remove_Ready:function(value){return this.Ready=system._EventAction.EventAction_Impl_.sub(this.Ready,value)},add_SamplesPlayed:function(value){return this.SamplesPlayed=system._EventAction1.EventAction1_Impl_.add(this.SamplesPlayed,value)},remove_SamplesPlayed:function(value){return this.SamplesPlayed=system._EventAction1.EventAction1_Impl_.sub(this.SamplesPlayed,value)},add_SampleRequest:function(value){return this.SampleRequest=system._EventAction.EventAction_Impl_.add(this.SampleRequest,value)},remove_SampleRequest:function(value){return this.SampleRequest=system._EventAction.EventAction_Impl_.sub(this.SampleRequest,value)},add_Finished:function(value){return this.Finished=system._EventAction.EventAction_Impl_.add(this.Finished,value)},remove_Finished:function(value){return this.Finished=system._EventAction.EventAction_Impl_.sub(this.Finished,value)},SequencerFinished:function(){this._worker.postMessage({cmd:"alphaSynth.output.sequencerFinished"})},AddSamples:function(samples){this._worker.postMessage({cmd:"alphaSynth.output.addSamples",samples:samples})},Play:function(){this._worker.postMessage({cmd:"alphaSynth.output.play"})},Pause:function(){this._worker.postMessage({cmd:"alphaSynth.output.pause"})},ResetSamples:function(){this._worker.postMessage({cmd:"alphaSynth.output.resetSamples"})},__class__:alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput},alphaTab.audio.synth.IAlphaSynth=$hx_exports.alphaTab.audio.synth.IAlphaSynth=function(){},alphaTab.audio.synth.IAlphaSynth.__name__=["alphaTab","audio","synth","IAlphaSynth"],alphaTab.audio.synth.IAlphaSynth.prototype={__class__:alphaTab.audio.synth.IAlphaSynth},alphaTab.audio.synth.AlphaSynth=$hx_exports.alphaTab.audio.synth.AlphaSynth=function(output){var _gthis=this;this._sequencer=null,this._synthesizer=null,this._isSoundFontLoaded=!1,this._isMidiLoaded=!1,this._tickPosition=0,this._timePosition=0,this.Output=null,this.set_IsReady(!1),this.set_State(0),alphaTab.util.Logger.Debug("AlphaSynth","Initializing player",null),this.set_State(0),alphaTab.util.Logger.Debug("AlphaSynth","Creating output",null),this.Output=output,this.Output.Ready=system._EventAction.EventAction_Impl_.add(this.Output.Ready,function(){_gthis.set_IsReady(!0),_gthis.CheckReadyForPlayback()}),this.Output.Finished=system._EventAction.EventAction_Impl_.add(this.Output.Finished,function(){_gthis.Stop(),alphaTab.util.Logger.Debug("AlphaSynth","Finished playback",null),_gthis.OnFinished(_gthis._sequencer.IsLooping),_gthis._sequencer.IsLooping&&_gthis.Play()}),this.Output.SampleRequest=system._EventAction.EventAction_Impl_.add(this.Output.SampleRequest,function(){_gthis._sequencer.FillMidiEventQueue(),_gthis._synthesizer.Synthesize(),_gthis.Output.AddSamples(_gthis._synthesizer.SampleBuffer),_gthis._sequencer.CheckForStop()}),this.Output.SamplesPlayed=system._EventAction1.EventAction1_Impl_.add(this.Output.SamplesPlayed,$bind(this,this.OnSamplesPlayed)),alphaTab.util.Logger.Debug("AlphaSynth","Creating synthesizer",null),this._synthesizer=new alphaTab.audio.synth.synthesis.Synthesizer(this.Output.get_SampleRate(),2,441,3,100),this._sequencer=new alphaTab.audio.synth.MidiFileSequencer(this._synthesizer),this._sequencer.Finished=system._EventAction.EventAction_Impl_.add(this._sequencer.Finished,($_=this.Output,$bind($_,$_.SequencerFinished))),alphaTab.util.Logger.Debug("AlphaSynth","Opening output",null),this.Output.Open()},alphaTab.audio.synth.AlphaSynth.__name__=["alphaTab","audio","synth","AlphaSynth"],alphaTab.audio.synth.AlphaSynth.__interfaces__=[alphaTab.audio.synth.IAlphaSynth],alphaTab.audio.synth.AlphaSynth.prototype={get_IsReady:function(){return this.__IsReady},set_IsReady:function(value){return this.__IsReady=value},get_IsReadyForPlayback:function(){return!(!this.get_IsReady()||!this._isSoundFontLoaded)&&this._isMidiLoaded},get_State:function(){return this.__State},set_State:function(value){return this.__State=value},get_LogLevel:function(){return alphaTab.util.Logger.LogLevel},set_LogLevel:function(value){return alphaTab.util.Logger.LogLevel=value},get_MasterVolume:function(){return this._synthesizer.MasterVolume},set_MasterVolume:function(value){return value=alphaTab.audio.synth.util.SynthHelper.ClampF(value,0,10),this._synthesizer.MasterVolume=value,this.get_MasterVolume()},get_MetronomeVolume:function(){return this._synthesizer.get_MetronomeVolume()},set_MetronomeVolume:function(value){return value=alphaTab.audio.synth.util.SynthHelper.ClampF(value,0,10),this._synthesizer.set_MetronomeVolume(value),this.get_MetronomeVolume()},get_PlaybackSpeed:function(){return this._sequencer.PlaybackSpeed},set_PlaybackSpeed:function(value){value=alphaTab.audio.synth.util.SynthHelper.ClampD(value,.125,8);var oldSpeed=this._sequencer.PlaybackSpeed;return this._sequencer.PlaybackSpeed=value,this.UpdateTimePosition(this._timePosition*(oldSpeed/value)),this.get_PlaybackSpeed()},get_TickPosition:function(){return this._tickPosition},set_TickPosition:function(value){return this.set_TimePosition(this._sequencer.TickPositionToTimePosition(value)),this.get_TickPosition()},get_TimePosition:function(){return this._timePosition},set_TimePosition:function(value){return alphaTab.util.Logger.Debug("AlphaSynth","Seeking to position "+value+"ms",null),this._sequencer.Seek(value),this.UpdateTimePosition(value),this.Output.ResetSamples(),this.get_TimePosition()},get_PlaybackRange:function(){return this._sequencer.get_PlaybackRange()},set_PlaybackRange:function(value){return this._sequencer.set_PlaybackRange(value),null!=value&&this.set_TickPosition(value.StartTick),this.get_PlaybackRange()},get_IsLooping:function(){return this._sequencer.IsLooping},set_IsLooping:function(value){return this._sequencer.IsLooping=value},Play:function(){1!=this.get_State()&&this.get_IsReadyForPlayback()&&(alphaTab.util.Logger.Debug("AlphaSynth","Starting playback",null),this.set_State(1),this.OnPlayerStateChanged(new alphaTab.audio.synth.PlayerStateChangedEventArgs(this.get_State())),this.Output.Play())},Pause:function(){0!=this.get_State()&&this.get_IsReadyForPlayback()&&(alphaTab.util.Logger.Debug("AlphaSynth","Pausing playback",null),this.set_State(0),this.OnPlayerStateChanged(new alphaTab.audio.synth.PlayerStateChangedEventArgs(this.get_State())),this.Output.Pause(),this._synthesizer.NoteOffAll(!1))},PlayPause:function(){1!=this.get_State()&&this.get_IsReadyForPlayback()?this.Play():this.Pause()},Stop:function(){this.get_IsReadyForPlayback()&&(alphaTab.util.Logger.Debug("AlphaSynth","Stopping playback",null),this.Pause(),this._synthesizer.NoteOffAll(!0),this.set_TickPosition(null!=this._sequencer.get_PlaybackRange()?this._sequencer.get_PlaybackRange().StartTick:0))},LoadSoundFont:function(data){this.Pause();var input=alphaTab.io.ByteBuffer.FromBuffer(data);try{alphaTab.util.Logger.Info("AlphaSynth","Loading soundfont from bytes",null);var bank=new alphaTab.audio.synth.bank.PatchBank;bank.LoadSf2(input),this._synthesizer.LoadBank(bank),this._isSoundFontLoaded=!0,this.OnSoundFontLoaded(),alphaTab.util.Logger.Info("AlphaSynth","soundFont successfully loaded",null),this.CheckReadyForPlayback()}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;alphaTab.util.Logger.Error("AlphaSynth","Could not load soundfont from bytes "+Std.string(e),null),this.OnSoundFontLoadFailed(e)}},CheckReadyForPlayback:function(){this.get_IsReadyForPlayback()&&this.OnReadyForPlayback()},LoadMidi:function(midiFile){this.Stop();try{alphaTab.util.Logger.Info("AlphaSynth","Loading midi from model",null),this._sequencer.LoadMidi(midiFile),this._isMidiLoaded=!0,this.OnMidiLoaded(),alphaTab.util.Logger.Info("AlphaSynth","Midi successfully loaded",null),this.CheckReadyForPlayback(),this.set_TickPosition(0)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;alphaTab.util.Logger.Error("AlphaSynth","Could not load midi from model "+Std.string(e),null),this.OnMidiLoadFailed(e)}},SetChannelMute:function(channel,mute){this._synthesizer.SetChannelMute(channel,mute)},ResetChannelStates:function(){this._synthesizer.ResetChannelStates()},SetChannelSolo:function(channel,solo){this._synthesizer.SetChannelSolo(channel,solo)},SetChannelVolume:function(channel,volume){volume=alphaTab.audio.synth.util.SynthHelper.ClampD(volume,0,10),this._synthesizer.SetChannelVolume(channel,volume)},SetChannelProgram:function(channel,program){program=alphaTab.audio.synth.util.SynthHelper.ClampB(program,0,127),this._sequencer.SetChannelProgram(channel,program),this._synthesizer.SetChannelProgram(channel,program)},OnSamplesPlayed:function(sampleCount){var playedMillis=sampleCount/js.Boot.__cast(this._synthesizer.SampleRate,Float)*1e3;this.UpdateTimePosition(this._timePosition+playedMillis)},UpdateTimePosition:function(timePosition){var currentTime=this._timePosition=timePosition,currentTick=this._tickPosition=this._sequencer.TimePositionToTickPosition(currentTime),endTime=this._sequencer.get_EndTime(),endTick=this._sequencer.EndTick;alphaTab.util.Logger.Debug("AlphaSynth","Position changed: (time: "+currentTime+"/"+endTime+", tick: "+currentTick+"/"+endTime+", Active Voices: "+this._synthesizer.get_ActiveVoices()+", Free Voices: "+this._synthesizer.get_FreeVoices()+")",null),this.OnPositionChanged(new alphaTab.audio.synth.PositionChangedEventArgs(currentTime,endTime,currentTick,endTick))},OnFinished:function(isLooping){var _e=this.Finished,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(isLooping)},OnPlayerStateChanged:function(e){var _e=this.PlayerStateChanged,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},OnSoundFontLoaded:function(){var _e=this.SoundFontLoaded,handler=function(){system._EventAction.EventAction_Impl_.Invoke(_e)};null!=handler&&handler()},OnReadyForPlayback:function(){var _e=this.ReadyForPlayback,handler=function(){system._EventAction.EventAction_Impl_.Invoke(_e)};null!=handler&&handler()},OnSoundFontLoadFailed:function(e){var _e=this.SoundFontLoadFailed,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},OnMidiLoaded:function(){var _e=this.MidiLoaded,handler=function(){system._EventAction.EventAction_Impl_.Invoke(_e)};null!=handler&&handler()},OnMidiLoadFailed:function(e){var _e=this.MidiLoadFailed,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},OnPositionChanged:function(e){var _e=this.PositionChanged,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},__class__:alphaTab.audio.synth.AlphaSynth},system._EventAction={},system._EventAction.EventAction_Impl_={},system._EventAction.EventAction_Impl_.__name__=["system","_EventAction","EventAction_Impl_"],system._EventAction.EventAction_Impl_.add=function(lhs,rhs){if(null==lhs){lhs=null==rhs?null:[rhs]}else lhs.push(rhs);return lhs},system._EventAction.EventAction_Impl_.sub=function(lhs,rhs){var raw=lhs,index=raw.indexOf(rhs);return-1!=index&&(raw.splice(index,1),0==raw.length)?null:lhs},system._EventAction.EventAction_Impl_.Invoke=function(this1){if(null!=this1)for(var _g=0;_g0)for(var i=0;i=0;){if(this._layerList[x].ExclusiveGroupTarget==this._layerList[i].ExclusiveGroupTarget){notseen=!1;break}--i}if(0!=this._layerList[x].ExclusiveGroupTarget&¬seen)for(var node1=this._voiceManager.ActiveVoices.First;null!=node1;)this._layerList[x].ExclusiveGroupTarget==node1.Value.Patch.ExclusiveGroup&&(node1.Value.Stop(),this._voiceManager.RemoveVoiceFromRegistry(node1.Value)),node1=node1.get_Next();++x}for(var x1=0;x163||this.ReleaseHoldPedal(channel),this._synthChannels[channel].HoldPedal=data2>63;break;case 68:this._synthChannels[channel].LegatoPedal=data2>63;break;case 98:case 99:this._synthChannels[channel].Rpn.set_Combined(16383);break;case 100:this._synthChannels[channel].Rpn.set_Fine(system.Convert.ToUInt8(data2));break;case 101:this._synthChannels[channel].Rpn.set_Coarse(system.Convert.ToUInt8(data2));break;case 121:this._synthChannels[channel].Expression.set_Combined(16383),this._synthChannels[channel].ModRange.set_Combined(0),this._synthChannels[channel].HoldPedal&&this.ReleaseHoldPedal(channel),this._synthChannels[channel].HoldPedal=!1,this._synthChannels[channel].LegatoPedal=!1,this._synthChannels[channel].Rpn.set_Combined(16383),this._synthChannels[channel].PitchBend.set_Combined(8192),this._synthChannels[channel].ChannelAfterTouch=0,this._synthChannels[channel].UpdateCurrentPitch(),this._synthChannels[channel].UpdateCurrentVolumeFromExpression();break;case 123:this.NoteOffAll(!1);break;default:return}break;case 192:this._synthChannels[channel].Program=system.Convert.ToUInt8(data1);break;case 208:this._synthChannels[channel].ChannelAfterTouch=system.Convert.ToUInt8(data2);break;case 224:this._synthChannels[channel].PitchBend.set_Coarse(system.Convert.ToUInt8(data2)),this._synthChannels[channel].PitchBend.set_Fine(system.Convert.ToUInt8(data1)),this._synthChannels[channel].UpdateCurrentPitch()}this.OnMidiEventProcessed(e)},OnMidiEventProcessed:function(e){var _e=this.MidiEventProcessed,handler=function(p){system._EventAction1.EventAction1_Impl_.Invoke(_e,p)};null!=handler&&handler(e)},ReleaseAllHoldPedals:function(){for(var node=this._voiceManager.ActiveVoices.First;null!=node;)node.Value.VoiceParams.NoteOffPending&&(node.Value.Stop(),this._voiceManager.RemoveVoiceFromRegistry(node.Value)),node=node.get_Next()},ReleaseHoldPedal:function(channel){for(var node=this._voiceManager.ActiveVoices.First;null!=node;)node.Value.VoiceParams.Channel==channel&&node.Value.VoiceParams.NoteOffPending&&(node.Value.Stop(),this._voiceManager.RemoveVoiceFromRegistry(node.Value)),node=node.get_Next()},DispatchEvent:function(i,synthEvent){this._midiEventQueue.AddFirst(synthEvent);var tmp=i,tmp1=this._midiEventCounts[tmp];this._midiEventCounts[tmp]=tmp1+1},SetChannelMute:function(channel,mute){if(mute)this._mutedChannels[channel]=!0;else{delete this._mutedChannels[channel]}},ResetChannelStates:function(){this._mutedChannels={};this._soloChannels={},this._isAnySolo=!1},SetChannelSolo:function(channel,solo){if(solo)this._soloChannels[channel]=!0;else{delete this._soloChannels[channel]}var this2=this._soloChannels;this._isAnySolo=Object.keys(this2).length>0},SetChannelProgram:function(channel,program){channel<0||channel>=this._synthChannels.length||(this._synthChannels[channel].Program=program)},SetChannelVolume:function(channel,volume){channel<0||channel>=this._synthChannels.length||(this._synthChannels[channel].MixVolume=js.Boot.__cast(volume,Float))},__class__:alphaTab.audio.synth.synthesis.Synthesizer},alphaTab.audio.synth.util={},alphaTab.audio.synth.util.SynthHelper=$hx_exports.alphaTab.audio.synth.util.SynthHelper=function(){},alphaTab.audio.synth.util.SynthHelper.__name__=["alphaTab","audio","synth","util","SynthHelper"],alphaTab.audio.synth.util.SynthHelper.SwapEndianess=function(data,bits){for(var swapArray=new Uint8Array(bits=bits/8|0),x=0;x=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampD=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampF=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampI=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.ClampS=function(value,min,max){return value<=min?min:value>=max?max:value},alphaTab.audio.synth.util.SynthHelper.NearestPowerOfTwo=function(value){return Math.pow(2,Math.round(Math.log(value)/Math.log(2)))},alphaTab.audio.synth.util.SynthHelper.SamplesFromTime=function(sampleRate,seconds){return sampleRate*seconds},alphaTab.audio.synth.util.SynthHelper.TimeFromSamples=function(sampleRate,samples){return samples/js.Boot.__cast(sampleRate,Float)},alphaTab.audio.synth.util.SynthHelper.DBtoLinear=function(dBvalue){return Math.pow(10,dBvalue/20)},alphaTab.audio.synth.util.SynthHelper.LineartoDB=function(linearvalue){return Math.log(linearvalue)/Math.log(10)*20},alphaTab.audio.synth.util.SynthHelper.FrequencyToKey=function(frequency,rootkey){return Math.log(frequency/440)/Math.log(2)*12+rootkey},alphaTab.audio.synth.util.SynthHelper.KeyToFrequency=function(key,rootkey){return 440*Math.pow(2,(key-rootkey)/12)},alphaTab.audio.synth.util.SynthHelper.SemitoneToPitch=function(key){key<-127?key=-127:key>127&&(key=127);return alphaTab.audio.synth.util.Tables.SemitoneTable(127+key)},alphaTab.audio.synth.util.SynthHelper.CentsToPitch=function(cents){var key=cents/100|0;cents-=100*key,key<-127?key=-127:key>127&&(key=127);return alphaTab.audio.synth.util.Tables.SemitoneTable(127+key)*alphaTab.audio.synth.util.Tables.CentTable(100+cents)},alphaTab.audio.synth.util.SynthHelper.prototype={__class__:alphaTab.audio.synth.util.SynthHelper},system.OverflowException=function(message){null==message&&(message=""),system.Exception.call(this),this.Exception_CsString(message)},system.OverflowException.__name__=["system","OverflowException"],system.OverflowException.__super__=system.Exception,system.OverflowException.prototype=$extend(system.Exception.prototype,{__class__:system.OverflowException}),alphaTab.audio.synth.synthesis.SynthParameters=$hx_exports.alphaTab.audio.synth.synthesis.SynthParameters=function(synth){this.Program=0,this.BankSelect=0,this.ChannelAfterTouch=0,this.Pan=null,this.Volume=null,this.Expression=null,this.ModRange=null,this.PitchBend=null,this.PitchBendRangeCoarse=0,this.PitchBendRangeFine=0,this.MasterCoarseTune=0,this.MasterFineTune=null,this.HoldPedal=!1,this.LegatoPedal=!1,this.Rpn=null,this.Synth=null,this.CurrentVolume=0,this.CurrentPitch=0,this.CurrentMod=0,this.CurrentPan=null,this.MixVolume=0,this.Synth=synth,this.Pan=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.Volume=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.Expression=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.ModRange=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.PitchBend=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.MasterFineTune=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.Rpn=(new alphaTab.audio.synth.synthesis.CCValue).CCValue_Int16(0),this.MixVolume=1,this.CurrentPan=new alphaTab.audio.synth.bank.components.PanComponent,this.ResetControllers()},alphaTab.audio.synth.synthesis.SynthParameters.__name__=["alphaTab","audio","synth","synthesis","SynthParameters"],alphaTab.audio.synth.synthesis.SynthParameters.prototype={ResetControllers:function(){this.Program=0,this.BankSelect=0,this.ChannelAfterTouch=0,this.Pan.set_Combined(8192),this.Volume.set_Fine(0),this.Volume.set_Coarse(100),this.Expression.set_Combined(16383),this.ModRange.set_Combined(0),this.PitchBend.set_Combined(8192),this.PitchBendRangeCoarse=2,this.PitchBendRangeFine=0,this.MasterCoarseTune=0,this.MasterFineTune.set_Combined(8192),this.HoldPedal=!1,this.LegatoPedal=!1,this.Rpn.set_Combined(16383),this.UpdateCurrentPan(),this.UpdateCurrentPitch(),this.UpdateCurrentVolumeFromExpression()},UpdateCurrentPitch:function(){this.CurrentPitch=system.Convert.ToInt32_Double((this.PitchBend.get_Combined()-8192)/8192*(100*this.PitchBendRangeCoarse+this.PitchBendRangeFine))},UpdateCurrentMod:function(){this.CurrentMod=system.Convert.ToInt32_Double(this.ModRange.get_Combined()/16383*100)},UpdateCurrentPan:function(){var value=this.Pan.get_Combined()/16383*1.570796326794895;this.CurrentPan.Left=js.Boot.__cast(Math.cos(value),Float),this.CurrentPan.Right=js.Boot.__cast(Math.sin(value),Float)},UpdateCurrentVolumeFromVolume:function(){this.CurrentVolume=this.Volume.get_Combined()/16383,this.CurrentVolume=this.CurrentVolume*this.CurrentVolume},UpdateCurrentVolumeFromExpression:function(){this.CurrentVolume=this.Expression.get_Combined()/16383,this.CurrentVolume=this.CurrentVolume*this.CurrentVolume},__class__:alphaTab.audio.synth.synthesis.SynthParameters},alphaTab.audio.synth.synthesis.CCValue=$hx_exports.alphaTab.audio.synth.synthesis.CCValue=function(){this._coarseValue=0,this._fineValue=0,this._combined=0},alphaTab.audio.synth.synthesis.CCValue.__name__=["alphaTab","audio","synth","synthesis","CCValue"],alphaTab.audio.synth.synthesis.CCValue.prototype={get_Coarse:function(){return this._coarseValue},set_Coarse:function(value){return this._coarseValue=value,this.UpdateCombined(),this.get_Coarse()},get_Fine:function(){return this._fineValue},set_Fine:function(value){return this._fineValue=value,this.UpdateCombined(),this.get_Fine()},get_Combined:function(){return this._combined},set_Combined:function(value){return this._combined=value,this.UpdateCoarseFinePair(),this.get_Combined()},CCValue_Byte_Byte:function(coarse,fine){return this._coarseValue=0,this._fineValue=0,this._combined=0,this._coarseValue=coarse,this._fineValue=fine,this._combined=0,this.UpdateCombined(),this},CCValue_Int16:function(combined){return this._coarseValue=0,this._fineValue=0,this._combined=0,this._coarseValue=0,this._fineValue=0,this._combined=combined,this.UpdateCoarseFinePair(),this},UpdateCombined:function(){this._combined=system.Convert.ToInt16(this._coarseValue<<7|this._fineValue)},UpdateCoarseFinePair:function(){this._coarseValue=system.Convert.ToUInt8(this._combined>>7),this._fineValue=system.Convert.ToUInt8(127&this._combined)},__class__:alphaTab.audio.synth.synthesis.CCValue},alphaTab.audio.synth.bank={},alphaTab.audio.synth.bank.components={},alphaTab.audio.synth.bank.components.PanComponent=$hx_exports.alphaTab.audio.synth.bank.components.PanComponent=function(){this.Left=0,this.Right=0},alphaTab.audio.synth.bank.components.PanComponent.__name__=["alphaTab","audio","synth","bank","components","PanComponent"],alphaTab.audio.synth.bank.components.PanComponent.prototype={SetValue:function(value,formula){value=alphaTab.audio.synth.util.SynthHelper.ClampF(value,-1,1);var dvalue;switch(formula){case 0:dvalue=1.570796326794895*(value+1)/2,this.Left=js.Boot.__cast(Math.cos(dvalue),Float),this.Right=js.Boot.__cast(Math.sin(dvalue),Float);break;case 1:this.Left=js.Boot.__cast(.5+-.5*value,Float),this.Right=js.Boot.__cast(.5+.5*value,Float);break;case 2:dvalue=1.570796326794895*(value+1)/2,this.Left=js.Boot.__cast(Math.cos(dvalue)/.707106781186,Float),this.Right=js.Boot.__cast(Math.sin(dvalue)/.707106781186,Float);break;default:throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid pan law selected."))}},__class__:alphaTab.audio.synth.bank.components.PanComponent},alphaTab.audio.synth.synthesis.VoiceManager=$hx_exports.alphaTab.audio.synth.synthesis.VoiceManager=function(voiceCount){this._voicePool=null,this._vNodes=null,this.Polyphony=0,this.FreeVoices=null,this.ActiveVoices=null,this.Registry=null,this.Polyphony=voiceCount;var this1=new Array(voiceCount);this._voicePool=this1,this._vNodes=new alphaTab.audio.synth.ds.LinkedList,this.FreeVoices=new alphaTab.audio.synth.ds.LinkedList,this.ActiveVoices=new alphaTab.audio.synth.ds.LinkedList;for(var i=0;i0){var voice=this.FreeVoices.First.Value;return this.FreeVoices.RemoveFirst(),voice}return this.StealQuietestVoice()},AddToRegistry:function(voice){var node=this._vNodes.RemoveLast();node.Value=voice,node.Next=this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note],this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note]=node},RemoveFromRegistry:function(channel,note){for(var node=this.Registry[channel][note];null!=node;)this._vNodes.AddLast(node),node=node.Next;this.Registry[channel][note]=null},RemoveVoiceFromRegistry:function(voice){var node=this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note];if(null!=node)if(node.Value==voice)this.Registry[voice.VoiceParams.Channel][voice.VoiceParams.Note]=node.Next,this._vNodes.AddLast(node);else{var node2=node;for(node=node.Next;null!=node;){if(node.Value==voice)return node2.Next=node.Next,void this._vNodes.AddLast(node);node2=node,node=node.Next}}},ClearRegistry:function(){for(var node=this.ActiveVoices.First;null!=node;){for(var vnode=this.Registry[node.Value.VoiceParams.Channel][node.Value.VoiceParams.Note];null!=vnode;)this._vNodes.AddLast(vnode),vnode=vnode.Next;this.Registry[node.Value.VoiceParams.Channel][node.Value.VoiceParams.Note]=null,node=node.get_Next()}},UnloadPatches:function(){for(var v=HxOverrides.iter(this._voicePool);v.hasNext();){v.next().Configure(0,0,0,null,null);for(var current=this._vNodes.First;null!=current;)current.Value.Value=null,current=current.get_Next()}},StealQuietestVoice:function(){for(var voiceVolume=1e3,quietest=null,node=this.ActiveVoices.First;null!=node;){if(2!=node.Value.VoiceParams.State){var volume=node.Value.VoiceParams.get_CombinedVolume();if(volume=generator.EndPhase?this.CurrentState=3:this.Phase>=generator.LoopEndPhase?(this.CurrentState=2,this.CurrentEnd=generator.EndPhase):this.Phase>=generator.LoopStartPhase?(this.CurrentState=1,this.CurrentEnd=generator.LoopEndPhase,this.CurrentStart=generator.LoopStartPhase):(this.CurrentState=0,this.CurrentEnd=generator.LoopStartPhase);break;default:this.CurrentEnd=generator.EndPhase,this.Phase>=this.CurrentEnd?this.CurrentState=3:this.CurrentState=2}},__class__:alphaTab.audio.synth.bank.components.generators.GeneratorParameters},alphaTab.audio.synth.bank.components.Envelope=$hx_exports.alphaTab.audio.synth.bank.components.Envelope=function(){this._stages=null,this._index=0,this._stage=null,this.Value=0,this.CurrentStage=0,this.Depth=0,this.Value=0,this.Depth=0;var this1=new Array(7);this._stages=this1;for(var x=0;xsamples)this._index=this._index+samples,samples=0;else{if(this._index=0,6!=this.CurrentStage)for(;this._stage=this._stages[0|++this.CurrentStage],0==this._stage.Time;);samples-=neededSamples}if(!(samples>0))break}var i=system.Convert.ToInt32_Double(this._stage.Graph.length*(this._index/js.Boot.__cast(this._stage.Time,Float)));if(this._stage.Reverse){this.Value=(1-this._stage.Graph[i])*this._stage.Scale+this._stage.Offset}else this.Value=this._stage.Graph[i]*this._stage.Scale+this._stage.Offset},Release:function(lowerLimit){this.Value<=lowerLimit?(this._index=0,this.CurrentStage=6,this._stage=this._stages[this.CurrentStage]):this.CurrentStage<5&&(this._index=0,this.CurrentStage=5,this._stage=this._stages[this.CurrentStage],this._stage.Scale=this.Value)},ReleaseSf2VolumeEnvelope:function(){this.Value<=-100?(this._index=0,this.CurrentStage=6,this._stage=this._stages[this.CurrentStage]):this.CurrentStage<5&&(this._index=0,this.CurrentStage=5,this._stage=this._stages[this.CurrentStage],this._stage.Offset=-100,this._stage.Scale=100+this.Value)},__class__:alphaTab.audio.synth.bank.components.Envelope},alphaTab.audio.synth.bank.components.EnvelopeStage=$hx_exports.alphaTab.audio.synth.bank.components.EnvelopeStage=function(){this.Time=0,this.Graph=null,this.Scale=0,this.Offset=0,this.Reverse=!1,this.Time=0,this.Graph=null,this.Scale=0,this.Offset=0,this.Reverse=!1},alphaTab.audio.synth.bank.components.EnvelopeStage.__name__=["alphaTab","audio","synth","bank","components","EnvelopeStage"],alphaTab.audio.synth.bank.components.EnvelopeStage.prototype={__class__:alphaTab.audio.synth.bank.components.EnvelopeStage},alphaTab.audio.synth.util.Tables=$hx_exports.alphaTab.audio.synth.util.Tables=function(){},alphaTab.audio.synth.util.Tables.__name__=["alphaTab","audio","synth","util","Tables"],alphaTab.audio.synth.util.Tables.EnvelopeTables=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._envelopeTables[index]},alphaTab.audio.synth.util.Tables.SemitoneTable=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._semitoneTable[index]},alphaTab.audio.synth.util.Tables.CentTable=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._centTable[index]},alphaTab.audio.synth.util.Tables.SincTable=function(index){return alphaTab.audio.synth.util.Tables._isInitialized||alphaTab.audio.synth.util.Tables.Init(),alphaTab.audio.synth.util.Tables._sincTable[index]},alphaTab.audio.synth.util.Tables.Init=function(){var this1=new Array(4);alphaTab.audio.synth.util.Tables._envelopeTables=this1,alphaTab.audio.synth.util.Tables._envelopeTables[0]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateSustainTable(64)),alphaTab.audio.synth.util.Tables._envelopeTables[1]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateLinearTable(64)),alphaTab.audio.synth.util.Tables._envelopeTables[2]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateExponentialTable(64,.09)),alphaTab.audio.synth.util.Tables._envelopeTables[3]=alphaTab.audio.synth.util.Tables.RemoveDenormals(alphaTab.audio.synth.util.Tables.CreateSineTable(64)),alphaTab.audio.synth.util.Tables._centTable=alphaTab.audio.synth.util.Tables.CreateCentTable(),alphaTab.audio.synth.util.Tables._semitoneTable=alphaTab.audio.synth.util.Tables.CreateSemitoneTable(),alphaTab.audio.synth.util.Tables._sincTable=alphaTab.audio.synth.util.Tables.CreateSincTable(16,64,.43,alphaTab.audio.synth.util.Tables.HammingWindow),alphaTab.audio.synth.util.Tables._isInitialized=!0},alphaTab.audio.synth.util.Tables.CreateSquareTable=function(size,k){for(var squaretable=new Float32Array(size),inc=1/size,phase=0,x=0;x1e-5?Math.sin(sinc)/sinc:1;table[64*x+y]=js.Boot.__cast(gain*sinc*windowFunction(a,windowSize),Float),++y}++x}return table},alphaTab.audio.synth.util.Tables.prototype={__class__:alphaTab.audio.synth.util.Tables},alphaTab.audio.synth.bank.components.Filter=$hx_exports.alphaTab.audio.synth.bank.components.Filter=function(){this._a1=0,this._a2=0,this._b1=0,this._b2=0,this._m1=0,this._m2=0,this._m3=0,this._cutOff=0,this._resonance=0,this.FilterMethod=0,this.CoeffNeedsUpdating=!1,this._a1=0,this._a2=0,this._b1=0,this._b2=0,this._m1=0,this._m2=0,this._m3=0,this.FilterMethod=0,this.set_CutOff(0),this.set_Resonance(0)},alphaTab.audio.synth.bank.components.Filter.__name__=["alphaTab","audio","synth","bank","components","Filter"],alphaTab.audio.synth.bank.components.Filter.prototype={get_CutOff:function(){return this._cutOff},set_CutOff:function(value){return this._cutOff=value,this.CoeffNeedsUpdating=!0,this.get_CutOff()},get_Resonance:function(){return this._resonance},set_Resonance:function(value){return this._resonance=value,this.CoeffNeedsUpdating=!0,this.get_Resonance()},get_Enabled:function(){return 0!=this.FilterMethod},Disable:function(){this.FilterMethod=0},QuickSetup:function(sampleRate,note,velocity,filterInfo){this.CoeffNeedsUpdating=!1;var this1=filterInfo.CutOff;this.set_CutOff(this1);var this2=filterInfo.Resonance;this.set_Resonance(this2),this.FilterMethod=filterInfo.FilterMethod,this._a1=0,this._a2=0,this._b1=0,this._b2=0,this._m1=0,this._m2=0,this._m3=0,(this.get_CutOff()<=0||this.get_Resonance()<=0)&&(this.FilterMethod=0),0!=this.FilterMethod&&(this.set_CutOff(this.get_CutOff()*alphaTab.audio.synth.util.SynthHelper.CentsToPitch((note-filterInfo.RootKey)*filterInfo.KeyTrack+system.Convert.ToInt32_Single(velocity*filterInfo.VelTrack))),this.UpdateCoefficients(sampleRate))},ApplyFilter_Single:function(sample){switch(this.FilterMethod){case 1:case 2:return this._m3=sample-this._a1*this._m1-this._a2*this._m2,sample=this._b2*(this._m3+this._m2)+this._b1*this._m1,this._m2=this._m1,this._m1=this._m3,sample;case 3:return this._m1=this._m1+this._a1*(sample-this._m1),this._m1;default:return 0}},ApplyFilter_SampleArray:function(data){switch(this.FilterMethod){case 1:case 2:for(var x=0;x=this._generator.LoopEndPhase;)this._phase=this._generator.LoopStartPhase+(this._phase-this._generator.LoopEndPhase)%(this._generator.LoopEndPhase-this._generator.LoopStartPhase);var this2=this._generator.GetValue(this._phase);this.Value=this2}},Reset:function(){if(this.Value=0,this._delayTime>0){var this1=this._delayTime;this._phase=this1,this.CurrentState=0}else this._phase=0,this.CurrentState=1},__class__:alphaTab.audio.synth.bank.components.Lfo},alphaTab.audio.synth.bank.descriptors={},alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor=$hx_exports.alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor=function(){this.LoopMethod=0,this.SamplerType=0,this.AssetName=null,this.EndPhase=0,this.StartPhase=0,this.LoopEndPhase=0,this.LoopStartPhase=0,this.Offset=0,this.Period=0,this.RootKey=0,this.KeyTrack=0,this.VelTrack=0,this.Tune=0,this.LoopMethod=0,this.SamplerType=0,this.AssetName="null",this.EndPhase=-1,this.StartPhase=-1,this.LoopEndPhase=-1,this.LoopStartPhase=-1,this.Offset=0,this.Period=-1,this.RootKey=-1,this.KeyTrack=100,this.VelTrack=0,this.Tune=0},alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor.__name__=["alphaTab","audio","synth","bank","descriptors","GeneratorDescriptor"],alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor.prototype={__class__:alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor},alphaTab.audio.synth.bank.components.generators.Generator=$hx_exports.alphaTab.audio.synth.bank.components.generators.Generator=function(description){this.LoopMode=0,this.LoopStartPhase=0,this.LoopEndPhase=0,this.StartPhase=0,this.EndPhase=0,this.Offset=0,this.Period=0,this.Frequency=0,this.RootKey=0,this.KeyTrack=0,this.VelocityTrack=0,this.Tune=0,this.LoopMode=description.LoopMethod,this.LoopStartPhase=description.LoopStartPhase,this.LoopEndPhase=description.LoopEndPhase,this.StartPhase=description.StartPhase,this.EndPhase=description.EndPhase,this.Offset=description.Offset,this.Period=description.Period,this.Frequency=0,this.RootKey=description.RootKey,this.KeyTrack=description.KeyTrack,this.VelocityTrack=description.VelTrack,this.Tune=description.Tune},alphaTab.audio.synth.bank.components.generators.Generator.__name__=["alphaTab","audio","synth","bank","components","generators","Generator"],alphaTab.audio.synth.bank.components.generators.Generator.prototype={Release:function(generatorParams){3==this.LoopMode&&(generatorParams.CurrentState=2,generatorParams.CurrentStart=this.StartPhase,generatorParams.CurrentEnd=this.EndPhase)},GetValue:function(phase){throw new js._Boot.HaxeError("abstract")},GetValues:function(generatorParams,blockBuffer,increment){for(var proccessed=0;;){var samplesAvailable=system.Convert.ToInt32_Double(Math.ceil((generatorParams.CurrentEnd-generatorParams.Phase)/increment));if(samplesAvailable>blockBuffer.length-proccessed)for(;proccessed0?1:0},__class__:alphaTab.audio.synth.bank.components.generators.SquareGenerator}),alphaTab.audio.synth.bank.components.generators.TriangleGenerator=$hx_exports.alphaTab.audio.synth.bank.components.generators.TriangleGenerator=function(description){alphaTab.audio.synth.bank.components.generators.Generator.call(this,description),this.EndPhase<0&&(this.EndPhase=1.25),this.StartPhase<0&&(this.StartPhase=.25),this.LoopEndPhase<0&&(this.LoopEndPhase=this.EndPhase),this.LoopStartPhase<0&&(this.LoopStartPhase=this.StartPhase),this.Period<0&&(this.Period=1),this.RootKey<0&&(this.RootKey=69),this.Frequency=440},alphaTab.audio.synth.bank.components.generators.TriangleGenerator.__name__=["alphaTab","audio","synth","bank","components","generators","TriangleGenerator"],alphaTab.audio.synth.bank.components.generators.TriangleGenerator.__super__=alphaTab.audio.synth.bank.components.generators.Generator,alphaTab.audio.synth.bank.components.generators.TriangleGenerator.prototype=$extend(alphaTab.audio.synth.bank.components.generators.Generator.prototype,{GetValue:function(phase){return js.Boot.__cast(4*Math.abs(phase-Math.floor(phase+.5))-1,Float)},__class__:alphaTab.audio.synth.bank.components.generators.TriangleGenerator}),alphaTab.audio.synth.bank.components.generators.DefaultGenerators=$hx_exports.alphaTab.audio.synth.bank.components.generators.DefaultGenerators=function(){},alphaTab.audio.synth.bank.components.generators.DefaultGenerators.__name__=["alphaTab","audio","synth","bank","components","generators","DefaultGenerators"],alphaTab.audio.synth.bank.components.generators.DefaultGenerators.prototype={__class__:alphaTab.audio.synth.bank.components.generators.DefaultGenerators},alphaTab.audio.synth.synthesis.VoiceNode=$hx_exports.alphaTab.audio.synth.synthesis.VoiceNode=function(){this.Value=null,this.Next=null},alphaTab.audio.synth.synthesis.VoiceNode.__name__=["alphaTab","audio","synth","synthesis","VoiceNode"],alphaTab.audio.synth.synthesis.VoiceNode.prototype={__class__:alphaTab.audio.synth.synthesis.VoiceNode},alphaTab.audio.synth.MidiFileSequencer=$hx_exports.alphaTab.audio.synth.MidiFileSequencer=function(synthesizer){this._synthesizer=null,this._tempoChanges=null,this._firstProgramEventPerChannel=null,this._synthData=null,this._division=0,this._eventIndex=0,this._currentTime=0,this._playbackRange=null,this._playbackRangeStartTime=0,this._playbackRangeEndTime=0,this._endTime=0,this.IsLooping=!1,this.EndTick=0,this.PlaybackSpeed=0,this._synthesizer=synthesizer;this._firstProgramEventPerChannel={};this._tempoChanges=[],this.PlaybackSpeed=1},alphaTab.audio.synth.MidiFileSequencer.__name__=["alphaTab","audio","synth","MidiFileSequencer"],alphaTab.audio.synth.MidiFileSequencer.prototype={get_PlaybackRange:function(){return this._playbackRange},set_PlaybackRange:function(value){return this._playbackRange=value,null!=value&&(this._playbackRangeStartTime=this.TickPositionToTimePositionWithSpeed(value.StartTick,1),this._playbackRangeEndTime=this.TickPositionToTimePositionWithSpeed(value.EndTick,1)),this.get_PlaybackRange()},get_EndTime:function(){return this._endTime/this.PlaybackSpeed},Seek:function(timePosition){timePosition*=this.PlaybackSpeed,null!=this.get_PlaybackRange()&&(timePositionthis._playbackRangeEndTime&&(timePosition=this._playbackRangeEndTime)),(timePosition-=25)<0&&(timePosition=0),timePosition>this._currentTime?this.SilentProcess(timePosition-this._currentTime):timePosition0)for(;metronomeTickb.Time?1:a.Time0&&maxMilliseconds=this._endTime)this._currentTime=0,this._eventIndex=0,this._synthesizer.NoteOffAll(!0),this._synthesizer.ResetPrograms(),this._synthesizer.ResetSynthControls(),this.OnFinished();else if(null!=this.get_PlaybackRange()&&this._currentTime>=this._playbackRangeEndTime){var this1=this.get_PlaybackRange().StartTick;this._currentTime=this1,this._eventIndex=0,this._synthesizer.NoteOffAll(!0),this._synthesizer.ResetPrograms(),this._synthesizer.ResetSynthControls(),this.OnFinished()}},SetChannelProgram:function(channel,program){this._firstProgramEventPerChannel.hasOwnProperty(channel)&&this._firstProgramEventPerChannel[channel].Event.set_Data1(program)},__class__:alphaTab.audio.synth.MidiFileSequencer},alphaTab.rendering={},alphaTab.rendering.layout={},alphaTab.rendering.layout.ScoreLayout=$hx_exports.alphaTab.rendering.layout.ScoreLayout=function(renderer){this._barRendererLookup=null,this.Renderer=null,this.Width=0,this.Height=0,this.ScoreInfoGlyphs=null,this.TuningGlyph=null,this.FirstBarIndex=0,this.LastBarIndex=0,this.Renderer=renderer;this._barRendererLookup={}},alphaTab.rendering.layout.ScoreLayout.__name__=["alphaTab","rendering","layout","ScoreLayout"],alphaTab.rendering.layout.ScoreLayout.prototype={get_Name:function(){throw new js._Boot.HaxeError("abstract")},get_SupportsResize:function(){throw new js._Boot.HaxeError("abstract")},Resize:function(){throw new js._Boot.HaxeError("abstract")},LayoutAndRender:function(){var score=this.Renderer.Score,startIndex=this.Renderer.Settings.Layout.Get("start",1);--startIndex,startIndex=Math.min(score.MasterBars.length-1,Math.max(0,startIndex)),this.FirstBarIndex=startIndex;var endBarIndex=this.Renderer.Settings.Layout.Get("count",score.MasterBars.length);endBarIndex<0&&(endBarIndex=score.MasterBars.length),endBarIndex=startIndex+endBarIndex-1,endBarIndex=Math.min(score.MasterBars.length-1,Math.max(0,endBarIndex)),this.LastBarIndex=endBarIndex,this.CreateScoreInfoGlyphs(),this.DoLayoutAndRender()},DoLayoutAndRender:function(){throw new js._Boot.HaxeError("abstract")},CreateScoreInfoGlyphs:function(){alphaTab.util.Logger.Info("ScoreLayout","Creating score info glyphs",null);var flags=this.Renderer.Settings.Layout.Get("hideInfo",!1)?0:511,score=this.Renderer.Score,res=this.Renderer.RenderingResources;this.ScoreInfoGlyphs={};var s=score.Title;null!=s&&0!=s.length&&0!=(1&flags)&&(this.ScoreInfoGlyphs[1]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.Title,res.TitleFont,1));var s1=score.SubTitle;null!=s1&&0!=s1.length&&0!=(2&flags)&&(this.ScoreInfoGlyphs[2]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.SubTitle,res.SubTitleFont,1));var s2=score.Artist;null!=s2&&0!=s2.length&&0!=(4&flags)&&(this.ScoreInfoGlyphs[4]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.Artist,res.SubTitleFont,1));var s3=score.Album;null!=s3&&0!=s3.length&&0!=(8&flags)&&(this.ScoreInfoGlyphs[8]=new alphaTab.rendering.glyphs.TextGlyph(0,0,score.Album,res.SubTitleFont,1));var s4=score.Music;if(!!(null!=s4&&0!=s4.length&&score.Music==score.Words)&&0!=(64&flags))this.ScoreInfoGlyphs[64]=new alphaTab.rendering.glyphs.TextGlyph(0,0,"Music and Words by "+score.Words,res.WordsFont,1);else{var s5=score.Music;null!=s5&&0!=s5.length&&0!=(32&flags)&&(this.ScoreInfoGlyphs[32]=new alphaTab.rendering.glyphs.TextGlyph(0,0,"Music by "+score.Music,res.WordsFont,2));var s6=score.Words;null!=s6&&0!=s6.length&&0!=(16&flags)&&(this.ScoreInfoGlyphs[16]=new alphaTab.rendering.glyphs.TextGlyph(0,0,"Words by "+score.Words,res.WordsFont,0))}if(!this.Renderer.Settings.Layout.Get("hideTuning",!1)){for(var staffWithTuning=null,track=HxOverrides.iter(this.Renderer.Tracks);track.hasNext();){for(var staff=$iterator(track.next().Staves)();staff.hasNext();){var staff1=staff.next();if(2!=staff1.StaffKind&&staff1.get_IsStringed()&&staff1.Tuning.length>0){staffWithTuning=staff1;break}}if(null!=staffWithTuning)break}if(null!=staffWithTuning){var tuning=alphaTab.model.Tuning.FindTuning(staffWithTuning.Tuning);null!=tuning&&(this.TuningGlyph=new alphaTab.rendering.glyphs.TuningGlyph(0,0,this.get_Scale(),this.Renderer.RenderingResources,tuning))}}},get_Scale:function(){return this.Renderer.Settings.Scale},CreateEmptyStaveGroup:function(){var group=new alphaTab.rendering.staves.StaveGroup;group.Layout=this;for(var trackIndex=0;trackIndex1;)renderers=group1.RevertLastBar(),--currentIndex;group1.IsFull=!0,group1.IsLast=this.LastBarIndex==group1.get_LastBarIndex(),this._groups.push(group1),this.FitGroup(group1),group1.FinalizeGroup(),y+=this.PaintGroup(group1,oldHeight,canvas),(group1=this.CreateEmptyStaveGroup()).Index=this._groups.length,group1.X=x,group1.Y=y}}group1.IsLast=this.LastBarIndex==group1.get_LastBarIndex(),this.FitGroup(group1),group1.FinalizeGroup(),y+=this.PaintGroup(group1,oldHeight,canvas)}return y},LayoutAndRenderScore:function(x,y){var canvas=this.Renderer.Canvas,currentBarIndex=this.FirstBarIndex,endBarIndex=this.LastBarIndex;for(this._groups=[];currentBarIndex<=endBarIndex;){var group=this.CreateStaveGroup(currentBarIndex,endBarIndex);this._groups.push(group),group.X=x,group.Y=y,currentBarIndex=group.get_LastBarIndex()+1,this.FitGroup(group),group.FinalizeGroup(),alphaTab.util.Logger.Info(this.get_Name(),"Rendering partial from bar "+group.get_FirstBarIndex()+" to "+group.get_LastBarIndex(),null),y+=this.PaintGroup(group,y,canvas)}return y},PaintGroup:function(group,totalHeight,canvas){var height=group.get_Height()+20*this.get_Scale();canvas.BeginRender(this.Width,height),this.Renderer.Canvas.set_Color(this.Renderer.RenderingResources.MainGlyphColor),this.Renderer.Canvas.set_TextAlign(0),group.Paint(0,-group.Y,canvas),totalHeight+=height;var result=canvas.EndRender(),args=new alphaTab.rendering.RenderFinishedEventArgs;return args.TotalWidth=this.Width,args.TotalHeight=totalHeight,args.Width=this.Width,args.Height=height,args.RenderResult=result,args.FirstMasterBarIndex=group.get_FirstBarIndex(),args.LastMasterBarIndex=group.get_LastBarIndex(),this.Renderer.OnPartialRenderFinished(args),height},FitGroup:function(group){(group.IsFull||group.Width>this.get_MaxWidth())&&group.ScaleToWidth(this.get_MaxWidth()),this.Width=Math.max(this.Width,group.Width)},CreateStaveGroup:function(currentBarIndex,endIndex){var group=this.CreateEmptyStaveGroup();group.Index=this._groups.length;for(var barsPerRow=this.Renderer.Settings.Layout.Get("barsPerRow",-1),maxWidth=this.get_MaxWidth(),end=endIndex+1,i=currentBarIndex;i0)for(var renderer=$iterator(this._barsFromPreviousGroup)();renderer.hasNext();){var renderer1=renderer.next();group.AddMasterBarRenderers(this.Renderer.Tracks,renderer1),i=renderer1.MasterBar.Index}else{var renderers=group.AddBars(this.Renderer.Tracks,i);this._allMasterBarRenderers.push(renderers)}this._barsFromPreviousGroup=[];var groupIsFull=!1;if(-1==barsPerRow&&group.Width>=maxWidth&&0!=group.MasterBarsRenderers.length?groupIsFull=!0:group.MasterBarsRenderers.length==barsPerRow+1&&(groupIsFull=!0),groupIsFull){var reverted=group.RevertLastBar();if(null!=reverted)for(this._barsFromPreviousGroup.push(reverted);null!=reverted&&!reverted.CanWrap&&group.MasterBarsRenderers.length>1;)reverted=group.RevertLastBar(),this._barsFromPreviousGroup.push(reverted);return group.IsFull=!0,group.IsLast=!1,this._barsFromPreviousGroup.reverse(),group}group.X=0,++i}return group.IsLast=endIndex==group.get_LastBarIndex(),group},get_MaxWidth:function(){return this.Renderer.Settings.Width-this._pagePadding[0]-this._pagePadding[2]},__class__:alphaTab.rendering.layout.PageViewLayout}),alphaTab.rendering.layout.HorizontalScreenLayout=$hx_exports.alphaTab.rendering.layout.HorizontalScreenLayout=function(renderer){alphaTab.rendering.layout.ScoreLayout.call(this,renderer),this._group=null,this._pagePadding=null},alphaTab.rendering.layout.HorizontalScreenLayout.__name__=["alphaTab","rendering","layout","HorizontalScreenLayout"],alphaTab.rendering.layout.HorizontalScreenLayout.__super__=alphaTab.rendering.layout.ScoreLayout,alphaTab.rendering.layout.HorizontalScreenLayout.prototype=$extend(alphaTab.rendering.layout.ScoreLayout.prototype,{get_Name:function(){return"HorizontalScreen"},get_SupportsResize:function(){return!1},Resize:function(){},DoLayoutAndRender:function(){this._pagePadding=this.Renderer.Settings.Layout.Get("padding",alphaTab.rendering.layout.HorizontalScreenLayout.PagePadding),1==this._pagePadding.length?this._pagePadding=new Float32Array([this._pagePadding[0],this._pagePadding[0],this._pagePadding[0],this._pagePadding[0]]):2==this._pagePadding.length&&(this._pagePadding=new Float32Array([this._pagePadding[0],this._pagePadding[1],this._pagePadding[0],this._pagePadding[1]]));var score=this.Renderer.Score,canvas=this.Renderer.Canvas,startIndex=this.Renderer.Settings.Layout.Get("start",1);--startIndex;var currentBarIndex=startIndex=Math.min(score.MasterBars.length-1,Math.max(0,startIndex)),endBarIndex=this.Renderer.Settings.Layout.Get("count",score.MasterBars.length);endBarIndex<0&&(endBarIndex=score.MasterBars.length),endBarIndex=startIndex+endBarIndex-1,endBarIndex=Math.min(score.MasterBars.length-1,Math.max(0,endBarIndex)),this._group=this.CreateEmptyStaveGroup(),this._group.IsLast=!0,this._group.X=this._pagePadding[0],this._group.Y=this._pagePadding[1];for(var countPerPartial=this.Renderer.Settings.Layout.Get("countPerPartial",10),partials=[],currentPartial=new alphaTab.rendering.layout.HorizontalScreenLayoutPartialInfo;currentBarIndex<=endBarIndex;){var result=this._group.AddBars(this.Renderer.Tracks,currentBarIndex);if(0==currentPartial.MasterBars.length&&result.IsLinkedToPrevious&&partials.length>0){var previousPartial=partials[partials.length-1];previousPartial.MasterBars.push(score.MasterBars[currentBarIndex]),previousPartial.Width=previousPartial.Width+result.Width}else currentPartial.MasterBars.push(score.MasterBars[currentBarIndex]),currentPartial.Width=currentPartial.Width+result.Width,currentPartial.MasterBars.length>=countPerPartial&&(0==partials.length&&(currentPartial.Width=currentPartial.Width+(this._group.X+this._group.AccoladeSpacing)),partials.push(currentPartial),alphaTab.util.Logger.Info(this.get_Name(),"Finished partial from bar "+currentPartial.MasterBars[0].Index+" to "+currentPartial.MasterBars[currentPartial.MasterBars.length-1].Index,null),currentPartial=new alphaTab.rendering.layout.HorizontalScreenLayoutPartialInfo);++currentBarIndex}currentPartial.MasterBars.length>0&&(0==partials.length&&(currentPartial.Width=currentPartial.Width+(this._group.X+this._group.AccoladeSpacing)),partials.push(currentPartial),alphaTab.util.Logger.Info(this.get_Name(),"Finished partial from bar "+currentPartial.MasterBars[0].Index+" to "+currentPartial.MasterBars[currentPartial.MasterBars.length-1].Index,null)),this._group.FinalizeGroup(),this.Height=this._group.Y+this._group.get_Height()+this._pagePadding[3],this.Width=this._group.X+this._group.Width+this._pagePadding[2],currentBarIndex=0;for(var i=0;i0&&beat.Voice.Bar.get_MasterBar().TripletFeel!=beat.Voice.Bar.get_MasterBar().PreviousMasterBar.TripletFeel)},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TripletFeelGlyph(beat.Voice.Bar.get_MasterBar().TripletFeel)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.TripletFeelEffectInfo},alphaTab.rendering.effects.MarkerEffectInfo=$hx_exports.alphaTab.rendering.effects.MarkerEffectInfo=function(){},alphaTab.rendering.effects.MarkerEffectInfo.__name__=["alphaTab","rendering","effects","MarkerEffectInfo"],alphaTab.rendering.effects.MarkerEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.MarkerEffectInfo.prototype={get_EffectId:function(){return"marker"},get_HideOnMultiTrack:function(){return!0},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 0},ShouldCreateGlyph:function(settings,beat){return 0==beat.Voice.Bar.Staff.Index&&0==beat.Voice.Index&&0==beat.Index&&beat.Voice.Bar.get_MasterBar().get_IsSectionStart()},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TextGlyph(0,0,beat.Voice.Bar.get_MasterBar().Section.Text,renderer.get_Resources().MarkerFont,0)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.MarkerEffectInfo},alphaTab.rendering.effects.TextEffectInfo=$hx_exports.alphaTab.rendering.effects.TextEffectInfo=function(){},alphaTab.rendering.effects.TextEffectInfo.__name__=["alphaTab","rendering","effects","TextEffectInfo"],alphaTab.rendering.effects.TextEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.TextEffectInfo.prototype={get_EffectId:function(){return"text"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){var s=beat.Text;return!(null==s||0==StringTools.trim(s).length)},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TextGlyph(0,0,beat.Text,renderer.get_Resources().EffectFont,0)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.TextEffectInfo},alphaTab.rendering.effects.ChordsEffectInfo=$hx_exports.alphaTab.rendering.effects.ChordsEffectInfo=function(){},alphaTab.rendering.effects.ChordsEffectInfo.__name__=["alphaTab","rendering","effects","ChordsEffectInfo"],alphaTab.rendering.effects.ChordsEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.ChordsEffectInfo.prototype={get_EffectId:function(){return"chords"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){return beat.get_HasChord()},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TextGlyph(0,0,beat.get_Chord().Name,renderer.get_Resources().EffectFont,1)},CanExpand:function(from,to){return!1},__class__:alphaTab.rendering.effects.ChordsEffectInfo},alphaTab.rendering.effects.FermataEffectInfo=$hx_exports.alphaTab.rendering.effects.FermataEffectInfo=function(){},alphaTab.rendering.effects.FermataEffectInfo.__name__=["alphaTab","rendering","effects","FermataEffectInfo"],alphaTab.rendering.effects.FermataEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.FermataEffectInfo.prototype={get_EffectId:function(){return"fermata"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){return null!=beat.Fermata},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.FermataGlyph(0,0,beat.Fermata.Type)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.FermataEffectInfo},alphaTab.rendering.effects.WhammyBarEffectInfo=$hx_exports.alphaTab.rendering.effects.WhammyBarEffectInfo=function(){},alphaTab.rendering.effects.WhammyBarEffectInfo.__name__=["alphaTab","rendering","effects","WhammyBarEffectInfo"],alphaTab.rendering.effects.WhammyBarEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.WhammyBarEffectInfo.prototype={get_EffectId:function(){return"whammy"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 4},ShouldCreateGlyph:function(settings,beat){return beat.get_HasWhammyBar()},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.LineRangedGlyph("w/bar")},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.WhammyBarEffectInfo},alphaTab.rendering.effects.NoteEffectInfoBase=$hx_exports.alphaTab.rendering.effects.NoteEffectInfoBase=function(){this.LastCreateInfo=null},alphaTab.rendering.effects.NoteEffectInfoBase.__name__=["alphaTab","rendering","effects","NoteEffectInfoBase"],alphaTab.rendering.effects.NoteEffectInfoBase.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.NoteEffectInfoBase.prototype={ShouldCreateGlyph:function(settings,beat){this.LastCreateInfo=[];for(var i=0,j=beat.Notes.length;i0},ShouldCreateGlyphForNote:function(note){throw new js._Boot.HaxeError("abstract")},get_EffectId:function(){throw new js._Boot.HaxeError("abstract")},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){throw new js._Boot.HaxeError("abstract")},CreateNewGlyph:function(renderer,beat){throw new js._Boot.HaxeError("abstract")},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.NoteEffectInfoBase},alphaTab.rendering.effects.TrillEffectInfo=$hx_exports.alphaTab.rendering.effects.TrillEffectInfo=function(){alphaTab.rendering.effects.NoteEffectInfoBase.call(this)},alphaTab.rendering.effects.TrillEffectInfo.__name__=["alphaTab","rendering","effects","TrillEffectInfo"],alphaTab.rendering.effects.TrillEffectInfo.__super__=alphaTab.rendering.effects.NoteEffectInfoBase,alphaTab.rendering.effects.TrillEffectInfo.prototype=$extend(alphaTab.rendering.effects.NoteEffectInfoBase.prototype,{get_EffectId:function(){return"trill"},ShouldCreateGlyphForNote:function(note){return note.get_IsTrill()},get_SizingMode:function(){return 1},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.TrillGlyph(0,0)},__class__:alphaTab.rendering.effects.TrillEffectInfo}),alphaTab.rendering.effects.OttaviaEffectInfo=$hx_exports.alphaTab.rendering.effects.OttaviaEffectInfo=function(aboveStaff){this._aboveStaff=!1,this._aboveStaff=aboveStaff},alphaTab.rendering.effects.OttaviaEffectInfo.__name__=["alphaTab","rendering","effects","OttaviaEffectInfo"],alphaTab.rendering.effects.OttaviaEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.OttaviaEffectInfo.prototype={get_EffectId:function(){return"ottavia-"+(this._aboveStaff?"above":"below")},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 4},ShouldCreateGlyph:function(settings,beat){switch(beat.Ottava){case 0:case 1:return this._aboveStaff;case 3:case 4:return!this._aboveStaff}return!1},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.OttavaGlyph(beat.Ottava,this._aboveStaff)},CanExpand:function(from,to){return from.Ottava==to.Ottava},__class__:alphaTab.rendering.effects.OttaviaEffectInfo},alphaTab.rendering.effects.WideBeatVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.WideBeatVibratoEffectInfo=function(){},alphaTab.rendering.effects.WideBeatVibratoEffectInfo.__name__=["alphaTab","rendering","effects","WideBeatVibratoEffectInfo"],alphaTab.rendering.effects.WideBeatVibratoEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.WideBeatVibratoEffectInfo.prototype={get_EffectId:function(){return"wide-beat-vibrato"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 5},ShouldCreateGlyph:function(settings,beat){return 2==beat.Vibrato},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.BeatVibratoGlyph(2)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.WideBeatVibratoEffectInfo},alphaTab.rendering.effects.SlightBeatVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.SlightBeatVibratoEffectInfo=function(){},alphaTab.rendering.effects.SlightBeatVibratoEffectInfo.__name__=["alphaTab","rendering","effects","SlightBeatVibratoEffectInfo"],alphaTab.rendering.effects.SlightBeatVibratoEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.SlightBeatVibratoEffectInfo.prototype={get_EffectId:function(){return"slight-beat-vibrato"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 5},ShouldCreateGlyph:function(settings,beat){return 1==beat.Vibrato},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.BeatVibratoGlyph(1)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.SlightBeatVibratoEffectInfo},alphaTab.rendering.effects.WideNoteVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.WideNoteVibratoEffectInfo=function(){alphaTab.rendering.effects.NoteEffectInfoBase.call(this)},alphaTab.rendering.effects.WideNoteVibratoEffectInfo.__name__=["alphaTab","rendering","effects","WideNoteVibratoEffectInfo"],alphaTab.rendering.effects.WideNoteVibratoEffectInfo.__super__=alphaTab.rendering.effects.NoteEffectInfoBase,alphaTab.rendering.effects.WideNoteVibratoEffectInfo.prototype=$extend(alphaTab.rendering.effects.NoteEffectInfoBase.prototype,{get_EffectId:function(){return"wide-note-vibrato"},ShouldCreateGlyphForNote:function(note){return 2==note.Vibrato||!!note.IsTieDestination&&2==note.TieOrigin.Vibrato},get_SizingMode:function(){return 5},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,2,1.2)},__class__:alphaTab.rendering.effects.WideNoteVibratoEffectInfo}),alphaTab.rendering.effects.SlightNoteVibratoEffectInfo=$hx_exports.alphaTab.rendering.effects.SlightNoteVibratoEffectInfo=function(){alphaTab.rendering.effects.NoteEffectInfoBase.call(this)},alphaTab.rendering.effects.SlightNoteVibratoEffectInfo.__name__=["alphaTab","rendering","effects","SlightNoteVibratoEffectInfo"],alphaTab.rendering.effects.SlightNoteVibratoEffectInfo.__super__=alphaTab.rendering.effects.NoteEffectInfoBase,alphaTab.rendering.effects.SlightNoteVibratoEffectInfo.prototype=$extend(alphaTab.rendering.effects.NoteEffectInfoBase.prototype,{get_EffectId:function(){return"slight-note-vibrato"},ShouldCreateGlyphForNote:function(note){return 1==note.Vibrato||!!note.IsTieDestination&&1==note.TieOrigin.Vibrato},get_SizingMode:function(){return 5},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2)},__class__:alphaTab.rendering.effects.SlightNoteVibratoEffectInfo}),alphaTab.rendering.effects.AlternateEndingsEffectInfo=$hx_exports.alphaTab.rendering.effects.AlternateEndingsEffectInfo=function(){},alphaTab.rendering.effects.AlternateEndingsEffectInfo.__name__=["alphaTab","rendering","effects","AlternateEndingsEffectInfo"],alphaTab.rendering.effects.AlternateEndingsEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.AlternateEndingsEffectInfo.prototype={get_EffectId:function(){return"alternate-feel"},get_HideOnMultiTrack:function(){return!0},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 6},ShouldCreateGlyph:function(settings,beat){return 0==beat.Index&&0!=beat.Voice.Bar.get_MasterBar().AlternateEndings},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.AlternateEndingsGlyph(0,0,beat.Voice.Bar.get_MasterBar().AlternateEndings)},CanExpand:function(from,to){return!0},__class__:alphaTab.rendering.effects.AlternateEndingsEffectInfo},alphaTab.rendering.BarRendererFactory=$hx_exports.alphaTab.rendering.BarRendererFactory=function(){this.IsInAccolade=!1,this.HideOnMultiTrack=!1,this.HideOnPercussionTrack=!1,this.IsInAccolade=!0,this.HideOnPercussionTrack=!1,this.HideOnMultiTrack=!1},alphaTab.rendering.BarRendererFactory.__name__=["alphaTab","rendering","BarRendererFactory"],alphaTab.rendering.BarRendererFactory.prototype={get_StaffId:function(){throw new js._Boot.HaxeError("abstract")},CanCreate:function(track,staff){return!this.HideOnPercussionTrack||2!=staff.StaffKind},Create:function(renderer,bar,staveSettings){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.rendering.BarRendererFactory},alphaTab.rendering.EffectBarRendererFactory=$hx_exports.alphaTab.rendering.EffectBarRendererFactory=function(staffId,infos){alphaTab.rendering.BarRendererFactory.call(this),this._infos=null,this._staffId=null,this._infos=infos,this._staffId=staffId,this.IsInAccolade=!1},alphaTab.rendering.EffectBarRendererFactory.__name__=["alphaTab","rendering","EffectBarRendererFactory"],alphaTab.rendering.EffectBarRendererFactory.__super__=alphaTab.rendering.BarRendererFactory,alphaTab.rendering.EffectBarRendererFactory.prototype=$extend(alphaTab.rendering.BarRendererFactory.prototype,{get_StaffId:function(){return this._staffId},Create:function(renderer,bar,staveSettings){return new alphaTab.rendering.EffectBarRenderer(renderer,bar,this._infos)},__class__:alphaTab.rendering.EffectBarRendererFactory}),alphaTab.rendering.ScoreBarRendererFactory=$hx_exports.alphaTab.rendering.ScoreBarRendererFactory=function(){alphaTab.rendering.BarRendererFactory.call(this)},alphaTab.rendering.ScoreBarRendererFactory.__name__=["alphaTab","rendering","ScoreBarRendererFactory"],alphaTab.rendering.ScoreBarRendererFactory.__super__=alphaTab.rendering.BarRendererFactory,alphaTab.rendering.ScoreBarRendererFactory.prototype=$extend(alphaTab.rendering.BarRendererFactory.prototype,{get_StaffId:function(){return"score"},Create:function(renderer,bar,staveSettings){return new alphaTab.rendering.ScoreBarRenderer(renderer,bar)},__class__:alphaTab.rendering.ScoreBarRendererFactory}),alphaTab.rendering.effects.CrescendoEffectInfo=$hx_exports.alphaTab.rendering.effects.CrescendoEffectInfo=function(){},alphaTab.rendering.effects.CrescendoEffectInfo.__name__=["alphaTab","rendering","effects","CrescendoEffectInfo"],alphaTab.rendering.effects.CrescendoEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.CrescendoEffectInfo.prototype={get_EffectId:function(){return"crescendo"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!0},get_SizingMode:function(){return 5},ShouldCreateGlyph:function(settings,beat){return 0!=beat.Crescendo},CreateNewGlyph:function(renderer,beat){return new alphaTab.rendering.glyphs.CrescendoGlyph(0,0,beat.Crescendo)},CanExpand:function(from,to){return from.Crescendo==to.Crescendo},__class__:alphaTab.rendering.effects.CrescendoEffectInfo},alphaTab.rendering.effects.DynamicsEffectInfo=$hx_exports.alphaTab.rendering.effects.DynamicsEffectInfo=function(){},alphaTab.rendering.effects.DynamicsEffectInfo.__name__=["alphaTab","rendering","effects","DynamicsEffectInfo"],alphaTab.rendering.effects.DynamicsEffectInfo.__interfaces__=[alphaTab.rendering.IEffectBarRendererInfo],alphaTab.rendering.effects.DynamicsEffectInfo.prototype={get_EffectId:function(){return"dynamics"},get_HideOnMultiTrack:function(){return!1},get_CanShareBand:function(){return!1},get_SizingMode:function(){return 1},ShouldCreateGlyph:function(settings,beat){return this.InternalShouldCreateGlyph(settings,beat,!0)},InternalShouldCreateGlyph:function(settings,beat,checkForDuplicates){if(beat.Voice.Bar.Staff.Track.Score.Stylesheet.HideDynamics||beat.IsEmpty||beat.Voice.IsEmpty)return!1;var show=0==beat.Voice.Index&&0==beat.Index&&0==beat.Voice.Bar.Index||null!=beat.PreviousBeat&&beat.Dynamic!=beat.PreviousBeat.Dynamic;if(show&&beat.Voice.Index>0)for(var voice=$iterator(beat.Voice.Bar.Voices)();voice.hasNext();){var voice1=voice.next();if(voice1.Index0&&alphaTab.rendering.BarRendererFactory.prototype.CanCreate.call(this,track,staff)},Create:function(renderer,bar,staveSettings){var tabBarRenderer=new alphaTab.rendering.TabBarRenderer(renderer,bar);return tabBarRenderer.ShowRests=this._showRests,tabBarRenderer.ShowTimeSignature=this._showTimeSignature,tabBarRenderer.ShowTiedNotes=this._showTiedNotes,tabBarRenderer.RenderRhythm=staveSettings.Get("rhythm",tabBarRenderer.RenderRhythm),tabBarRenderer.RhythmHeight=staveSettings.Get("rhythmHeight",tabBarRenderer.RhythmHeight),tabBarRenderer.RhythmBeams=staveSettings.Get("rhythmBeams",tabBarRenderer.RhythmBeams),tabBarRenderer},__class__:alphaTab.rendering.TabBarRendererFactory}),alphaTab.Environment=$hx_exports.alphaTab.Environment=function(){},alphaTab.Environment.__name__=["alphaTab","Environment"],alphaTab.Environment.PlatformInit=function(){if(alphaTab.Environment.RenderEngines.svg=function(){return new alphaTab.platform.svg.CssFontSvgCanvas},alphaTab.Environment.RenderEngines.default=function(){return new alphaTab.platform.svg.CssFontSvgCanvas},alphaTab.Environment.RenderEngines.html5=function(){return new alphaTab.platform.javaScript.Html5Canvas},alphaTab.Environment.RegisterJQueryPlugin(),Math.log2=Math.log2||function(x){return Math.log(x)*Math.LOG2E},$global.document){window.AudioContext=window.AudioContext||window.webkitAudioContext;var document=window.document,vbAjaxLoader="";vbAjaxLoader+="Function VbAjaxLoader(method, fileName)\r\n",vbAjaxLoader+=" Dim xhr\r\n",vbAjaxLoader+=' Set xhr = CreateObject("Microsoft.XMLHTTP")\r\n',vbAjaxLoader+=" xhr.Open method, fileName, False\r\n",vbAjaxLoader+=' xhr.setRequestHeader "Accept-Charset", "x-user-defined"\r\n',vbAjaxLoader+=" xhr.send\r\n",vbAjaxLoader+=" Dim byteArray()\r\n",vbAjaxLoader+=" if xhr.Status = 200 Then\r\n",vbAjaxLoader+=" Dim byteString\r\n",vbAjaxLoader+=" Dim i\r\n",vbAjaxLoader+=" byteString=xhr.responseBody\r\n",vbAjaxLoader+=" ReDim byteArray(LenB(byteString))\r\n",vbAjaxLoader+=" For i = 1 To LenB(byteString)\r\n",vbAjaxLoader+=" byteArray(i-1) = AscB(MidB(byteString, i, 1))\r\n",vbAjaxLoader+=" Next\r\n",vbAjaxLoader+=" End If\r\n",vbAjaxLoader+=" VbAjaxLoader=byteArray\r\n",vbAjaxLoader+="End Function\r\n";var vbAjaxLoaderScript=document.createElement("script");vbAjaxLoaderScript.setAttribute("type","text/vbscript");var inlineScript=document.createTextNode(vbAjaxLoader);vbAjaxLoaderScript.appendChild(inlineScript),document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(vbAjaxLoaderScript)},!1);var scriptElement=document.currentScript;if(!scriptElement)try{var error=new Error,stack=error.stack;if(!stack)throw error;alphaTab.Environment.ScriptFile=alphaTab.Environment.ScriptFileFromStack(stack)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,Error))throw e;var stack1=e.stack;stack1?alphaTab.Environment.ScriptFile=alphaTab.Environment.ScriptFileFromStack(stack1):scriptElement=document.querySelector("script[data-alphatab]")}var s=alphaTab.Environment.ScriptFile;null!=s&&0!=s.length||(scriptElement?alphaTab.Environment.ScriptFile=scriptElement.src:alphaTab.util.Logger.Warning("Environment","Could not automatically find alphaTab script file for worker, please add the data-alphatab attribute to the script tag that includes alphaTab or provide it when initializing alphaTab",null)),alphaTab.Environment.CheckForFontAvailability()}else{"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&(alphaTab.platform.javaScript.AlphaTabWebWorker.Init(),alphaTab.platform.javaScript.AlphaSynthWebWorker.Init())}},alphaTab.Environment.RegisterJQueryPlugin=function(){if($global&&"jQuery"in $global){var jquery=window.jQuery,api=new alphaTab.platform.javaScript.JQueryAlphaTab;jquery.fn.alphaTab=function(method){if(1==this.length){var _this1=this[0],tmp=Array.prototype.slice.call(arguments,1);return api.Exec(_this1,method,tmp)}return this.each(function(){var tmp1=Array.prototype.slice.call(arguments,1);api.Exec(this,method,tmp1)})},jquery.alphaTab={restore:alphaTab.platform.javaScript.JQueryAlphaTab.Restore},jquery.fn.alphaTab.fn=api}},alphaTab.Environment.ScriptFileFromStack=function(stack){var matches=stack.match("(data:text\\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?");return matches||(matches=stack.match("^(?:|[^:@]*@|.+\\)@(?=data:text\\/javascript|blob|http[s]?|file)|.+?\\s+(?: at |@)(?:[^:\\(]+ )*[\\(]?)(data:text\\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?"))||(matches=stack.match("\\)@(data:text\\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\\/\\/[\\/]?.+?\\/[^:\\)]*?)(?::\\d+)(?::\\d+)?"))?matches[1]:null},alphaTab.Environment.CheckForFontAvailability=function(){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope)alphaTab.Environment.IsFontLoaded=!1;else{if(!!window.document.fonts&&!!window.document.fonts.load){var checkFont=null;(checkFont=function(){window.document.fonts.load("1em alphaTab").then(function(_){return window.document.fonts.check("1em alphaTab")?(alphaTab.util.Logger.Info("Rendering","Font available",null),alphaTab.Environment.IsFontLoaded=!0):window.setTimeout(function(){checkFont()},250),!0})})()}else{var checkFont1=null;checkFont1=function(){var document=window.document,testItem=document.getElementById("alphaTabFontChecker");null==testItem&&((testItem=document.createElement("div")).setAttribute("id","alphaTabFontChecker"),testItem.style.opacity="0",testItem.style.position="absolute",testItem.style.left="0",testItem.style.top="0",testItem.style.fontSize="100px",testItem.classList.add("at"),testItem.innerHTML="",document.body.appendChild(testItem));var width=testItem.offsetWidth;width>30&&width<100?(alphaTab.Environment.IsFontLoaded=!0,document.body.removeChild(testItem)):window.setTimeout(function(){checkFont1()},250)},window.addEventListener("DOMContentLoaded",function(){checkFont1()})}}},alphaTab.Environment.CreateScoreRenderer=function(settings){return new alphaTab.rendering.ScoreRenderer(settings)},alphaTab.Environment.Init=function(){alphaTab.Environment.RenderEngines={};alphaTab.Environment.LayoutEngines={};alphaTab.Environment.StaveProfiles={},alphaTab.Environment.PlatformInit(),alphaTab.Environment.LayoutEngines.default=function(r){return new alphaTab.rendering.layout.PageViewLayout(r)},alphaTab.Environment.LayoutEngines.page=function(r1){return new alphaTab.rendering.layout.PageViewLayout(r1)},alphaTab.Environment.LayoutEngines.horizontal=function(r2){return new alphaTab.rendering.layout.HorizontalScreenLayout(r2)},alphaTab.Environment.StaveProfiles.default=alphaTab.Environment.StaveProfiles["score-tab"]=[new alphaTab.rendering.EffectBarRendererFactory("score-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.FermataEffectInfo,new alphaTab.rendering.effects.WhammyBarEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!0),new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.ScoreBarRendererFactory,new alphaTab.rendering.EffectBarRendererFactory("tab-effects",[new alphaTab.rendering.effects.CrescendoEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!1),new alphaTab.rendering.effects.DynamicsEffectInfo,new alphaTab.rendering.effects.LyricsEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.TapEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.HarmonicsEffectInfo(1),new alphaTab.rendering.effects.HarmonicsEffectInfo(2),new alphaTab.rendering.effects.HarmonicsEffectInfo(3),new alphaTab.rendering.effects.HarmonicsEffectInfo(4),new alphaTab.rendering.effects.HarmonicsEffectInfo(5),new alphaTab.rendering.effects.HarmonicsEffectInfo(6),new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.CapoEffectInfo,new alphaTab.rendering.effects.FingeringEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo]),new alphaTab.rendering.TabBarRendererFactory(!1,!1,!1)],alphaTab.Environment.StaveProfiles.score=[new alphaTab.rendering.EffectBarRendererFactory("score-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.FermataEffectInfo,new alphaTab.rendering.effects.WhammyBarEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!0),new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.ScoreBarRendererFactory,new alphaTab.rendering.EffectBarRendererFactory("score-bottom-effects",[new alphaTab.rendering.effects.CrescendoEffectInfo,new alphaTab.rendering.effects.OttaviaEffectInfo(!1),new alphaTab.rendering.effects.DynamicsEffectInfo,new alphaTab.rendering.effects.LyricsEffectInfo])],alphaTab.Environment.StaveProfiles.tab=[new alphaTab.rendering.EffectBarRendererFactory("tab-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.FermataEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.TapEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.HarmonicsEffectInfo(2),new alphaTab.rendering.effects.HarmonicsEffectInfo(3),new alphaTab.rendering.effects.HarmonicsEffectInfo(4),new alphaTab.rendering.effects.HarmonicsEffectInfo(5),new alphaTab.rendering.effects.HarmonicsEffectInfo(6),new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.CapoEffectInfo,new alphaTab.rendering.effects.FingeringEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.TabBarRendererFactory(!0,!0,!0),new alphaTab.rendering.EffectBarRendererFactory("tab-bottom-effects",[new alphaTab.rendering.effects.LyricsEffectInfo])],alphaTab.Environment.StaveProfiles["tab-mixed"]=[new alphaTab.rendering.EffectBarRendererFactory("tab-effects",[new alphaTab.rendering.effects.TempoEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.MarkerEffectInfo,new alphaTab.rendering.effects.TextEffectInfo,new alphaTab.rendering.effects.ChordsEffectInfo,new alphaTab.rendering.effects.TripletFeelEffectInfo,new alphaTab.rendering.effects.TrillEffectInfo,new alphaTab.rendering.effects.WideBeatVibratoEffectInfo,new alphaTab.rendering.effects.SlightBeatVibratoEffectInfo,new alphaTab.rendering.effects.WideNoteVibratoEffectInfo,new alphaTab.rendering.effects.SlightNoteVibratoEffectInfo,new alphaTab.rendering.effects.TapEffectInfo,new alphaTab.rendering.effects.FadeInEffectInfo,new alphaTab.rendering.effects.HarmonicsEffectInfo(2),new alphaTab.rendering.effects.HarmonicsEffectInfo(3),new alphaTab.rendering.effects.HarmonicsEffectInfo(4),new alphaTab.rendering.effects.HarmonicsEffectInfo(5),new alphaTab.rendering.effects.HarmonicsEffectInfo(6),new alphaTab.rendering.effects.LetRingEffectInfo,new alphaTab.rendering.effects.CapoEffectInfo,new alphaTab.rendering.effects.PalmMuteEffectInfo,new alphaTab.rendering.effects.PickStrokeEffectInfo,new alphaTab.rendering.effects.PickSlideEffectInfo,new alphaTab.rendering.effects.AlternateEndingsEffectInfo]),new alphaTab.rendering.TabBarRendererFactory(!1,!1,!1),new alphaTab.rendering.EffectBarRendererFactory("tab-bottom-effects",[new alphaTab.rendering.effects.LyricsEffectInfo])]},alphaTab.Environment.prototype={__class__:alphaTab.Environment},alphaTab._FingeringMode={},alphaTab._FingeringMode.FingeringMode_Impl_=$hx_exports.alphaTab._FingeringMode.FingeringMode_Impl_={},alphaTab._FingeringMode.FingeringMode_Impl_.__name__=["alphaTab","_FingeringMode","FingeringMode_Impl_"],alphaTab._FingeringMode.FingeringMode_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab._FingeringMode.FingeringMode_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab._FingeringMode.FingeringMode_Impl_.toString=function(this1){switch(this1){case 0:return"Score";case 1:return"SingleNoteEffectBand"}return""},alphaTab.LayoutSettings=$hx_exports.alphaTab.LayoutSettings=function(){this.Mode=null,this.AdditionalSettings=null;this.AdditionalSettings={}},alphaTab.LayoutSettings.__name__=["alphaTab","LayoutSettings"],alphaTab.LayoutSettings.get_Defaults=function(){var settings=new alphaTab.LayoutSettings;return settings.Mode="page",settings},alphaTab.LayoutSettings.prototype={Get:function(key,def){var this1=this.AdditionalSettings,key1=key.toLowerCase();return this1.hasOwnProperty(key1)?this.AdditionalSettings[key.toLowerCase()]:def},__class__:alphaTab.LayoutSettings},alphaTab.Main=$hx_exports.alphaTab.Main=function(){},alphaTab.Main.__name__=["alphaTab","Main"],alphaTab.Main.main=function(){},alphaTab.Settings=$hx_exports.alphaTab.Settings=function(){this.ScriptFile=null,this.FontDirectory=null,this.DisableLazyLoading=!1,this.UseWebWorker=!1,this.EnablePlayer=!1,this.SoundFontFile=null,this.EnableCursor=!1,this.ScrollOffsetX=0,this.ScrollOffsetY=0,this.EnableSeekByClick=!1,this.ScrollMode=null,this.ScrollSpeed=0,this.ScrollElement=null,this.BeatCursorWidth=0,this.Scale=0,this.Width=0,this.Engine=null,this.Layout=null,this.ImporterSettings=null,this.StretchForce=0,this.ForcePianoFingering=!1,this.Staves=null,this.TranspositionPitches=null,this.DisplayTranspositionPitches=null,this.LogLevel=0,this.SmallGraceTabNotes=!1,this.ExtendBendArrowsOnTiedNotes=!1,this.ShowParenthesisForTiedBends=!1,this.ShowTabNoteOnTiedBend=!1,this.DisplayMode=0,this.FingeringMode=0,this.ShowZeroOnDiveWhammy=!1,this.ExtendLineEffectsToBeatEnd=!1,this.Vibrato=null,this.SlurHeightFactor=0,this.SongBookBendDuration=0},alphaTab.Settings.__name__=["alphaTab","Settings"],alphaTab.Settings.SetDefaults=function(settings){settings.UseWebWorker=!0,settings.ScrollMode="vertical",settings.ScrollSpeed=300,settings.ScrollElement="html,body",settings.BeatCursorWidth=3},alphaTab.Settings.FillPlayerOptions=function(settings,json,setDefaults,dataAttributes){json&&"cursor"in json?settings.EnableCursor=json.cursor:null!=dataAttributes&&dataAttributes.hasOwnProperty("cursor")?settings.EnableCursor=dataAttributes.cursor:setDefaults&&(settings.EnableCursor=!0),settings.EnableCursor&&(json&&"playerOffset"in json?alphaTab.Settings.FillCursorOffset(settings,json.playerOffset):null!=dataAttributes&&dataAttributes.hasOwnProperty("playerOffset")&&alphaTab.Settings.FillCursorOffset(settings,dataAttributes.playerOffset)),json&&"handleClick"in json?settings.EnableSeekByClick=json.handleClick:setDefaults&&(settings.EnableSeekByClick=!0),json&&"autoScroll"in json?settings.ScrollMode=json.autoScroll:setDefaults&&(settings.ScrollMode="vertical"),json&&"scrollSpeed"in json?settings.ScrollSpeed=json.scrollSpeed:setDefaults&&(settings.ScrollSpeed=300),json&&"scrollSpeed"in json?settings.ScrollElement=json.scrollSpeed:setDefaults&&(settings.ScrollElement="html,body"),json&&"beatCursorWidth"in json?settings.BeatCursorWidth=json.beatCursorWidth:setDefaults&&(settings.BeatCursorWidth=3)},alphaTab.Settings.FromJson=function(json,dataAttributes){if(js.Boot.__instanceof(json,alphaTab.Settings))return js.Boot.__cast(json,alphaTab.Settings);var settings=alphaTab.Settings.get_Defaults();return settings.ScriptFile=alphaTab.Environment.ScriptFile,alphaTab.Settings.FillFromJson(settings,json,dataAttributes),settings},alphaTab.Settings.FillFromJson=function(settings,json,dataAttributes){var global=$global;if(global.document&&global.ALPHATAB_ROOT?(settings.ScriptFile=global.ALPHATAB_ROOT,settings.ScriptFile=alphaTab.Settings.EnsureFullUrl(settings.ScriptFile),settings.ScriptFile=alphaTab.Settings.AppendScriptName(settings.ScriptFile)):settings.ScriptFile=alphaTab.Environment.ScriptFile,global.document&&global.ALPHATAB_FONT)settings.FontDirectory=global.ALPHATAB_FONT,settings.FontDirectory=alphaTab.Settings.EnsureFullUrl(settings.FontDirectory);else{settings.FontDirectory=settings.ScriptFile;var s=settings.FontDirectory;if(null!=s&&0!=s.length){var this1=settings.FontDirectory,this2=system.Convert.ToUInt16(47),lastSlash=this1.lastIndexOf(String.fromCharCode(this2));lastSlash>=0&&(settings.FontDirectory=HxOverrides.substr(settings.FontDirectory,0,lastSlash)+"/Font/")}}if(json&&"logging"in json?settings.LogLevel=alphaTab.Settings.DecodeLogLevel(json.log):null!=dataAttributes&&dataAttributes.hasOwnProperty("logging")&&(settings.LogLevel=alphaTab.Settings.DecodeLogLevel(dataAttributes.logging)),json&&"useWorker"in json?settings.UseWebWorker=json.useWorker:null!=dataAttributes&&dataAttributes.hasOwnProperty("useWorker")&&(settings.UseWebWorker=!!dataAttributes.useWorker),json&&"displayMode"in json?settings.DisplayMode=alphaTab.Settings.DecodeDisplayMode(json.displayMode):null!=dataAttributes&&dataAttributes.hasOwnProperty("displayMode")&&(settings.DisplayMode=alphaTab.Settings.DecodeDisplayMode(dataAttributes.displayMode)),1==settings.DisplayMode&&settings.ApplySongBookDefaults(),json&&"scale"in json?settings.Scale=json.scale:null!=dataAttributes&&dataAttributes.hasOwnProperty("scale")&&(settings.Scale=dataAttributes.scale),json&&"slurHeight"in json?settings.SlurHeightFactor=json.slurHeight:null!=dataAttributes&&dataAttributes.hasOwnProperty("slurHeight")&&(settings.SlurHeightFactor=dataAttributes.slurHeight),json&&"width"in json?settings.Width=json.width:null!=dataAttributes&&dataAttributes.hasOwnProperty("width")&&(settings.Width=dataAttributes.width),json&&"engine"in json?settings.Engine=json.engine:null!=dataAttributes&&dataAttributes.hasOwnProperty("engine")&&(settings.Engine=dataAttributes.engine),json&&"stretchForce"in json?settings.StretchForce=json.stretchForce:null!=dataAttributes&&dataAttributes.hasOwnProperty("stretchForce")&&(settings.StretchForce=dataAttributes.stretchForce),json&&"forcePianoFingering"in json?settings.ForcePianoFingering=json.forcePianoFingering:null!=dataAttributes&&dataAttributes.hasOwnProperty("forcePianoFingering")&&(settings.ForcePianoFingering=dataAttributes.forcePianoFingering),json&&"lazy"in json?settings.DisableLazyLoading=!json.lazy:null!=dataAttributes&&dataAttributes.hasOwnProperty("lazy")&&(settings.DisableLazyLoading=!dataAttributes.lazy),json&&"transpositionPitches"in json)settings.TranspositionPitches=json.transpositionPitches;else if(null!=dataAttributes&&dataAttributes.hasOwnProperty("transpositionPitches")){var pitchOffsets=dataAttributes.transpositionPitches;null!=pitchOffsets&&pitchOffsets.length&&(settings.TranspositionPitches=pitchOffsets)}if(json&&"displayTranspositionPitches"in json)settings.DisplayTranspositionPitches=json.displayTranspositionPitches;else if(null!=dataAttributes&&dataAttributes.hasOwnProperty("displayTranspositionPitches")){var pitchOffsets1=dataAttributes.displayTranspositionPitches;null!=pitchOffsets1&&pitchOffsets1.length&&(settings.DisplayTranspositionPitches=pitchOffsets1)}if(json&&"scriptFile"in json&&(settings.ScriptFile=alphaTab.Settings.EnsureFullUrl(json.scriptFile),settings.ScriptFile=alphaTab.Settings.AppendScriptName(settings.ScriptFile)),json&&"fontDirectory"in json&&(settings.FontDirectory=alphaTab.Settings.EnsureFullUrl(json.fontDirectory)),json&&"smallGraceTabNotes"in json?settings.SmallGraceTabNotes=json.smallGraceTabNotes:null!=dataAttributes&&dataAttributes.hasOwnProperty("smallGraceTabNotes")&&(settings.SmallGraceTabNotes=dataAttributes.smallGraceTabNotes),json&&"fingeringMode"in json?settings.FingeringMode=alphaTab.Settings.DecodeFingeringMode(json.fingeringMode):null!=dataAttributes&&dataAttributes.hasOwnProperty("fingeringMode")&&(settings.FingeringMode=alphaTab.Settings.DecodeFingeringMode(dataAttributes.fingeringMode)),json&&"extendBendArrowsOnTiedNotes"in json?settings.ExtendBendArrowsOnTiedNotes=json.extendBendArrowsOnTiedNotes:null!=dataAttributes&&dataAttributes.hasOwnProperty("extendBendArrowsOnTiedNotes")&&(settings.ExtendBendArrowsOnTiedNotes=dataAttributes.extendBendArrowsOnTiedNotes),json&&"showParenthesisForTiedBends"in json?settings.ShowParenthesisForTiedBends=json.showParenthesisForTiedBends:null!=dataAttributes&&dataAttributes.hasOwnProperty("showParenthesisForTiedBends")&&(settings.ShowParenthesisForTiedBends=dataAttributes.showParenthesisForTiedBends),json&&"showTabNoteOnTiedBend"in json?settings.ShowTabNoteOnTiedBend=json.showTabNoteOnTiedBend:null!=dataAttributes&&dataAttributes.hasOwnProperty("showTabNoteOnTiedBend")&&(settings.ShowTabNoteOnTiedBend=dataAttributes.showTabNoteOnTiedBend),json&&"showZeroOnDiveWhammy"in json?settings.ShowZeroOnDiveWhammy=json.showZeroOnDiveWhammy:null!=dataAttributes&&dataAttributes.hasOwnProperty("showZeroOnDiveWhammy")&&(settings.ShowZeroOnDiveWhammy=dataAttributes.showZeroOnDiveWhammy),json&&"extendLineEffectsToBeatEnd"in json?settings.ExtendLineEffectsToBeatEnd=json.extendLineEffectsToBeatEnd:null!=dataAttributes&&dataAttributes.hasOwnProperty("extendLineEffectsToBeatEnd")&&(settings.ExtendLineEffectsToBeatEnd=dataAttributes.extendLineEffectsToBeatEnd),json&&"songBookBendDuration"in json?settings.SongBookBendDuration=json.songBookBendDuration:null!=dataAttributes&&dataAttributes.hasOwnProperty("songBookBendDuration")&&(settings.SongBookBendDuration=dataAttributes.songBookBendDuration),json&&"layout"in json?settings.Layout=alphaTab.Settings.LayoutFromJson(json.layout):null!=dataAttributes&&dataAttributes.hasOwnProperty("layout")&&(settings.Layout=alphaTab.Settings.LayoutFromJson(dataAttributes.layout)),json&&"vibrato"in json){var vibrato=json.vibrato;vibrato.noteSlightAmplitude&&(settings.Vibrato.NoteSlightAmplitude=vibrato.noteSlightAmplitude),vibrato.noteWideAmplitude&&(settings.Vibrato.NoteWideAmplitude=vibrato.noteWideAmplitude),vibrato.noteSlightLength&&(settings.Vibrato.NoteSlightLength=vibrato.noteSlightLength),vibrato.noteWideLength&&(settings.Vibrato.NoteWideLength=vibrato.noteWideLength),vibrato.beatSlightAmplitude&&(settings.Vibrato.BeatSlightAmplitude=vibrato.beatSlightAmplitude),vibrato.beatWideAmplitude&&(settings.Vibrato.BeatWideAmplitude=vibrato.beatWideAmplitude),vibrato.beatSlightLength&&(settings.Vibrato.BeatSlightLength=vibrato.beatSlightLength),vibrato.beatWideLength&&(settings.Vibrato.BeatWideLength=vibrato.beatWideLength)}else null!=dataAttributes&&(dataAttributes.hasOwnProperty("vibratoNoteSlightLength")&&(settings.Vibrato.NoteSlightLength=dataAttributes.vibratoNoteSlightLength),dataAttributes.hasOwnProperty("vibratoNoteSlightAmplitude")&&(settings.Vibrato.NoteSlightAmplitude=dataAttributes.vibratoNoteSlightAmplitude),dataAttributes.hasOwnProperty("vibratoNoteWideLength")&&(settings.Vibrato.NoteWideLength=dataAttributes.vibratoNoteWideLength),dataAttributes.hasOwnProperty("vibratoNoteWideAmplitude")&&(settings.Vibrato.NoteWideAmplitude=dataAttributes.vibratoNoteWideAmplitude),dataAttributes.hasOwnProperty("vibratoBeatSlightLength")&&(settings.Vibrato.BeatSlightLength=dataAttributes.vibratoBeatSlightLength),dataAttributes.hasOwnProperty("vibratoBeatSlightAmplitude")&&(settings.Vibrato.BeatSlightAmplitude=dataAttributes.vibratoBeatSlightAmplitude),dataAttributes.hasOwnProperty("vibratoBeatWideLength")&&(settings.Vibrato.BeatWideLength=dataAttributes.vibratoBeatWideLength),dataAttributes.hasOwnProperty("vibratoBeatWideAmplitude")&&(settings.Vibrato.BeatWideAmplitude=dataAttributes.vibratoBeatWideAmplitude));if(null!=dataAttributes)for(var key=$iterator(Object.keys(dataAttributes))();key.hasNext();){var key1=key.next();if(StringTools.startsWith(key1,"layout")){var property=HxOverrides.substr(key1,6,null);settings.Layout.AdditionalSettings[property.toLowerCase()]=dataAttributes[key1]}}if(json&&"staves"in json?settings.Staves=alphaTab.Settings.StavesFromJson(json.staves):null!=dataAttributes&&dataAttributes.hasOwnProperty("staves")&&(settings.Staves=alphaTab.Settings.StavesFromJson(dataAttributes.staves)),null!=dataAttributes)for(var key2=$iterator(Object.keys(dataAttributes))();key2.hasNext();){var key3=key2.next();if(StringTools.startsWith(key3,"staves")){var property1=HxOverrides.substr(key3,6,null);settings.Staves.AdditionalSettings[property1.toLowerCase()]=dataAttributes[key3]}}if(json&&"player"in json?(settings.EnablePlayer=!0,settings.SoundFontFile=json.player):null!=dataAttributes&&dataAttributes.hasOwnProperty("player")&&(settings.EnablePlayer=!0,settings.SoundFontFile=dataAttributes.player),settings.EnablePlayer&&alphaTab.Settings.FillPlayerOptions(settings,json,!0,dataAttributes),json&&"importer"in json)for(var json1=json.importer,keys2=Object.keys(json1),key21=HxOverrides.iter(keys2);key21.hasNext();){var key22=key21.next();settings.ImporterSettings[key22.toLowerCase()]=json.importer[key22]}else if(null!=dataAttributes)for(var key4=$iterator(Object.keys(dataAttributes))();key4.hasNext();){var key5=key4.next();if(StringTools.startsWith(key5,"importer")){var property2=HxOverrides.substr(key5,8,null);settings.ImporterSettings[property2.toLowerCase()]=dataAttributes[key5]}}},alphaTab.Settings.DecodeDisplayMode=function(mode){if("number"==typeof mode)return mode;if("string"==typeof mode){switch(mode.toLowerCase()){case"guitarpro":return 0;case"songbook":return 1}}return 0},alphaTab.Settings.DecodeFingeringMode=function(mode){if("number"==typeof mode)return mode;if("string"==typeof mode){switch(mode.toLowerCase()){case"effectband":return 1;case"score":return 0}}return 0},alphaTab.Settings.DecodeLogLevel=function(log){if("number"==typeof log)return log;if("string"==typeof log){switch(log.toLowerCase()){case"debug":return 1;case"error":return 4;case"info":return 2;case"none":return 0;case"warning":return 3}}return 2},alphaTab.Settings.FillCursorOffset=function(settings,playerOffset){if("number"==typeof playerOffset)settings.ScrollOffsetX=playerOffset,settings.ScrollOffsetY=playerOffset;else if(playerOffset&&"length"in playerOffset){var offsets=playerOffset;settings.ScrollOffsetX=offsets[0],settings.ScrollOffsetY=offsets[1]}},alphaTab.Settings.StavesFromJson=function(json){var staveSettings;if("string"==typeof json)staveSettings=new alphaTab.StaveSettings(json);else{if(!json.id)return new alphaTab.StaveSettings("score-tab");if(staveSettings=new alphaTab.StaveSettings(json.id),json.additionalSettings)for(var json1=json.additionalSettings,keys2=Object.keys(json1),key2=HxOverrides.iter(keys2);key2.hasNext();){var key21=key2.next();staveSettings.AdditionalSettings[key21.toLowerCase()]=json.additionalSettings[key21]}}return staveSettings},alphaTab.Settings.LayoutFromJson=function(json){var layout=new alphaTab.LayoutSettings;if("string"==typeof json)layout.Mode=json;else if(json.mode&&(layout.Mode=json.mode),json.additionalSettings)for(var json1=json.additionalSettings,keys=Object.keys(json1),key=HxOverrides.iter(keys);key.hasNext();){var key1=key.next();layout.AdditionalSettings[key1.toLowerCase()]=json.additionalSettings[key1]}return layout},alphaTab.Settings.AppendScriptName=function(url){return null==url||0==url.length||StringTools.endsWith(url,".js")||(StringTools.endsWith(url,"/")||(url+="/"),url+="AlphaTab.js"),url},alphaTab.Settings.EnsureFullUrl=function(relativeUrl){var global=$global;if(!StringTools.startsWith(relativeUrl,"http")&&!StringTools.startsWith(relativeUrl,"https")&&!StringTools.startsWith(relativeUrl,"file")){var root="";root+=Std.string(global.location.protocol),root+=Std.string("//"),global.location.hostname&&(root+=Std.string(global.location.hostname)),global.location.port&&(root+=Std.string(":"),root+=Std.string(global.location.port));var directory=global.location.pathname.split("/").slice(0,-1).join("/");return directory.length>0&&(StringTools.startsWith(directory,"/")||(root+=Std.string("/")),root+=Std.string(directory)),StringTools.startsWith(relativeUrl,"/")||(root+=Std.string("/")),root+=Std.string(relativeUrl)}return relativeUrl},alphaTab.Settings.get_SongBook=function(){var settings=alphaTab.Settings.get_Defaults();return settings.DisplayMode=1,settings.ApplySongBookDefaults(),settings},alphaTab.Settings.get_Defaults=function(){var settings=new alphaTab.Settings;settings.Scale=1,settings.StretchForce=1,settings.Width=-1,settings.Engine="default";var this1=new Int32Array(0);settings.TranspositionPitches=this1;var this2=new Int32Array(0);settings.DisplayTranspositionPitches=this2,settings.SmallGraceTabNotes=!0,settings.ExtendBendArrowsOnTiedNotes=!0,settings.ShowParenthesisForTiedBends=!0,settings.ShowTabNoteOnTiedBend=!0,settings.DisplayMode=0,settings.FingeringMode=0,settings.ShowZeroOnDiveWhammy=!1,settings.ExtendLineEffectsToBeatEnd=!1,settings.SlurHeightFactor=.3;return settings.ImporterSettings={},settings.Layout=alphaTab.LayoutSettings.get_Defaults(),settings.Staves=new alphaTab.StaveSettings("default"),settings.LogLevel=2,settings.Vibrato=new alphaTab.VibratoPlaybackSettings,settings.Vibrato.NoteSlightAmplitude=2,settings.Vibrato.NoteWideAmplitude=2,settings.Vibrato.NoteSlightLength=480,settings.Vibrato.NoteWideLength=480,settings.Vibrato.BeatSlightAmplitude=3,settings.Vibrato.BeatWideAmplitude=3,settings.Vibrato.BeatSlightLength=240,settings.Vibrato.BeatWideLength=240,settings.SongBookBendDuration=75,alphaTab.Settings.SetDefaults(settings),settings},alphaTab.Settings.prototype={ToJson:function(){var json={};json.useWorker=this.UseWebWorker,json.scale=this.Scale,json.slurHeight=this.SlurHeightFactor,json.width=this.Width,json.engine=this.Engine,json.stretchForce=this.StretchForce,json.forcePianoFingering=this.ForcePianoFingering,json.transpositionPitches=this.TranspositionPitches,json.displayTranspositionPitches=this.DisplayTranspositionPitches,json.logging=this.LogLevel,json.smallGraceTabNotes=this.SmallGraceTabNotes,json.extendBendArrowsOnTiedNotes=this.ExtendBendArrowsOnTiedNotes,json.showParenthesisForTiedBends=this.ShowParenthesisForTiedBends,json.showTabNoteOnTiedBend=this.ShowTabNoteOnTiedBend,json.displayMode=this.DisplayMode,json.fingeringMode=this.FingeringMode,json.showZeroOnDiveWhammy=this.ShowZeroOnDiveWhammy,json.extendLineEffectsToBeatEnd=this.ExtendLineEffectsToBeatEnd,json.songBookBendDuration=this.SongBookBendDuration,json.scriptFile=this.ScriptFile,json.fontDirectory=this.FontDirectory,json.lazy=this.DisableLazyLoading,json.vibrato={},json.noteSlightAmplitude=this.Vibrato.NoteSlightAmplitude,json.noteWideAmplitude=this.Vibrato.NoteWideAmplitude,json.noteSlightLength=this.Vibrato.NoteSlightLength,json.noteWideLength=this.Vibrato.NoteWideLength,json.beatSlightAmplitude=this.Vibrato.BeatSlightAmplitude,json.beatWideAmplitude=this.Vibrato.BeatWideAmplitude,json.beatSlightLength=this.Vibrato.BeatSlightLength,json.beatWideLength=this.Vibrato.BeatWideLength,json.layout={},json.layout.mode=this.Layout.Mode,json.layout.additionalSettings={};for(var this1=this.Layout.AdditionalSettings,setting=$iterator(Object.keys(this1))();setting.hasNext();){var setting1=setting.next();json.layout.additionalSettings[setting1]=this.Layout.AdditionalSettings[setting1]}json.importer={};for(var this2=this.ImporterSettings,setting2=$iterator(Object.keys(this2))();setting2.hasNext();){var setting3=setting2.next();json.importer[setting3]=this.ImporterSettings[setting3]}json.staves={},json.staves.id=this.Staves.Id,json.staves.additionalSettings={};for(var this3=this.Staves.AdditionalSettings,additionalSetting=$iterator(Object.keys(this3))();additionalSetting.hasNext();){var additionalSetting1=additionalSetting.next();json.staves.additionalSettings[additionalSetting1]=this.Staves.AdditionalSettings[additionalSetting1]}return json},ApplySongBookDefaults:function(){this.SmallGraceTabNotes=!1,this.FingeringMode=1,this.ExtendBendArrowsOnTiedNotes=!1,this.ShowParenthesisForTiedBends=!1,this.ShowTabNoteOnTiedBend=!1,this.ShowZeroOnDiveWhammy=!0},__class__:alphaTab.Settings},alphaTab.StaveSettings=$hx_exports.alphaTab.StaveSettings=function(id){this.Id=null,this.AdditionalSettings=null,this.Id=id;this.AdditionalSettings={}},alphaTab.StaveSettings.__name__=["alphaTab","StaveSettings"],alphaTab.StaveSettings.prototype={Get:function(key,def){var this1=this.AdditionalSettings,key1=key.toLowerCase();return this1.hasOwnProperty(key1)?this.AdditionalSettings[key.toLowerCase()]:def},__class__:alphaTab.StaveSettings},alphaTab.VibratoPlaybackSettings=$hx_exports.alphaTab.VibratoPlaybackSettings=function(){this.NoteWideLength=0,this.NoteWideAmplitude=0,this.NoteSlightLength=0,this.NoteSlightAmplitude=0,this.BeatWideLength=0,this.BeatWideAmplitude=0,this.BeatSlightLength=0,this.BeatSlightAmplitude=0},alphaTab.VibratoPlaybackSettings.__name__=["alphaTab","VibratoPlaybackSettings"],alphaTab.VibratoPlaybackSettings.prototype={__class__:alphaTab.VibratoPlaybackSettings},alphaTab.audio.BeatTickLookup=$hx_exports.alphaTab.audio.BeatTickLookup=function(){this.Start=0,this.End=0,this.Beat=null,this.IsEmptyBar=!1},alphaTab.audio.BeatTickLookup.__name__=["alphaTab","audio","BeatTickLookup"],alphaTab.audio.BeatTickLookup.prototype={__class__:alphaTab.audio.BeatTickLookup},alphaTab.audio.GeneralMidi=$hx_exports.alphaTab.audio.GeneralMidi=function(){},alphaTab.audio.GeneralMidi.__name__=["alphaTab","audio","GeneralMidi"],alphaTab.audio.GeneralMidi.GetValue=function(name){if(null==alphaTab.audio.GeneralMidi._values){alphaTab.audio.GeneralMidi._values={},alphaTab.audio.GeneralMidi._values.acousticgrandpiano=0,alphaTab.audio.GeneralMidi._values.brightacousticpiano=1,alphaTab.audio.GeneralMidi._values.electricgrandpiano=2,alphaTab.audio.GeneralMidi._values.honkytonkpiano=3,alphaTab.audio.GeneralMidi._values.electricpiano1=4,alphaTab.audio.GeneralMidi._values.electricpiano2=5,alphaTab.audio.GeneralMidi._values.harpsichord=6,alphaTab.audio.GeneralMidi._values.clavinet=7,alphaTab.audio.GeneralMidi._values.celesta=8,alphaTab.audio.GeneralMidi._values.glockenspiel=9,alphaTab.audio.GeneralMidi._values.musicbox=10,alphaTab.audio.GeneralMidi._values.vibraphone=11,alphaTab.audio.GeneralMidi._values.marimba=12,alphaTab.audio.GeneralMidi._values.xylophone=13,alphaTab.audio.GeneralMidi._values.tubularbells=14,alphaTab.audio.GeneralMidi._values.dulcimer=15,alphaTab.audio.GeneralMidi._values.drawbarorgan=16,alphaTab.audio.GeneralMidi._values.percussiveorgan=17,alphaTab.audio.GeneralMidi._values.rockorgan=18,alphaTab.audio.GeneralMidi._values.churchorgan=19,alphaTab.audio.GeneralMidi._values.reedorgan=20,alphaTab.audio.GeneralMidi._values.accordion=21,alphaTab.audio.GeneralMidi._values.harmonica=22,alphaTab.audio.GeneralMidi._values.tangoaccordion=23,alphaTab.audio.GeneralMidi._values.acousticguitarnylon=24,alphaTab.audio.GeneralMidi._values.acousticguitarsteel=25,alphaTab.audio.GeneralMidi._values.electricguitarjazz=26,alphaTab.audio.GeneralMidi._values.electricguitarclean=27,alphaTab.audio.GeneralMidi._values.electricguitarmuted=28,alphaTab.audio.GeneralMidi._values.overdrivenguitar=29,alphaTab.audio.GeneralMidi._values.distortionguitar=30,alphaTab.audio.GeneralMidi._values.guitarharmonics=31,alphaTab.audio.GeneralMidi._values.acousticbass=32,alphaTab.audio.GeneralMidi._values.electricbassfinger=33,alphaTab.audio.GeneralMidi._values.electricbasspick=34,alphaTab.audio.GeneralMidi._values.fretlessbass=35,alphaTab.audio.GeneralMidi._values.slapbass1=36,alphaTab.audio.GeneralMidi._values.slapbass2=37,alphaTab.audio.GeneralMidi._values.synthbass1=38,alphaTab.audio.GeneralMidi._values.synthbass2=39,alphaTab.audio.GeneralMidi._values.violin=40,alphaTab.audio.GeneralMidi._values.viola=41,alphaTab.audio.GeneralMidi._values.cello=42,alphaTab.audio.GeneralMidi._values.contrabass=43,alphaTab.audio.GeneralMidi._values.tremolostrings=44,alphaTab.audio.GeneralMidi._values.pizzicatostrings=45,alphaTab.audio.GeneralMidi._values.orchestralharp=46,alphaTab.audio.GeneralMidi._values.timpani=47,alphaTab.audio.GeneralMidi._values.stringensemble1=48,alphaTab.audio.GeneralMidi._values.stringensemble2=49,alphaTab.audio.GeneralMidi._values.synthstrings1=50,alphaTab.audio.GeneralMidi._values.synthstrings2=51,alphaTab.audio.GeneralMidi._values.choiraahs=52,alphaTab.audio.GeneralMidi._values.voiceoohs=53,alphaTab.audio.GeneralMidi._values.synthvoice=54,alphaTab.audio.GeneralMidi._values.orchestrahit=55,alphaTab.audio.GeneralMidi._values.trumpet=56,alphaTab.audio.GeneralMidi._values.trombone=57,alphaTab.audio.GeneralMidi._values.tuba=58,alphaTab.audio.GeneralMidi._values.mutedtrumpet=59,alphaTab.audio.GeneralMidi._values.frenchhorn=60,alphaTab.audio.GeneralMidi._values.brasssection=61,alphaTab.audio.GeneralMidi._values.synthbrass1=62,alphaTab.audio.GeneralMidi._values.synthbrass2=63,alphaTab.audio.GeneralMidi._values.sopranosax=64,alphaTab.audio.GeneralMidi._values.altosax=65,alphaTab.audio.GeneralMidi._values.tenorsax=66,alphaTab.audio.GeneralMidi._values.baritonesax=67,alphaTab.audio.GeneralMidi._values.oboe=68,alphaTab.audio.GeneralMidi._values.englishhorn=69,alphaTab.audio.GeneralMidi._values.bassoon=70,alphaTab.audio.GeneralMidi._values.clarinet=71,alphaTab.audio.GeneralMidi._values.piccolo=72,alphaTab.audio.GeneralMidi._values.flute=73,alphaTab.audio.GeneralMidi._values.recorder=74,alphaTab.audio.GeneralMidi._values.panflute=75,alphaTab.audio.GeneralMidi._values.blownbottle=76,alphaTab.audio.GeneralMidi._values.shakuhachi=77,alphaTab.audio.GeneralMidi._values.whistle=78,alphaTab.audio.GeneralMidi._values.ocarina=79,alphaTab.audio.GeneralMidi._values.lead1square=80,alphaTab.audio.GeneralMidi._values.lead2sawtooth=81,alphaTab.audio.GeneralMidi._values.lead3calliope=82,alphaTab.audio.GeneralMidi._values.lead4chiff=83,alphaTab.audio.GeneralMidi._values.lead5charang=84,alphaTab.audio.GeneralMidi._values.lead6voice=85,alphaTab.audio.GeneralMidi._values.lead7fifths=86,alphaTab.audio.GeneralMidi._values.lead8bassandlead=87,alphaTab.audio.GeneralMidi._values.pad1newage=88,alphaTab.audio.GeneralMidi._values.pad2warm=89,alphaTab.audio.GeneralMidi._values.pad3polysynth=90,alphaTab.audio.GeneralMidi._values.pad4choir=91,alphaTab.audio.GeneralMidi._values.pad5bowed=92,alphaTab.audio.GeneralMidi._values.pad6metallic=93,alphaTab.audio.GeneralMidi._values.pad7halo=94,alphaTab.audio.GeneralMidi._values.pad8sweep=95,alphaTab.audio.GeneralMidi._values.fx1rain=96,alphaTab.audio.GeneralMidi._values.fx2soundtrack=97,alphaTab.audio.GeneralMidi._values.fx3crystal=98,alphaTab.audio.GeneralMidi._values.fx4atmosphere=99,alphaTab.audio.GeneralMidi._values.fx5brightness=100,alphaTab.audio.GeneralMidi._values.fx6goblins=101,alphaTab.audio.GeneralMidi._values.fx7echoes=102,alphaTab.audio.GeneralMidi._values.fx8scifi=103,alphaTab.audio.GeneralMidi._values.sitar=104,alphaTab.audio.GeneralMidi._values.banjo=105,alphaTab.audio.GeneralMidi._values.shamisen=106,alphaTab.audio.GeneralMidi._values.koto=107,alphaTab.audio.GeneralMidi._values.kalimba=108,alphaTab.audio.GeneralMidi._values.bagpipe=109,alphaTab.audio.GeneralMidi._values.fiddle=110,alphaTab.audio.GeneralMidi._values.shanai=111,alphaTab.audio.GeneralMidi._values.tinklebell=112,alphaTab.audio.GeneralMidi._values.agogo=113,alphaTab.audio.GeneralMidi._values.steeldrums=114,alphaTab.audio.GeneralMidi._values.woodblock=115,alphaTab.audio.GeneralMidi._values.taikodrum=116,alphaTab.audio.GeneralMidi._values.melodictom=117,alphaTab.audio.GeneralMidi._values.synthdrum=118,alphaTab.audio.GeneralMidi._values.reversecymbal=119,alphaTab.audio.GeneralMidi._values.guitarfretnoise=120,alphaTab.audio.GeneralMidi._values.breathnoise=121,alphaTab.audio.GeneralMidi._values.seashore=122,alphaTab.audio.GeneralMidi._values.birdtweet=123,alphaTab.audio.GeneralMidi._values.telephonering=124,alphaTab.audio.GeneralMidi._values.helicopter=125,alphaTab.audio.GeneralMidi._values.applause=126,alphaTab.audio.GeneralMidi._values.gunshot=127}return name=StringTools.replace(name.toLowerCase()," ",""),alphaTab.audio.GeneralMidi._values.hasOwnProperty(name)?alphaTab.audio.GeneralMidi._values[name]:0},alphaTab.audio.GeneralMidi.IsPiano=function(program){return program<=7||program>=16&&program<=23},alphaTab.audio.GeneralMidi.IsGuitar=function(program){return program>=24&&program<=39||105==program||43==program},alphaTab.audio.GeneralMidi.prototype={__class__:alphaTab.audio.GeneralMidi},alphaTab.audio.MasterBarTickLookup=$hx_exports.alphaTab.audio.MasterBarTickLookup=function(){this.Start=0,this.End=0,this.Tempo=0,this.MasterBar=null,this.Beats=null,this.NextMasterBar=null;this.Beats=[]},alphaTab.audio.MasterBarTickLookup.__name__=["alphaTab","audio","MasterBarTickLookup"],alphaTab.audio.MasterBarTickLookup.prototype={Finish:function(){this.Beats.sort(function(a1,b1){return b=b1,a1.Start-b.Start;var b})},AddBeat:function(beat){this.Beats.push(beat)},__class__:alphaTab.audio.MasterBarTickLookup},alphaTab.audio.MidiTickLookup=$hx_exports.alphaTab.audio.MidiTickLookup=function(){this._currentMasterBar=null,this.MasterBarLookup=null,this.MasterBars=null;this.MasterBars=[];this.MasterBarLookup={}},alphaTab.audio.MidiTickLookup.__name__=["alphaTab","audio","MidiTickLookup"],alphaTab.audio.MidiTickLookup.prototype={Finish:function(){for(var previous=null,bar=$iterator(this.MasterBars)();bar.hasNext();){var bar1=bar.next();bar1.Finish(),null!=previous&&(previous.NextMasterBar=bar1),previous=bar1}},FindBeat:function(tracks,tick){var masterBar=this.FindMasterBar(tick);if(null==masterBar)return null;for(var trackLookup={},track=HxOverrides.iter(tracks);track.hasNext();){trackLookup[track.next().Index]=!0}for(var beat=null,index=0,beats=masterBar.Beats,b=0;btick)break;++b}else++b}if(null==beat)return null;for(var nextBeat=null,b1=index+1;b1beat.Start&&trackLookup.hasOwnProperty(currentBeat1.Beat.Voice.Bar.Staff.Track.Index)){nextBeat=currentBeat1;break}++b1}if(null==nextBeat&&null!=masterBar.NextMasterBar){beats=masterBar.NextMasterBar.Beats;for(var b2=0;b2=bar.Start&&tick127?127:value},alphaTab.audio.generator.AlphaSynthMidiFileHandler.prototype={AddTimeSignature:function(tick,timeSignatureNumerator,timeSignatureDenominator){for(var denominatorIndex=0;(timeSignatureDenominator>>=1)>0;)++denominatorIndex;var message=new alphaTab.audio.synth.midi.event.MetaDataEvent(tick,255,system.Convert.ToUInt8(88),new Uint8Array([system.Convert.ToUInt8(255&timeSignatureNumerator),system.Convert.ToUInt8(255&denominatorIndex),48,8]));this._midiFile.AddEvent(message)},AddRest:function(track,tick,channel){var message=new alphaTab.audio.synth.midi.event.SystemExclusiveEvent(tick,system.Convert.ToUInt8(240),0,new Uint8Array([255]));this._midiFile.AddEvent(message)},AddNote:function(track,start,length,key,dynamicValue,channel){var velocity=alphaTab.audio.MidiUtils.DynamicToVelocity(dynamicValue),noteOn=new alphaTab.audio.synth.midi.event.MidiEvent(start,this.MakeCommand(system.Convert.ToUInt8(144),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(key),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(system.Convert.ToUInt8(velocity)));this._midiFile.AddEvent(noteOn);var noteOff=new alphaTab.audio.synth.midi.event.MidiEvent(start+length,this.MakeCommand(system.Convert.ToUInt8(128),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(key),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(system.Convert.ToUInt8(velocity)));this._midiFile.AddEvent(noteOff)},MakeCommand:function(command,channel){return system.Convert.ToUInt8(240&command|15&channel)},AddControlChange:function(track,tick,channel,controller,value){var message=new alphaTab.audio.synth.midi.event.MidiEvent(tick,this.MakeCommand(system.Convert.ToUInt8(176),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(controller),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(value));this._midiFile.AddEvent(message)},AddProgramChange:function(track,tick,channel,program){var message=new alphaTab.audio.synth.midi.event.MidiEvent(tick,this.MakeCommand(system.Convert.ToUInt8(192),channel),alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(program),0);this._midiFile.AddEvent(message)},AddTempo:function(tick,tempo){var tempoInUsq=6e7/tempo|0,message=new alphaTab.audio.synth.midi.event.MetaNumberEvent(tick,255,system.Convert.ToUInt8(81),tempoInUsq);this._midiFile.AddEvent(message)},AddBend:function(track,tick,channel,value){var message=new alphaTab.audio.synth.midi.event.MidiEvent(tick,this.MakeCommand(system.Convert.ToUInt8(224),channel),0,alphaTab.audio.generator.AlphaSynthMidiFileHandler.FixValue(value));this._midiFile.AddEvent(message)},FinishTrack:function(track,tick){var message=system.Convert.ToUInt8(47),this1=new Uint8Array(0),message1=new alphaTab.audio.synth.midi.event.MetaDataEvent(tick,255,message,this1);this._midiFile.AddEvent(message1)},__class__:alphaTab.audio.generator.AlphaSynthMidiFileHandler},alphaTab.audio.generator.MidiFileGenerator=$hx_exports.alphaTab.audio.generator.MidiFileGenerator=function(score,settings,handler){this._score=null,this._settings=null,this._handler=null,this._currentTempo=0,this._currentBarRepeatLookup=null,this.TickLookup=null,this._score=score,this._settings=settings,this._currentTempo=this._score.Tempo,this._handler=handler,this.TickLookup=new alphaTab.audio.MidiTickLookup},alphaTab.audio.generator.MidiFileGenerator.__name__=["alphaTab","audio","generator","MidiFileGenerator"],alphaTab.audio.generator.MidiFileGenerator.ToChannelShort=function(data){var value=Math.max(-32768,Math.min(32767,8*data-1));return Math.max(value,-1)+1},alphaTab.audio.generator.MidiFileGenerator.prototype={Generate:function(){for(var i=0,j=this._score.Tracks.length;iaudioDuration?realTickOffset:audioDuration),realBar==beat.Voice.Bar?(beatLookup.Beat=beat,this.TickLookup.AddBeat(beatLookup)):(beatLookup.IsEmptyBar=!0,beatLookup.Beat=realBar.Voices[0].Beats[0],null==this._currentBarRepeatLookup?(this._currentBarRepeatLookup=beatLookup,this.TickLookup.AddBeat(this._currentBarRepeatLookup)):this._currentBarRepeatLookup.End=beatLookup.End);for(var track=beat.Voice.Bar.Staff.Track,i=0,j=beat.Automations.length;i0&&this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(initialBend)),note.Beat.FadeIn&&this.GenerateFadeIn(note,noteStart,noteDuration,noteKey,dynamicValue),note.get_IsTrill()&&2!=staff.StaffKind)this.GenerateTrill(note,noteStart,noteDuration,noteKey,dynamicValue,channel);else if(note.Beat.get_IsTremolo())this.GenerateTremoloPicking(note,noteStart,noteDuration,noteKey,dynamicValue,channel);else if(note.get_HasBend()?this.GenerateBend(note,noteStart,noteDuration,noteKey,dynamicValue,channel):note.Beat.get_HasWhammyBar()&&0==note.Index?this.GenerateWhammy(note.Beat,noteStart,noteDuration,noteKey,dynamicValue,channel):0!=note.SlideType?this.GenerateSlide(note,noteStart,noteDuration,noteKey,dynamicValue,channel):0!=note.Vibrato&&this.GenerateVibrato(note,noteStart,noteDuration,noteKey,dynamicValue,channel),!note.IsTieDestination){var noteSoundDuration=Math.max(noteDuration.UntilTieEnd,noteDuration.LetRingEnd);this._handler.AddNote(track.Index,noteStart,noteSoundDuration,system.Convert.ToUInt8(noteKey),dynamicValue,system.Convert.ToUInt8(channel))}},GetNoteDuration:function(note,duration){var durationWithEffects=new alphaTab.audio.generator.MidiNoteDuration;if(durationWithEffects.NoteOnly=duration,durationWithEffects.UntilTieEnd=duration,durationWithEffects.LetRingEnd=duration,note.IsDead)return durationWithEffects.NoteOnly=this.ApplyStaticDuration(30,duration),durationWithEffects.UntilTieEnd=durationWithEffects.NoteOnly,durationWithEffects.LetRingEnd=durationWithEffects.NoteOnly,durationWithEffects;if(note.IsPalmMute)return durationWithEffects.NoteOnly=this.ApplyStaticDuration(80,duration),durationWithEffects.UntilTieEnd=durationWithEffects.NoteOnly,durationWithEffects.LetRingEnd=durationWithEffects.NoteOnly,durationWithEffects;if(note.IsStaccato)return durationWithEffects.NoteOnly=duration/2|0,durationWithEffects.UntilTieEnd=durationWithEffects.NoteOnly,durationWithEffects.LetRingEnd=durationWithEffects.NoteOnly,durationWithEffects;if(note.IsTieOrigin){var endNote=note.TieDestination;if(null!=endNote)if(note.IsTieDestination){var tieDestinationDuration1=this.GetNoteDuration(endNote,endNote.Beat.PlaybackDuration);durationWithEffects.UntilTieEnd=duration+tieDestinationDuration1.UntilTieEnd}else{var startTick=note.Beat.get_AbsolutePlaybackStart(),tieDestinationDuration=this.GetNoteDuration(endNote,endNote.Beat.PlaybackDuration),endTick=endNote.Beat.get_AbsolutePlaybackStart()+tieDestinationDuration.UntilTieEnd;durationWithEffects.UntilTieEnd=endTick-startTick}}if(note.IsLetRing&&0==this._settings.DisplayMode){for(var lastLetRingBeat=note.Beat,letRingEnd=0,maxDuration=note.Beat.Voice.Bar.get_MasterBar().CalculateDuration();null!=lastLetRingBeat.NextBeat;){var next=lastLetRingBeat.NextBeat;if(next.get_IsRest())break;if(note.get_IsStringed()&&next.HasNoteOnString(note.String))break;if((letRingEnd=(lastLetRingBeat=lastLetRingBeat.NextBeat).get_AbsolutePlaybackStart()-note.Beat.get_AbsolutePlaybackStart()+lastLetRingBeat.PlaybackDuration)>maxDuration){letRingEnd=maxDuration;break}}lastLetRingBeat==note.Beat?durationWithEffects.LetRingEnd=duration:durationWithEffects.LetRingEnd=letRingEnd}else durationWithEffects.LetRingEnd=durationWithEffects.UntilTieEnd;return durationWithEffects},ApplyStaticDuration:function(duration,maximum){var value=this._currentTempo*duration/60|0;return Math.min(value,maximum)},GetDynamicValue:function(note){var dynamicValue=note.Dynamic;2!=note.Beat.Voice.Bar.Staff.StaffKind&&null!=note.HammerPullOrigin&&--dynamicValue,note.IsGhost&&--dynamicValue;switch(note.Accentuated){case 1:++dynamicValue;break;case 2:dynamicValue+=2}return dynamicValue},GenerateFadeIn:function(note,noteStart,noteDuration,noteKey,dynamicValue){for(var track=note.Beat.Voice.Bar.Staff.Track,endVolume=alphaTab.audio.generator.MidiFileGenerator.ToChannelShort(track.PlaybackInfo.Volume),volumeFactor=js.Boot.__cast(endVolume,Float)/noteDuration.NoteOnly,steps=noteDuration.NoteOnly/120|0,endTick=noteStart+noteDuration.NoteOnly,i=steps-1;i>=0;){var tick=endTick-120*i,volume=(tick-noteStart)*volumeFactor;i==steps-1&&(this._handler.AddControlChange(track.Index,noteStart,system.Convert.ToUInt8(track.PlaybackInfo.PrimaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume))),this._handler.AddControlChange(track.Index,noteStart,system.Convert.ToUInt8(track.PlaybackInfo.SecondaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume)))),this._handler.AddControlChange(track.Index,tick,system.Convert.ToUInt8(track.PlaybackInfo.PrimaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume))),this._handler.AddControlChange(track.Index,tick,system.Convert.ToUInt8(track.PlaybackInfo.SecondaryChannel),system.Convert.ToUInt8(7),system.Convert.ToUInt8(system.Convert.ToInt32_Single(volume))),--i}},GenerateVibrato:function(note,noteStart,noteDuration,noteKey,dynamicValue,channel){var phaseLength,bendAmplitude;switch(note.Vibrato){case 1:phaseLength=this._settings.Vibrato.NoteSlightLength,bendAmplitude=this._settings.Vibrato.NoteSlightAmplitude;break;case 2:phaseLength=this._settings.Vibrato.NoteWideLength,bendAmplitude=this._settings.Vibrato.NoteWideAmplitude;break;default:return}var track=note.Beat.Voice.Bar.Staff.Track;this.GenerateVibratorWithParams(track,noteStart,noteDuration.NoteOnly,phaseLength,bendAmplitude,channel)},GenerateVibratorWithParams:function(track,noteStart,noteDuration,phaseLength,bendAmplitude,channel){for(var phaseHalf=phaseLength/2|0,noteEnd=(noteStart+=phaseLength)+noteDuration;noteStart0&&!note.IsContinuedBend&&--noteStart;var playedBendPoints=[];switch(note.BendType){case 1:playedBendPoints=bendPoints;break;case 2:case 3:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[1].Value));break;case 2:return void(3==note.Beat.GraceType?this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!0,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value])):this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value])))}break;case 4:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,note.BendPoints[1].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[2].Value));break;case 2:return void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value,note.BendPoints[2].Value]))}break;case 5:case 6:playedBendPoints=bendPoints;break;case 7:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[1].Value));break;case 2:var preBendValue=64+2.75*note.BendPoints[0].Value;return this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Single(preBendValue))),void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value]))}break;case 8:switch(note.BendStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,note.BendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,note.BendPoints[1].Value));break;case 2:var preBendValue1=64+2.75*note.BendPoints[0].Value;return this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Single(preBendValue1))),void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!0,new Int32Array([note.BendPoints[0].Value,note.BendPoints[1].Value]))}}this.GenerateWhammyOrBend(noteStart,channel,duration,playedBendPoints,track)},GenerateSongBookWhammyOrBend:function(noteStart,channel,duration,track,bendAtBeginning,bendValues){var durationBySetting;if(null==this._settings)durationBySetting=duration;else{var this1=alphaTab.audio.MidiUtils.MillisToTicks(this._settings.SongBookBendDuration,this._currentTempo);durationBySetting=Math.min(duration,this1)}var startTick;if(bendAtBeginning){startTick=noteStart}else startTick=noteStart+duration-durationBySetting;for(var ticksBetweenPoints=durationBySetting/(bendValues.length-1),i=0;i0&&!beat.IsContinuedWhammy&&--noteStart;var playedBendPoints=[];switch(beat.WhammyBarType){case 1:playedBendPoints=bendPoints;break;case 2:switch(beat.WhammyStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,bendPoints[1].Value));break;case 2:return void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([bendPoints[0].Value,bendPoints[1].Value]))}break;case 3:switch(beat.WhammyStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,bendPoints[1].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,bendPoints[2].Value));break;case 2:return void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!0,new Int32Array([bendPoints[0].Value,bendPoints[1].Value,bendPoints[2].Value]))}break;case 4:case 5:playedBendPoints=bendPoints;break;case 6:switch(beat.WhammyStyle){case 0:playedBendPoints=bendPoints;break;case 1:playedBendPoints.push(new alphaTab.model.BendPoint(0,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(30,bendPoints[0].Value)),playedBendPoints.push(new alphaTab.model.BendPoint(60,bendPoints[1].Value));break;case 2:var preDiveValue=64+2.75*bendPoints[0].Value;return this._handler.AddBend(track.Index,noteStart,system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Single(preDiveValue))),void this.GenerateSongBookWhammyOrBend(noteStart,channel,duration,track,!1,new Int32Array([bendPoints[0].Value,bendPoints[1].Value]))}}this.GenerateWhammyOrBend(noteStart,channel,duration,playedBendPoints,track)},GenerateWhammyOrBend:function(noteStart,channel,duration,playedBendPoints,track){for(var ticksPerPosition=duration/60,i=0;inextBendValue)for(;currentBendValue>=nextBendValue;){var this2=currentBendValue;this._handler.AddBend(track.Index,system.Convert.ToInt32_Double(currentTick),system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Double(Math.round(this2)))),--currentBendValue,currentTick+=ticksPerValue}else{var this3=currentBendValue;this._handler.AddBend(track.Index,system.Convert.ToInt32_Double(currentTick),system.Convert.ToUInt8(channel),system.Convert.ToUInt8(system.Convert.ToInt32_Double(Math.round(this3))))}},GenerateTrill:function(note,noteStart,noteDuration,noteKey,dynamicValue,channel){for(var track=note.Beat.Voice.Bar.Staff.Track,trillKey=note.get_StringTuning()+note.get_TrillFret(),trillLength=alphaTab.audio.MidiUtils.ToTicks(note.TrillSpeed),realKey=!0,tick=noteStart,end=noteStart+noteDuration.UntilTieEnd;tick+10=end&&(trillLength=end-tick),this._handler.AddNote(track.Index,tick,trillLength,system.Convert.ToUInt8(realKey?trillKey:noteKey),dynamicValue,system.Convert.ToUInt8(channel)),realKey=!realKey,tick+=trillLength},GenerateTremoloPicking:function(note,noteStart,noteDuration,noteKey,dynamicValue,channel){for(var track=note.Beat.Voice.Bar.Staff.Track,tpLength=alphaTab.audio.MidiUtils.ToTicks(note.Beat.TremoloSpeed),tick=noteStart,end=noteStart+noteDuration.UntilTieEnd;tick+10=end&&(tpLength=end-tick),this._handler.AddNote(track.Index,tick,tpLength,system.Convert.ToUInt8(noteKey),dynamicValue,system.Convert.ToUInt8(channel)),tick+=tpLength},GetBrushInfo:function(beat){var brushInfo=new Int32Array(beat.Voice.Bar.Staff.Tuning.length);if(0!=beat.BrushType){for(var stringUsed=0,stringCount=0,i=0,j=beat.Notes.length;i0)for(var brushMove=0,brushIncrement=beat.BrushDuration/(stringCount-1)|0,i1=0,j1=beat.Voice.Bar.Staff.Tuning.length;i1=this._score.MasterBars.length},ProcessCurrent:function(){var masterBar=this._score.MasterBars[this.Index],masterBarAlternateEndings=masterBar.AlternateEndings;masterBar.RepeatGroup.IsClosed||masterBar.RepeatGroup.Openings[masterBar.RepeatGroup.Openings.length-1]!=masterBar||(this._repeatNumber=0,this._repeatOpen=!1),!masterBar.IsRepeatStart&&0!=masterBar.Index||0!=this._repeatNumber?masterBar.IsRepeatStart&&(this.ShouldPlay=!0):(this._repeatStartIndex=this.Index,this._repeatOpen=!0),this._repeatOpen&&masterBarAlternateEndings>0&&(0==(masterBarAlternateEndings&1<0?this._repeatNumber>8&255),p1.Zones[i].Generators.length>1&&44==p1.Zones[i].Generators[1].GeneratorType&&(presetLoVel=alphaTab.platform.Platform.ToUInt8(255&p1.Zones[i].Generators[1].get_AmountInt16()),presetHiVel=alphaTab.platform.Platform.ToUInt8(p1.Zones[i].Generators[1].get_AmountInt16()>>8&255))):44==p1.Zones[i].Generators[0].GeneratorType&&(presetLoVel=alphaTab.platform.Platform.ToUInt8(255&p1.Zones[i].Generators[0].get_AmountInt16()),presetHiVel=alphaTab.platform.Platform.ToUInt8(p1.Zones[i].Generators[0].get_AmountInt16()>>8&255)),41==p1.Zones[i].Generators[p1.Zones[i].Generators.length-1].GeneratorType)for(var insts=sfinsts[p1.Zones[i].Generators[p1.Zones[i].Generators.length-1].get_AmountInt16()],inst=HxOverrides.iter(insts);inst.hasNext();){var instLoKey,instHiKey,instLoVel,instHiVel,inst1=inst.next();if(instLoKey=alphaTab.platform.Platform.ToUInt8(255&inst1.Generators[43]),instHiKey=alphaTab.platform.Platform.ToUInt8(inst1.Generators[43]>>8&255),instLoVel=alphaTab.platform.Platform.ToUInt8(255&inst1.Generators[44]),instHiVel=alphaTab.platform.Platform.ToUInt8(inst1.Generators[44]>>8&255),instLoKey<=presetHiKey&&presetLoKey<=instHiKey&&instLoVel<=presetHiVel&&presetLoVel<=instHiVel){var r=new alphaTab.audio.synth.sf2.Sf2Region,src=inst1.Generators,dst=r.Generators,count=r.Generators.length;dst.set(src.subarray(0,0+count),0),this.ReadSf2Region(r,globalGens,p1.Zones[i].Generators,!0),regionList.push(r)}}++i}var mp=new alphaTab.audio.synth.bank.patch.MultiPatch(p1.Name);mp.LoadSf2(regionList,this._assets),this._assets.PatchAssets.push(new alphaTab.audio.synth.bank.PatchAsset(mp.Name,mp)),this.AssignPatchToBank(mp,p1.BankNumber,p1.PatchNumber,p1.PatchNumber)}},ReadSf2Instruments:function(instruments){for(var size=instruments.length,regions=new Array(size),x=0;x>8&255),lo_b=alphaTab.platform.Platform.ToUInt8(255&genList[x3].get_AmountInt16()),hi_b=alphaTab.platform.Platform.ToUInt8(genList[x3].get_AmountInt16()>>8&255),(lo_a=Math.max(lo_a,lo_b))>(hi_a=Math.min(hi_a,hi_b)))throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid sf2 region. The range generators do not intersect."));region.Generators[value]=alphaTab.platform.Platform.ToInt16(lo_a|hi_a<<8)}else region.Generators[value]=alphaTab.platform.Platform.ToInt16(region.Generators[value]+genList[x3].get_AmountInt16());++x3}}}else{if(null!=globals)for(var x=0;xendRange){var range=startRange;startRange=endRange,endRange=range}if(startRange<0||startRange>=128)throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("startRange out of range"));if(endRange<0||endRange>=128)throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("endRange out of range"));var patches;if(this._bank.hasOwnProperty(bankNumber))patches=this._bank[bankNumber];else{patches=new Array(128),this._bank[bankNumber]=patches}for(var x=startRange;x<=endRange;)patches[x]=patch,++x}},__class__:alphaTab.audio.synth.bank.PatchBank},alphaTab.audio.synth.bank.PcmData=$hx_exports.alphaTab.audio.synth.bank.PcmData=function(bits,pcmData,isDataInLittleEndianFormat){this.Data=null,this.Length=0,this.BytesPerSample=0,this.BytesPerSample=system.Convert.ToUInt8(bits/8|0),this.Data=pcmData,this.Length=this.Data.length/this.BytesPerSample|0,isDataInLittleEndianFormat||alphaTab.audio.synth.util.SynthHelper.SwapEndianess(this.Data,bits)},alphaTab.audio.synth.bank.PcmData.__name__=["alphaTab","audio","synth","bank","PcmData"],alphaTab.audio.synth.bank.PcmData.Create=function(bits,pcmData,isDataInLittleEndianFormat){switch(bits){case 8:return new alphaTab.audio.synth.bank.PcmData8Bit(bits,pcmData,isDataInLittleEndianFormat);case 16:return new alphaTab.audio.synth.bank.PcmData16Bit(bits,pcmData,isDataInLittleEndianFormat);case 24:return new alphaTab.audio.synth.bank.PcmData24Bit(bits,pcmData,isDataInLittleEndianFormat);case 32:return new alphaTab.audio.synth.bank.PcmData32Bit(bits,pcmData,isDataInLittleEndianFormat);default:throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid PCM format. "+bits+"bit pcm data is not supported."))}},alphaTab.audio.synth.bank.PcmData.prototype={get_BitsPerSample:function(){return 8*this.BytesPerSample},get_Item:function(index){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.audio.synth.bank.PcmData},alphaTab.audio.synth.bank.PcmData16Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData16Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData16Bit.__name__=["alphaTab","audio","synth","bank","PcmData16Bit"],alphaTab.audio.synth.bank.PcmData16Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData16Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){index*=2;return((this.Data[index]|this.Data[index+1]<<8)<<16>>16)/32768},__class__:alphaTab.audio.synth.bank.PcmData16Bit}),alphaTab.audio.synth.bank.PcmData24Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData24Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData24Bit.__name__=["alphaTab","audio","synth","bank","PcmData24Bit"],alphaTab.audio.synth.bank.PcmData24Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData24Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){index*=3;return((this.Data[index]|this.Data[index+1]<<8|this.Data[index+2]<<16)<<12>>12)/8388608},__class__:alphaTab.audio.synth.bank.PcmData24Bit}),alphaTab.audio.synth.bank.PcmData32Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData32Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData32Bit.__name__=["alphaTab","audio","synth","bank","PcmData32Bit"],alphaTab.audio.synth.bank.PcmData32Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData32Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){index*=4;return(this.Data[index]|this.Data[index+1]<<8|this.Data[index+2]<<16|this.Data[index+3]<<24)/2147483648},__class__:alphaTab.audio.synth.bank.PcmData32Bit}),alphaTab.audio.synth.bank.PcmData8Bit=$hx_exports.alphaTab.audio.synth.bank.PcmData8Bit=function(bits,pcmData,isDataInLittleEndianFormat){alphaTab.audio.synth.bank.PcmData.call(this,bits,pcmData,isDataInLittleEndianFormat)},alphaTab.audio.synth.bank.PcmData8Bit.__name__=["alphaTab","audio","synth","bank","PcmData8Bit"],alphaTab.audio.synth.bank.PcmData8Bit.__super__=alphaTab.audio.synth.bank.PcmData,alphaTab.audio.synth.bank.PcmData8Bit.prototype=$extend(alphaTab.audio.synth.bank.PcmData.prototype,{get_Item:function(index){return this.Data[index]/255*2-1},__class__:alphaTab.audio.synth.bank.PcmData8Bit}),alphaTab.audio.synth.bank.SampleDataAsset=$hx_exports.alphaTab.audio.synth.bank.SampleDataAsset=function(sample,sampleData){this.Name=null,this.Channels=0,this.SampleRate=0,this.RootKey=0,this.Tune=0,this.Start=0,this.End=0,this.LoopStart=0,this.LoopEnd=0,this.SampleData=null,this.Channels=1,this.Name=sample.Name,this.SampleRate=sample.SampleRate,this.RootKey=sample.RootKey,this.Tune=sample.Tune;var this1=sample.Start;this.Start=this1;var this2=sample.End;this.End=this2;var this3=sample.StartLoop;this.LoopStart=this3;var this4=sample.EndLoop;if(this.LoopEnd=this4,0!=(16&sample.SoundFontSampleLink))throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Ogg Vobis encoded soundfonts not supported"));this.SampleData=alphaTab.audio.synth.bank.PcmData.Create(sampleData.BitsPerSample,sampleData.SampleData,!0)},alphaTab.audio.synth.bank.SampleDataAsset.__name__=["alphaTab","audio","synth","bank","SampleDataAsset"],alphaTab.audio.synth.bank.SampleDataAsset.prototype={__class__:alphaTab.audio.synth.bank.SampleDataAsset},alphaTab.audio.synth.bank.components._EnvelopeState={},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_={},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.__name__=["alphaTab","audio","synth","bank","components","_EnvelopeState","EnvelopeState_Impl_"],alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.toString=function(this1){switch(this1){case 0:return"Delay";case 1:return"Attack";case 2:return"Hold";case 3:return"Decay";case 4:return"Sustain";case 5:return"Release";case 6:return"None"}return""},alphaTab.audio.synth.bank.components._FilterType={},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_={},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.__name__=["alphaTab","audio","synth","bank","components","_FilterType","FilterType_Impl_"],alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"BiquadLowpass";case 2:return"BiquadHighpass";case 3:return"OnePoleLowpass"}return""},alphaTab.audio.synth.bank.components._LfoState={},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_={},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.__name__=["alphaTab","audio","synth","bank","components","_LfoState","LfoState_Impl_"],alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.toString=function(this1){switch(this1){case 0:return"Delay";case 1:return"Sustain"}return""},alphaTab.audio.synth.bank.components._PanFormulaEnum={},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_=$hx_exports.alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_={},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.__name__=["alphaTab","audio","synth","bank","components","_PanFormulaEnum","PanFormulaEnum_Impl_"],alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.toString=function(this1){switch(this1){case 0:return"Neg3dBCenter";case 1:return"Neg6dBCenter";case 2:return"ZeroCenter"}return""},alphaTab.audio.synth.bank.components.generators._GeneratorState={},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_=$hx_exports.alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_={},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.__name__=["alphaTab","audio","synth","bank","components","generators","_GeneratorState","GeneratorState_Impl_"],alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.toString=function(this1){switch(this1){case 0:return"PreLoop";case 1:return"Loop";case 2:return"PostLoop";case 3:return"Finished"}return""},alphaTab.audio.synth.bank.components.generators._LoopMode={},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_=$hx_exports.alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_={},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.__name__=["alphaTab","audio","synth","bank","components","generators","_LoopMode","LoopMode_Impl_"],alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.toString=function(this1){switch(this1){case 0:return"NoLoop";case 1:return"OneShot";case 2:return"Continuous";case 3:return"LoopUntilNoteOff"}return""},alphaTab.audio.synth.bank.components.generators.SampleGenerator=$hx_exports.alphaTab.audio.synth.bank.components.generators.SampleGenerator=function(){alphaTab.audio.synth.bank.components.generators.Generator.call(this,new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),this.Samples=null},alphaTab.audio.synth.bank.components.generators.SampleGenerator.__name__=["alphaTab","audio","synth","bank","components","generators","SampleGenerator"],alphaTab.audio.synth.bank.components.generators.SampleGenerator.__super__=alphaTab.audio.synth.bank.components.generators.Generator,alphaTab.audio.synth.bank.components.generators.SampleGenerator.prototype=$extend(alphaTab.audio.synth.bank.components.generators.Generator.prototype,{GetValue:function(phase){return this.Samples.get_Item(system.Convert.ToInt32_Double(phase))},GetValues:function(generatorParams,blockBuffer,increment){for(var proccessed=0;;){var samplesAvailable=system.Convert.ToInt32_Double(Math.ceil((generatorParams.CurrentEnd-generatorParams.Phase)/increment));if(samplesAvailable>blockBuffer.length-proccessed)return void this.Interpolate(generatorParams,blockBuffer,increment,proccessed,blockBuffer.length);var endProccessed=proccessed+samplesAvailable;this.Interpolate(generatorParams,blockBuffer,increment,proccessed,endProccessed),proccessed=endProccessed;switch(generatorParams.CurrentState){case 0:generatorParams.CurrentStart=this.LoopStartPhase,generatorParams.CurrentEnd=this.LoopEndPhase,generatorParams.CurrentState=1;break;case 1:generatorParams.Phase=generatorParams.Phase+(generatorParams.CurrentStart-generatorParams.CurrentEnd);break;case 2:for(generatorParams.CurrentState=3;proccessed>8&255),loVel=alphaTab.platform.Platform.ToUInt8(255®ions[x].Generators[44]),hiVel=alphaTab.platform.Platform.ToUInt8(regions[x].Generators[44]>>8&255);var sf2=new alphaTab.audio.synth.bank.patch.Sf2Patch(this.Name+"_"+Std.string(x));sf2.Load(regions[x],assets),this._intervalList[x]=new alphaTab.audio.synth.bank.patch.PatchInterval(sf2,0,15,loKey,hiKey,loVel,hiVel),++x}this.DetermineIntervalType()},DetermineIntervalType:function(){for(var checkChannel=!1,checkVelocity=!1,x=0;x=this.StartChannel&&channel<=this.EndChannel&&key>=this.StartKey&&key<=this.EndKey&&(velocity>=this.StartVelocity&&velocity<=this.EndVelocity)},CheckChannelAndKey:function(channel,key){return channel>=this.StartChannel&&channel<=this.EndChannel&&(key>=this.StartKey&&key<=this.EndKey)},CheckKeyAndVelocity:function(key,velocity){return key>=this.StartKey&&key<=this.EndKey&&(velocity>=this.StartVelocity&&velocity<=this.EndVelocity)},CheckKey:function(key){return key>=this.StartKey&&key<=this.EndKey},__class__:alphaTab.audio.synth.bank.patch.PatchInterval},alphaTab.audio.synth.bank.patch.Sf2Patch=$hx_exports.alphaTab.audio.synth.bank.patch.Sf2Patch=function(name){alphaTab.audio.synth.bank.patch.Patch.call(this,name),this.iniFilterFc=0,this.filterQ=0,this.initialAttn=0,this.keyOverride=0,this.velOverride=0,this.keynumToModEnvHold=0,this.keynumToModEnvDecay=0,this.keynumToVolEnvHold=0,this.keynumToVolEnvDecay=0,this.pan=null,this.modLfoToPitch=0,this.vibLfoToPitch=0,this.modEnvToPitch=0,this.modLfoToFilterFc=0,this.modEnvToFilterFc=0,this.modLfoToVolume=0,this.gen=null,this.mod_env=null,this.vel_env=null,this.mod_lfo=null,this.vib_lfo=null,this.fltr=null},alphaTab.audio.synth.bank.patch.Sf2Patch.__name__=["alphaTab","audio","synth","bank","patch","Sf2Patch"],alphaTab.audio.synth.bank.patch.Sf2Patch.CalculateModulator=function(s,t,d,p,value,min,max){var i,output=0;switch(value-=min,max-=min,1==d&&(value=max-value),s){case 0:output=value/max|0;break;case 1:i=127-value,output=Math.log(i*i/js.Boot.__cast(max*max,Float))/Math.log(10)*-.20833333333333334;break;case 2:i=value,output=1+Math.log(i*i/js.Boot.__cast(max*max,Float))/Math.log(10)*.20833333333333334;break;case 3:output=value<=(max/2|0)?0:1}return 1==p&&(output=2*output-1),2==t&&(output=Math.abs(output)),output},alphaTab.audio.synth.bank.patch.Sf2Patch.__super__=alphaTab.audio.synth.bank.patch.Patch,alphaTab.audio.synth.bank.patch.Sf2Patch.prototype=$extend(alphaTab.audio.synth.bank.patch.Patch.prototype,{Start:function(voiceparams){var note=this.keyOverride>-1?this.keyOverride:voiceparams.Note;this.velOverride>-1?this.velOverride:voiceparams.Velocity;voiceparams.GeneratorParams[0].QuickSetup(this.gen),voiceparams.Envelopes[0].QuickSetupSf2(voiceparams.SynthParams.Synth.SampleRate,note,this.keynumToModEnvHold,this.keynumToModEnvDecay,!1,this.mod_env),voiceparams.Envelopes[1].QuickSetupSf2(voiceparams.SynthParams.Synth.SampleRate,note,this.keynumToVolEnvHold,this.keynumToVolEnvDecay,!0,this.vel_env),voiceparams.Filters[0].Disable(),voiceparams.Lfos[0].QuickSetup(voiceparams.SynthParams.Synth.SampleRate,this.mod_lfo),voiceparams.Lfos[1].QuickSetup(voiceparams.SynthParams.Synth.SampleRate,this.vib_lfo),voiceparams.PitchOffset=(note-this.gen.RootKey)*this.gen.KeyTrack+this.gen.Tune,voiceparams.PitchOffset=voiceparams.PitchOffset+(100*(voiceparams.SynthParams.MasterCoarseTune+(voiceparams.SynthParams.MasterFineTune.get_Combined()-8192)/8192)|0),voiceparams.VolOffset=this.initialAttn;voiceparams.VolOffset=voiceparams.VolOffset-96*js.Boot.__cast(alphaTab.audio.synth.bank.patch.Sf2Patch.CalculateModulator(1,0,1,0,voiceparams.Velocity,0,127),Float);return voiceparams.VolOffset=voiceparams.VolOffset-96*js.Boot.__cast(alphaTab.audio.synth.bank.patch.Sf2Patch.CalculateModulator(1,0,1,0,voiceparams.SynthParams.Volume.get_Coarse(),0,127),Float),3!=voiceparams.GeneratorParams[0].CurrentState&&6!=voiceparams.Envelopes[1].CurrentStage},Stop:function(voiceparams){this.gen.Release(voiceparams.GeneratorParams[0]),1!=this.gen.LoopMode&&(voiceparams.Envelopes[0].Release(1e-38),voiceparams.Envelopes[1].ReleaseSf2VolumeEnvelope())},Process:function(voiceparams,startIndex,endIndex,isMuted,isSilentProcess){var basePitch=alphaTab.audio.synth.util.SynthHelper.CentsToPitch(voiceparams.SynthParams.CurrentPitch)*this.gen.Frequency*alphaTab.audio.synth.util.SynthHelper.CentsToPitch(voiceparams.PitchOffset)/voiceparams.SynthParams.Synth.SampleRate,baseVolume=voiceparams.SynthParams.Synth.MasterVolume*voiceparams.SynthParams.CurrentVolume*.35*voiceparams.SynthParams.MixVolume;if(isSilentProcess)voiceparams.State=0;else for(var x=startIndex;x13500&&(centsFc=13500),voiceparams.Filters[0].set_CutOff(alphaTab.audio.synth.util.SynthHelper.KeyToFrequency(centsFc/100,69)),voiceparams.Filters[0].CoeffNeedsUpdating?voiceparams.Filters[0].ApplyFilterInterp(voiceparams.BlockBuffer,voiceparams.SynthParams.Synth.SampleRate):voiceparams.Filters[0].ApplyFilter_SampleArray(voiceparams.BlockBuffer)}var this1=voiceparams.VolOffset+voiceparams.Envelopes[1].Value+voiceparams.Lfos[0].Value*this.modLfoToVolume,volume=js.Boot.__cast(alphaTab.audio.synth.util.SynthHelper.DBtoLinear(this1),Float)*baseVolume;if(isMuted||voiceparams.MixMonoToStereoInterp(x,volume*this.pan.Left*voiceparams.SynthParams.CurrentPan.Left,volume*this.pan.Right*voiceparams.SynthParams.CurrentPan.Right),voiceparams.Envelopes[1].CurrentStage>2&&volume<=1e-5||3==voiceparams.GeneratorParams[0].CurrentState)return void(voiceparams.State=0);x+=128}},Load:function(region,assets){this.ExclusiveGroup=region.Generators[57],this.ExclusiveGroupTarget=this.ExclusiveGroup,this.iniFilterFc=region.Generators[8],this.filterQ=alphaTab.audio.synth.util.SynthHelper.DBtoLinear(region.Generators[9]/10);this.initialAttn=-region.Generators[48]/10,this.keyOverride=region.Generators[46],this.velOverride=region.Generators[47],this.keynumToModEnvHold=region.Generators[31],this.keynumToModEnvDecay=region.Generators[32],this.keynumToVolEnvHold=region.Generators[39],this.keynumToVolEnvDecay=region.Generators[40],this.pan=new alphaTab.audio.synth.bank.components.PanComponent;this.pan.SetValue(region.Generators[17]/500,0),this.modLfoToPitch=region.Generators[5],this.vibLfoToPitch=region.Generators[6],this.modEnvToPitch=region.Generators[7],this.modLfoToFilterFc=region.Generators[10],this.modEnvToFilterFc=region.Generators[11];this.modLfoToVolume=region.Generators[13]/10,this.LoadGen(region,assets),this.LoadEnvelopes(region),this.LoadLfos(region),this.LoadFilter(region)},LoadGen:function(region,assets){var this1=region.Generators[53],sda=assets.SampleAssets[this1];this.gen=new alphaTab.audio.synth.bank.components.generators.SampleGenerator;var this2=sda.End+region.Generators[1]+32768*region.Generators[12];this.gen.EndPhase=this2;var this3=sda.SampleRate;this.gen.Frequency=this3,this.gen.KeyTrack=region.Generators[56];var this4=sda.LoopEnd+region.Generators[3]+32768*region.Generators[50];this.gen.LoopEndPhase=this4;switch(3®ion.Generators[54]){case 1:this.gen.LoopMode=2;break;case 0:case 2:this.gen.LoopMode=0;break;case 3:this.gen.LoopMode=3}var this5=sda.LoopStart+region.Generators[2]+32768*region.Generators[45];this.gen.LoopStartPhase=this5,this.gen.Offset=0,this.gen.Period=1,region.Generators[58]>-1?this.gen.RootKey=region.Generators[58]:this.gen.RootKey=sda.RootKey;var this6=sda.Start+region.Generators[0]+32768*region.Generators[4];this.gen.StartPhase=this6;var this7=region.Generators[52],tmp=system.Convert.ToInt16(sda.Tune+this7+100*region.Generators[51]);this.gen.Tune=tmp,this.gen.VelocityTrack=0,js.Boot.__cast(this.gen,alphaTab.audio.synth.bank.components.generators.SampleGenerator).Samples=sda.SampleData},LoadEnvelopes:function(region){this.mod_env=new alphaTab.audio.synth.bank.descriptors.EnvelopeDescriptor,this.mod_env.AttackTime=js.Boot.__cast(Math.pow(2,region.Generators[26]/1200),Float),this.mod_env.AttackGraph=3,this.mod_env.DecayTime=js.Boot.__cast(Math.pow(2,region.Generators[28]/1200),Float),this.mod_env.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[25]/1200),Float),this.mod_env.HoldTime=js.Boot.__cast(Math.pow(2,region.Generators[27]/1200),Float),this.mod_env.PeakLevel=1,this.mod_env.ReleaseTime=js.Boot.__cast(Math.pow(2,region.Generators[30]/1200),Float),this.mod_env.StartLevel=0;var tmp=alphaTab.audio.synth.util.SynthHelper.ClampS(region.Generators[29],0,1e3);this.mod_env.SustainLevel=1-tmp/1e3;if(this.mod_env.AttackTime<.001)this.mod_env.AttackTime=.001;else{this.mod_env.AttackTime>100&&(this.mod_env.AttackTime=100)}if(this.mod_env.DecayTime<.001)this.mod_env.DecayTime=0;else{this.mod_env.DecayTime>100&&(this.mod_env.DecayTime=100)}if(this.mod_env.DelayTime<.001)this.mod_env.DelayTime=0;else{this.mod_env.DelayTime>20&&(this.mod_env.DelayTime=20)}if(this.mod_env.HoldTime<.001)this.mod_env.HoldTime=0;else{this.mod_env.HoldTime>20&&(this.mod_env.HoldTime=20)}if(this.mod_env.ReleaseTime<.001)this.mod_env.ReleaseTime=.001;else{this.mod_env.ReleaseTime>100&&(this.mod_env.ReleaseTime=100)}this.vel_env=new alphaTab.audio.synth.bank.descriptors.EnvelopeDescriptor,this.vel_env.AttackTime=js.Boot.__cast(Math.pow(2,region.Generators[34]/1200),Float),this.vel_env.AttackGraph=3,this.vel_env.DecayTime=js.Boot.__cast(Math.pow(2,region.Generators[36]/1200),Float),this.vel_env.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[33]/1200),Float),this.vel_env.HoldTime=js.Boot.__cast(Math.pow(2,region.Generators[35]/1200),Float),this.vel_env.PeakLevel=0,this.vel_env.ReleaseTime=js.Boot.__cast(Math.pow(2,region.Generators[38]/1200),Float),this.vel_env.StartLevel=-100;var this13=alphaTab.audio.synth.util.SynthHelper.ClampS(region.Generators[37],0,1e3)/-10|0;this.vel_env.SustainLevel=this13;if(this.vel_env.AttackTime<.001)this.vel_env.AttackTime=.001;else{this.vel_env.AttackTime>100&&(this.vel_env.AttackTime=100)}if(this.vel_env.DecayTime<.001)this.vel_env.DecayTime=0;else{this.vel_env.DecayTime>100&&(this.vel_env.DecayTime=100)}if(this.vel_env.DelayTime<.001)this.vel_env.DelayTime=0;else{this.vel_env.DelayTime>20&&(this.vel_env.DelayTime=20)}if(this.vel_env.HoldTime<.001)this.vel_env.HoldTime=0;else{this.vel_env.HoldTime>20&&(this.vel_env.HoldTime=20)}if(this.vel_env.ReleaseTime<.001)this.vel_env.ReleaseTime=.001;else{this.vel_env.ReleaseTime>100&&(this.vel_env.ReleaseTime=100)}},LoadLfos:function(region){this.mod_lfo=new alphaTab.audio.synth.bank.descriptors.LfoDescriptor,this.mod_lfo.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[21]/1200),Float),this.mod_lfo.Frequency=js.Boot.__cast(8.176*Math.pow(2,region.Generators[22]/1200),Float),this.mod_lfo.Generator=alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSine,this.vib_lfo=new alphaTab.audio.synth.bank.descriptors.LfoDescriptor,this.vib_lfo.DelayTime=js.Boot.__cast(Math.pow(2,region.Generators[23]/1200),Float),this.vib_lfo.Frequency=js.Boot.__cast(8.176*Math.pow(2,region.Generators[24]/1200),Float),this.vib_lfo.Generator=alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSine},LoadFilter:function(region){this.fltr=new alphaTab.audio.synth.bank.descriptors.FilterDescriptor,this.fltr.FilterMethod=1,this.fltr.CutOff=js.Boot.__cast(alphaTab.audio.synth.util.SynthHelper.KeyToFrequency(region.Generators[8]/100,69),Float),this.fltr.Resonance=js.Boot.__cast(alphaTab.audio.synth.util.SynthHelper.DBtoLinear(region.Generators[9]/10),Float)},__class__:alphaTab.audio.synth.bank.patch.Sf2Patch}),alphaTab.audio.synth.ds.CircularSampleBuffer=$hx_exports.alphaTab.audio.synth.ds.CircularSampleBuffer=function(size){this._buffer=null,this._writePosition=0,this._readPosition=0,this.Count=0;var this1=new Float32Array(size);this._buffer=this1,this._writePosition=0,this._readPosition=0,this.Count=0},alphaTab.audio.synth.ds.CircularSampleBuffer.__name__=["alphaTab","audio","synth","ds","CircularSampleBuffer"],alphaTab.audio.synth.ds.CircularSampleBuffer.prototype={Clear:function(){this._readPosition=0,this._writePosition=0,this.Count=0;var this1=new Float32Array(this._buffer.length);this._buffer=this1},Write:function(data,offset,count){var samplesWritten=0;count>this._buffer.length-this.Count&&(count=this._buffer.length-this.Count);var writeToEnd=Math.min(this._buffer.length-this._writePosition,count),destPos=this._writePosition;if(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(this._buffer).set(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(data).subarray(offset,offset+writeToEnd),destPos),this._writePosition=this._writePosition+writeToEnd,this._writePosition=this._writePosition%this._buffer.length,(samplesWritten+=writeToEnd)this.Count&&(count=this.Count);var samplesRead=0,readToEnd=Math.min(this._buffer.length-this._readPosition,count),src=this._buffer,srcPos=this._readPosition;if(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(data).set(alphaTab.audio.synth.ds._SampleArray.SampleArray_Impl_.ToFloat32Array(src).subarray(srcPos,srcPos+readToEnd),offset),samplesRead+=readToEnd,this._readPosition=this._readPosition+readToEnd,this._readPosition=this._readPosition%this._buffer.length,samplesRead>=7)>0;);for(;n>0;)--n>0?s.WriteByte(system.Convert.ToUInt8(128|array[n])):s.WriteByte(array[n])},alphaTab.audio.synth.midi.MidiFile.prototype={AddEvent:function(e){if(0==this.Events.length)this.Events.push(e);else{for(var insertPos=this.Events.length;insertPos>0;){if(!(this.Events[insertPos-1].Tick>e.Tick))break;--insertPos}this.Events.splice(insertPos,0,e)}},ToBinary:function(){var data=alphaTab.io.ByteBuffer.Empty();return this.WriteTo(data),data.ToArray()},WriteTo:function(s){var b=new Uint8Array([77,84,104,100]);s.Write(b,0,b.length),b=new Uint8Array([0,0,0,6]),s.Write(b,0,b.length),b=new Uint8Array([0,0]),s.Write(b,0,b.length);var v=1;b=new Uint8Array([system.Convert.ToUInt8(v>>8&255),system.Convert.ToUInt8(255&v)]),s.Write(b,0,b.length),v=system.Convert.ToInt16(960),b=new Uint8Array([system.Convert.ToUInt8(v>>8&255),system.Convert.ToUInt8(255&v)]),s.Write(b,0,b.length);for(var trackData=alphaTab.io.ByteBuffer.Empty(),previousTick=0,midiEvent=$iterator(this.Events)();midiEvent.hasNext();){var midiEvent1=midiEvent.next(),delta=midiEvent1.Tick-previousTick;alphaTab.audio.synth.midi.MidiFile.WriteVariableInt(trackData,delta),midiEvent1.WriteTo(trackData),previousTick=midiEvent1.Tick}b=new Uint8Array([77,84,114,107]),s.Write(b,0,b.length);var data=trackData.ToArray(),l=data.length;b=new Uint8Array([system.Convert.ToUInt8(l>>24&255),system.Convert.ToUInt8(l>>16&255),system.Convert.ToUInt8(l>>8&255),system.Convert.ToUInt8(255&l)]),s.Write(b,0,b.length),s.Write(data,0,data.length)},__class__:alphaTab.audio.synth.midi.MidiFile},alphaTab.audio.synth.midi.MidiHelper=$hx_exports.alphaTab.audio.synth.midi.MidiHelper=function(){},alphaTab.audio.synth.midi.MidiHelper.__name__=["alphaTab","audio","synth","midi","MidiHelper"],alphaTab.audio.synth.midi.event={},alphaTab.audio.synth.midi.event._ControllerType={},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_={},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.__name__=["alphaTab","audio","synth","midi","event","_ControllerType","ControllerType_Impl_"],alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.toString=function(this1){switch(this1){case 0:return"BankSelectCoarse";case 1:return"ModulationCoarse";case 6:return"DataEntryCoarse";case 7:return"VolumeCoarse";case 10:return"PanCoarse";case 11:return"ExpressionControllerCoarse";case 33:return"ModulationFine";case 38:return"DataEntryFine";case 39:return"VolumeFine";case 42:return"PanFine";case 43:return"ExpressionControllerFine";case 64:return"HoldPedal";case 68:return"LegatoPedal";case 98:return"NonRegisteredParameterFine";case 99:return"NonRegisteredParameterCourse";case 100:return"RegisteredParameterFine";case 101:return"RegisteredParameterCourse";case 121:return"ResetControllers";case 123:return"AllNotesOff"}return""},alphaTab.audio.synth.midi.event.MidiEvent=$hx_exports.alphaTab.audio.synth.midi.event.MidiEvent=function(tick,status,data1,data2){this.Message=0,this.Tick=0,this.Tick=tick,this.Message=status|data1<<8|data2<<16},alphaTab.audio.synth.midi.event.MidiEvent.__name__=["alphaTab","audio","synth","midi","event","MidiEvent"],alphaTab.audio.synth.midi.event.MidiEvent.prototype={get_Channel:function(){return 15&this.Message},get_Command:function(){return js.Boot.__cast(240&this.Message,Int)},get_Data1:function(){return(65280&this.Message)>>8},set_Data1:function(value){return this.Message=-65281&this.Message,this.Message=this.Message|value<<8,this.get_Data1()},get_Data2:function(){return(16711680&this.Message)>>16},set_Data2:function(value){return this.Message=-16711681&this.Message,this.Message=this.Message|value<<16,this.get_Data2()},WriteTo:function(s){var b=new Uint8Array([system.Convert.ToUInt8(this.Message>>24&255),system.Convert.ToUInt8(this.Message>>16&255),system.Convert.ToUInt8(this.Message>>8&255),system.Convert.ToUInt8(255&this.Message)]);s.Write(b,0,b.length)},__class__:alphaTab.audio.synth.midi.event.MidiEvent},alphaTab.audio.synth.midi.event.MetaEvent=$hx_exports.alphaTab.audio.synth.midi.event.MetaEvent=function(delta,status,data1,data2){alphaTab.audio.synth.midi.event.MidiEvent.call(this,delta,status,data1,data2)},alphaTab.audio.synth.midi.event.MetaEvent.__name__=["alphaTab","audio","synth","midi","event","MetaEvent"],alphaTab.audio.synth.midi.event.MetaEvent.__super__=alphaTab.audio.synth.midi.event.MidiEvent,alphaTab.audio.synth.midi.event.MetaEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MidiEvent.prototype,{get_Channel:function(){return-1},get_Command:function(){return js.Boot.__cast(255&this.Message,Int)},get_MetaStatus:function(){return this.get_Data1()},__class__:alphaTab.audio.synth.midi.event.MetaEvent}),alphaTab.audio.synth.midi.event.MetaDataEvent=$hx_exports.alphaTab.audio.synth.midi.event.MetaDataEvent=function(delta,status,metaId,data){alphaTab.audio.synth.midi.event.MetaEvent.call(this,delta,status,metaId,0),this.Data=null,this.Data=data},alphaTab.audio.synth.midi.event.MetaDataEvent.__name__=["alphaTab","audio","synth","midi","event","MetaDataEvent"],alphaTab.audio.synth.midi.event.MetaDataEvent.__super__=alphaTab.audio.synth.midi.event.MetaEvent,alphaTab.audio.synth.midi.event.MetaDataEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MetaEvent.prototype,{WriteTo:function(s){s.WriteByte(255),s.WriteByte(system.Convert.ToUInt8(this.get_MetaStatus()));var l=this.Data.length;alphaTab.audio.synth.midi.MidiFile.WriteVariableInt(s,l),s.Write(this.Data,0,this.Data.length)},__class__:alphaTab.audio.synth.midi.event.MetaDataEvent}),alphaTab.audio.synth.midi.event._MetaEventTypeEnum={},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_={},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.__name__=["alphaTab","audio","synth","midi","event","_MetaEventTypeEnum","MetaEventTypeEnum_Impl_"],alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.toString=function(this1){switch(this1){case 0:return"SequenceNumber";case 1:return"TextEvent";case 2:return"CopyrightNotice";case 3:return"SequenceOrTrackName";case 4:return"InstrumentName";case 5:return"LyricText";case 6:return"MarkerText";case 7:return"CuePoint";case 8:return"PatchName";case 9:return"PortName";case 32:return"MidiChannel";case 33:return"MidiPort";case 47:return"EndOfTrack";case 81:return"Tempo";case 84:return"SmpteOffset";case 88:return"TimeSignature";case 89:return"KeySignature";case 127:return"SequencerSpecific"}return""},alphaTab.audio.synth.midi.event.MetaNumberEvent=$hx_exports.alphaTab.audio.synth.midi.event.MetaNumberEvent=function(delta,status,metaId,number){alphaTab.audio.synth.midi.event.MetaEvent.call(this,delta,status,metaId,0),this.Value=0,this.Value=number},alphaTab.audio.synth.midi.event.MetaNumberEvent.__name__=["alphaTab","audio","synth","midi","event","MetaNumberEvent"],alphaTab.audio.synth.midi.event.MetaNumberEvent.__super__=alphaTab.audio.synth.midi.event.MetaEvent,alphaTab.audio.synth.midi.event.MetaNumberEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MetaEvent.prototype,{WriteTo:function(s){s.WriteByte(255),s.WriteByte(system.Convert.ToUInt8(this.get_MetaStatus())),alphaTab.audio.synth.midi.MidiFile.WriteVariableInt(s,3);var b=new Uint8Array([system.Convert.ToUInt8(this.Value>>16&255),system.Convert.ToUInt8(this.Value>>8&255),system.Convert.ToUInt8(255&this.Value)]);s.Write(b,0,b.length)},__class__:alphaTab.audio.synth.midi.event.MetaNumberEvent}),alphaTab.audio.synth.midi.event._MidiEventType={},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_={},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.__name__=["alphaTab","audio","synth","midi","event","_MidiEventType","MidiEventType_Impl_"],alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.toString=function(this1){switch(this1){case 128:return"NoteOff";case 144:return"NoteOn";case 160:return"NoteAftertouch";case 176:return"Controller";case 192:return"ProgramChange";case 208:return"ChannelAftertouch";case 224:return"PitchBend";case 255:return"Meta"}return""},alphaTab.audio.synth.midi.event.SystemCommonEvent=$hx_exports.alphaTab.audio.synth.midi.event.SystemCommonEvent=function(delta,status,data1,data2){alphaTab.audio.synth.midi.event.MidiEvent.call(this,delta,status,data1,data2)},alphaTab.audio.synth.midi.event.SystemCommonEvent.__name__=["alphaTab","audio","synth","midi","event","SystemCommonEvent"],alphaTab.audio.synth.midi.event.SystemCommonEvent.__super__=alphaTab.audio.synth.midi.event.MidiEvent,alphaTab.audio.synth.midi.event.SystemCommonEvent.prototype=$extend(alphaTab.audio.synth.midi.event.MidiEvent.prototype,{get_Channel:function(){return-1},get_Command:function(){return js.Boot.__cast(255&this.Message,Int)},__class__:alphaTab.audio.synth.midi.event.SystemCommonEvent}),alphaTab.audio.synth.midi.event._SystemCommonTypeEnum={},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_=$hx_exports.alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_={},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.__name__=["alphaTab","audio","synth","midi","event","_SystemCommonTypeEnum","SystemCommonTypeEnum_Impl_"],alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.toString=function(this1){switch(this1){case 240:return"SystemExclusive";case 241:return"MtcQuarterFrame";case 242:return"SongPosition";case 243:return"SongSelect";case 246:return"TuneRequest";case 247:return"SystemExclusive2"}return""},alphaTab.audio.synth.midi.event.SystemExclusiveEvent=$hx_exports.alphaTab.audio.synth.midi.event.SystemExclusiveEvent=function(delta,status,id,data){alphaTab.audio.synth.midi.event.SystemCommonEvent.call(this,delta,status,system.Convert.ToUInt8(255&id),system.Convert.ToUInt8(id>>8)),this.Data=null,this.Data=data},alphaTab.audio.synth.midi.event.SystemExclusiveEvent.__name__=["alphaTab","audio","synth","midi","event","SystemExclusiveEvent"],alphaTab.audio.synth.midi.event.SystemExclusiveEvent.__super__=alphaTab.audio.synth.midi.event.SystemCommonEvent,alphaTab.audio.synth.midi.event.SystemExclusiveEvent.prototype=$extend(alphaTab.audio.synth.midi.event.SystemCommonEvent.prototype,{get_ManufacturerId:function(){return this.Message>>8},WriteTo:function(s){s.WriteByte(240);var l=this.Data.length+2;s.WriteByte(system.Convert.ToUInt8(this.get_ManufacturerId()));var b=new Uint8Array([system.Convert.ToUInt8(l>>24&255),system.Convert.ToUInt8(l>>16&255),system.Convert.ToUInt8(l>>8&255),system.Convert.ToUInt8(255&l)]);s.Write(b,0,b.length),s.WriteByte(247)},__class__:alphaTab.audio.synth.midi.event.SystemExclusiveEvent}),alphaTab.audio.synth.sf2={},alphaTab.audio.synth.sf2._DirectionEnum={},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_=$hx_exports.alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_={},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.__name__=["alphaTab","audio","synth","sf2","_DirectionEnum","DirectionEnum_Impl_"],alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.toString=function(this1){switch(this1){case 0:return"MinToMax";case 1:return"MaxToMin"}return""},alphaTab.audio.synth.sf2.Generator=$hx_exports.alphaTab.audio.synth.sf2.Generator=function(input){this._rawAmount=0,this.GeneratorType=0,this.GeneratorType=js.Boot.__cast(alphaTab.io.IOHelper.ReadUInt16LE(input),Int),this._rawAmount=alphaTab.io.IOHelper.ReadUInt16LE(input)},alphaTab.audio.synth.sf2.Generator.__name__=["alphaTab","audio","synth","sf2","Generator"],alphaTab.audio.synth.sf2.Generator.prototype={get_AmountInt16:function(){return alphaTab.platform.Platform.ToInt16(this._rawAmount)},set_AmountInt16:function(value){return this._rawAmount=alphaTab.platform.Platform.ToUInt16(value),this.get_AmountInt16()},get_LowByteAmount:function(){return alphaTab.platform.Platform.ToUInt8(255&this._rawAmount)},set_LowByteAmount:function(value){return this._rawAmount=alphaTab.platform.Platform.ToUInt16((65280&this._rawAmount)+alphaTab.platform.Platform.ToUInt8(value)),this.get_LowByteAmount()},get_HighByteAmount:function(){return alphaTab.platform.Platform.ToUInt8((65280&this._rawAmount)>>8)},set_HighByteAmount:function(value){return this._rawAmount=alphaTab.platform.Platform.ToUInt16((255&this._rawAmount)+(alphaTab.platform.Platform.ToUInt8(value)<<8)),this.get_HighByteAmount()},__class__:alphaTab.audio.synth.sf2.Generator},alphaTab.audio.synth.sf2._GeneratorEnum={},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_=$hx_exports.alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_={},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.__name__=["alphaTab","audio","synth","sf2","_GeneratorEnum","GeneratorEnum_Impl_"],alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.toString=function(this1){switch(this1){case 0:return"StartAddressOffset";case 1:return"EndAddressOffset";case 2:return"StartLoopAddressOffset";case 3:return"EndLoopAddressOffset";case 4:return"StartAddressCoarseOffset";case 5:return"ModulationLFOToPitch";case 6:return"VibratoLFOToPitch";case 7:return"ModulationEnvelopeToPitch";case 8:return"InitialFilterCutoffFrequency";case 9:return"InitialFilterQ";case 10:return"ModulationLFOToFilterCutoffFrequency";case 11:return"ModulationEnvelopeToFilterCutoffFrequency";case 12:return"EndAddressCoarseOffset";case 13:return"ModulationLFOToVolume";case 14:return"Unused1";case 15:return"ChorusEffectsSend";case 16:return"ReverbEffectsSend";case 17:return"Pan";case 18:return"Unused2";case 19:return"Unused3";case 20:return"Unused4";case 21:return"DelayModulationLFO";case 22:return"FrequencyModulationLFO";case 23:return"DelayVibratoLFO";case 24:return"FrequencyVibratoLFO";case 25:return"DelayModulationEnvelope";case 26:return"AttackModulationEnvelope";case 27:return"HoldModulationEnvelope";case 28:return"DecayModulationEnvelope";case 29:return"SustainModulationEnvelope";case 30:return"ReleaseModulationEnvelope";case 31:return"KeyNumberToModulationEnvelopeHold";case 32:return"KeyNumberToModulationEnvelopeDecay";case 33:return"DelayVolumeEnvelope";case 34:return"AttackVolumeEnvelope";case 35:return"HoldVolumeEnvelope";case 36:return"DecayVolumeEnvelope";case 37:return"SustainVolumeEnvelope";case 38:return"ReleaseVolumeEnvelope";case 39:return"KeyNumberToVolumeEnvelopeHold";case 40:return"KeyNumberToVolumeEnvelopeDecay";case 41:return"Instrument";case 42:return"Reserved1";case 43:return"KeyRange";case 44:return"VelocityRange";case 45:return"StartLoopAddressCoarseOffset";case 46:return"KeyNumber";case 47:return"Velocity";case 48:return"InitialAttenuation";case 49:return"Reserved2";case 50:return"EndLoopAddressCoarseOffset";case 51:return"CoarseTune";case 52:return"FineTune";case 53:return"SampleID";case 54:return"SampleModes";case 55:return"Reserved3";case 56:return"ScaleTuning";case 57:return"ExclusiveClass";case 58:return"OverridingRootKey";case 59:return"Unused5";case 60:return"UnusedEnd"}return""},alphaTab.audio.synth.sf2.Instrument=$hx_exports.alphaTab.audio.synth.sf2.Instrument=function(){this.Name=null,this.Zones=null},alphaTab.audio.synth.sf2.Instrument.__name__=["alphaTab","audio","synth","sf2","Instrument"],alphaTab.audio.synth.sf2.Instrument.prototype={__class__:alphaTab.audio.synth.sf2.Instrument},alphaTab.audio.synth.sf2.Modulator=$hx_exports.alphaTab.audio.synth.sf2.Modulator=function(input){this._sourceModulationData=null,this._destinationGenerator=0,this._amount=0,this._sourceModulationAmount=null,this._sourceTransform=0,this._sourceModulationData=new alphaTab.audio.synth.sf2.ModulatorType(input),this._destinationGenerator=alphaTab.io.IOHelper.ReadUInt16LE(input),this._amount=alphaTab.io.IOHelper.ReadInt16LE(input),this._sourceModulationAmount=new alphaTab.audio.synth.sf2.ModulatorType(input),this._sourceTransform=alphaTab.io.IOHelper.ReadUInt16LE(input)},alphaTab.audio.synth.sf2.Modulator.__name__=["alphaTab","audio","synth","sf2","Modulator"],alphaTab.audio.synth.sf2.Modulator.prototype={__class__:alphaTab.audio.synth.sf2.Modulator},alphaTab.audio.synth.sf2.ModulatorType=$hx_exports.alphaTab.audio.synth.sf2.ModulatorType=function(input){this._controllerSource=0,this.Polarity=0,this.Direction=0,this.SourceType=0,this.IsMidiContinuousController=!1;var raw=alphaTab.io.IOHelper.ReadUInt16LE(input);this.Polarity=512==(512&raw)?1:0,this.Direction=256==(256&raw)?1:0,this.IsMidiContinuousController=128==(128&raw),this.SourceType=(64512&raw)>>10,this._controllerSource=alphaTab.platform.Platform.ToUInt16(127&raw)},alphaTab.audio.synth.sf2.ModulatorType.__name__=["alphaTab","audio","synth","sf2","ModulatorType"],alphaTab.audio.synth.sf2.ModulatorType.prototype={__class__:alphaTab.audio.synth.sf2.ModulatorType},alphaTab.audio.synth.sf2._PolarityEnum={},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_=$hx_exports.alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_={},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.__name__=["alphaTab","audio","synth","sf2","_PolarityEnum","PolarityEnum_Impl_"],alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1};alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.toString=function(this1){switch(this1){case 0:return"Unipolar";case 1:return"Bipolar"}return""},alphaTab.audio.synth.sf2.PresetHeader=$hx_exports.alphaTab.audio.synth.sf2.PresetHeader=function(){this.Name=null,this.PatchNumber=0,this.BankNumber=0,this.Library=0,this.Genre=0,this.Morphology=0,this.Zones=null},alphaTab.audio.synth.sf2.PresetHeader.__name__=["alphaTab","audio","synth","sf2","PresetHeader"],alphaTab.audio.synth.sf2.PresetHeader.prototype={__class__:alphaTab.audio.synth.sf2.PresetHeader},alphaTab.audio.synth.sf2._SFSampleLink={},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_=$hx_exports.alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_={},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.__name__=["alphaTab","audio","synth","sf2","_SFSampleLink","SFSampleLink_Impl_"],alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.toString=function(this1){switch(this1){case 1:return"MonoSample";case 2:return"RightSample";case 4:return"LeftSample";case 8:return"LinkedSample";case 16:return"OggVobis";case 32769:return"RomMonoSample";case 32770:return"RomRightSample";case 32772:return"RomLeftSample";case 32776:return"RomLinkedSample"}return""},alphaTab.audio.synth.sf2.SampleHeader=$hx_exports.alphaTab.audio.synth.sf2.SampleHeader=function(input){this.Name=null,this.Start=0,this.End=0,this.StartLoop=0,this.EndLoop=0,this.SampleRate=0,this.RootKey=0,this.Tune=0,this.SampleLink=0,this.SoundFontSampleLink=1,this.Name=alphaTab.io.IOHelper.Read8BitStringLength(input,20),this.Start=alphaTab.io.IOHelper.ReadInt32LE(input),this.End=alphaTab.io.IOHelper.ReadInt32LE(input),this.StartLoop=alphaTab.io.IOHelper.ReadInt32LE(input),this.EndLoop=alphaTab.io.IOHelper.ReadInt32LE(input),this.SampleRate=alphaTab.io.IOHelper.ReadInt32LE(input),this.RootKey=system.Convert.ToUInt8(input.ReadByte()),this.Tune=alphaTab.platform.Platform.ToInt16(input.ReadByte()),this.SampleLink=alphaTab.io.IOHelper.ReadUInt16LE(input),this.SoundFontSampleLink=js.Boot.__cast(alphaTab.io.IOHelper.ReadUInt16LE(input),Int)},alphaTab.audio.synth.sf2.SampleHeader.__name__=["alphaTab","audio","synth","sf2","SampleHeader"],alphaTab.audio.synth.sf2.SampleHeader.prototype={__class__:alphaTab.audio.synth.sf2.SampleHeader},alphaTab.audio.synth.sf2.Sf2Region=$hx_exports.alphaTab.audio.synth.sf2.Sf2Region=function(){this.Generators=null;var this1=new Int16Array(61);this.Generators=this1},alphaTab.audio.synth.sf2.Sf2Region.__name__=["alphaTab","audio","synth","sf2","Sf2Region"],alphaTab.audio.synth.sf2.Sf2Region.prototype={ApplyDefaultValues:function(){this.Generators[0]=0,this.Generators[1]=0,this.Generators[2]=0,this.Generators[3]=0,this.Generators[4]=0,this.Generators[5]=0,this.Generators[6]=0,this.Generators[7]=0,this.Generators[8]=13500,this.Generators[9]=0,this.Generators[10]=0,this.Generators[11]=0,this.Generators[12]=0,this.Generators[13]=0,this.Generators[15]=0,this.Generators[16]=0,this.Generators[17]=0,this.Generators[21]=-12e3,this.Generators[22]=0,this.Generators[23]=-12e3,this.Generators[24]=0,this.Generators[25]=-12e3,this.Generators[26]=-12e3,this.Generators[27]=-12e3,this.Generators[28]=-12e3,this.Generators[29]=0,this.Generators[30]=-12e3,this.Generators[31]=0,this.Generators[32]=0,this.Generators[33]=-12e3,this.Generators[34]=-12e3,this.Generators[35]=-12e3,this.Generators[36]=-12e3,this.Generators[37]=0,this.Generators[38]=-12e3,this.Generators[39]=0,this.Generators[40]=0,this.Generators[43]=32512,this.Generators[44]=32512,this.Generators[45]=0,this.Generators[46]=-1,this.Generators[47]=-1,this.Generators[48]=0,this.Generators[50]=0,this.Generators[51]=0,this.Generators[52]=0,this.Generators[54]=0,this.Generators[56]=100,this.Generators[57]=0,this.Generators[58]=-1},__class__:alphaTab.audio.synth.sf2.Sf2Region},alphaTab.audio.synth.sf2.SoundFont=$hx_exports.alphaTab.audio.synth.sf2.SoundFont=function(){this.Info=null,this.SampleData=null,this.Presets=null},alphaTab.audio.synth.sf2.SoundFont.__name__=["alphaTab","audio","synth","sf2","SoundFont"],alphaTab.audio.synth.sf2.SoundFont.prototype={Load:function(input){var id=alphaTab.io.IOHelper.Read8BitChars(input,4);alphaTab.io.IOHelper.ReadInt32LE(input);if("riff"!=id.toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. Could not find RIFF header."));if("sfbk"!=(id=alphaTab.io.IOHelper.Read8BitChars(input,4)).toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. Riff type is invalid."));alphaTab.util.Logger.Debug("SF2","Reading info chunk",null),this.Info=new alphaTab.audio.synth.sf2.SoundFontInfo(input),alphaTab.util.Logger.Debug("SF2","Reading sampledata chunk",null),this.SampleData=new alphaTab.audio.synth.sf2.SoundFontSampleData(input),alphaTab.util.Logger.Debug("SF2","Reading preset chunk",null),this.Presets=new alphaTab.audio.synth.sf2.SoundFontPresets(input)},__class__:alphaTab.audio.synth.sf2.SoundFont},alphaTab.audio.synth.sf2.SoundFontInfo=$hx_exports.alphaTab.audio.synth.sf2.SoundFontInfo=function(input){this.RomVersionMajor=0,this.RomVersionMinor=0,this.SfVersionMajor=0,this.SfVersionMinor=0,this.SoundEngine=null,this.BankName=null,this.DataRom=null,this.CreationDate=null,this.Author=null,this.TargetProduct=null,this.Copyright=null,this.Comments=null,this.Tools=null,this.Tools="",this.Comments="",this.Copyright="",this.TargetProduct="",this.Author="",this.DataRom="",this.CreationDate="",this.BankName="",this.SoundEngine="";var id=alphaTab.io.IOHelper.Read8BitChars(input,4),size=alphaTab.io.IOHelper.ReadInt32LE(input);if("list"!=id.toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. Could not find INFO LIST chunk."));var readTo=input.get_Position()+size;if("info"!=(id=alphaTab.io.IOHelper.Read8BitChars(input,4)).toLowerCase())throw new js._Boot.HaxeError((new system.Exception).Exception_CsString("Invalid soundfont. The LIST chunk is not of type INFO."));for(;input.get_Position()0&&(this._builder+=Std.string("\\capo "),this._builder+=Std.string(staff.Capo),this._builder=this._builder+"\r\n"),this._builder+=Std.string("\\tuning");for(var i=0;i0&&(this._builder+=Std.string(" |"),this._builder=this._builder+"\r\n"),this.Bar(track.Staves[i].Bars[j]),++j;++i}},Bar:function(bar){this.BarMeta(bar),this.Voice(bar.Voices[0])},Voice:function(voice){for(var i=0;i1&&(this._builder+=Std.string("("));for(var i=0;i1&&(this._builder+=Std.string(")"))}this._builder+=Std.string("."),this._builder+=Std.string(beat.Duration),this._builder+=Std.string(" "),this.BeatEffects(beat)},Note:function(note){note.IsDead?this._builder+=Std.string("x"):note.IsTieDestination?this._builder+=Std.string("-"):this._builder+=Std.string(note.Fret),this._builder+=Std.string("."),this._builder+=Std.string(note.Beat.Voice.Bar.Staff.Tuning.length-note.String+1),this._builder+=Std.string(" "),this.NoteEffects(note)},NoteEffects:function(note){var hasEffectOpen=!1;if(note.get_HasBend()){hasEffectOpen=this.EffectOpen(hasEffectOpen),this._builder+=Std.string("be (");for(var i=0;i0){var previousMasterBar=masterBar.PreviousMasterBar,previousBar=bar.PreviousBar;if(previousMasterBar.TimeSignatureDenominator==masterBar.TimeSignatureDenominator&&previousMasterBar.TimeSignatureNumerator==masterBar.TimeSignatureNumerator||(this._builder+=Std.string("\\ts "),this._builder+=Std.string(masterBar.TimeSignatureNumerator),this._builder+=Std.string(" "),this._builder+=Std.string(masterBar.TimeSignatureDenominator),this._builder=this._builder+"\r\n"),previousMasterBar.KeySignature!=masterBar.KeySignature){this._builder+=Std.string("\\ks ");switch(masterBar.KeySignature){case-7:this._builder+=Std.string("cb");break;case-6:this._builder+=Std.string("gb");break;case-5:this._builder+=Std.string("db");break;case-4:this._builder+=Std.string("ab");break;case-3:this._builder+=Std.string("eb");break;case-2:this._builder+=Std.string("bb");break;case-1:this._builder+=Std.string("f");break;case 0:this._builder+=Std.string("c");break;case 1:this._builder+=Std.string("g");break;case 2:this._builder+=Std.string("d");break;case 3:this._builder+=Std.string("a");break;case 4:this._builder+=Std.string("e");break;case 5:this._builder+=Std.string("b");break;case 6:this._builder+=Std.string("f#");break;case 7:this._builder+=Std.string("c#")}this._builder=this._builder+"\r\n"}if(bar.Clef!=previousBar.Clef){this._builder+=Std.string("\\clef ");switch(bar.Clef){case 0:this._builder+=Std.string("n");break;case 1:this._builder+=Std.string("c3");break;case 2:this._builder+=Std.string("c4");break;case 3:this._builder+=Std.string("f4");break;case 4:this._builder+=Std.string("g2")}this._builder=this._builder+"\r\n"}null!=masterBar.TempoAutomation&&(this._builder+=Std.string("\\tempo "),this._builder+=Std.string(masterBar.TempoAutomation.Value),this._builder=this._builder+"\r\n")}masterBar.IsRepeatStart&&(this._builder+=Std.string("\\ro "),this._builder=this._builder+"\r\n"),masterBar.get_IsRepeatEnd()&&(this._builder+=Std.string("\\rc "),this._builder+=Std.string(masterBar.RepeatCount+1),this._builder=this._builder+"\r\n")},__class__:alphaTab.exporter.AlphaTexExporter},alphaTab.importer={},alphaTab.importer.AlphaTexException=$hx_exports.alphaTab.importer.AlphaTexException=function(){alphaTab.AlphaTabException.call(this),this.Position=0,this.NonTerm=null,this.Expected=0,this.Symbol=0,this.SymbolData=null},alphaTab.importer.AlphaTexException.__name__=["alphaTab","importer","AlphaTexException"],alphaTab.importer.AlphaTexException.BuildMessage=function(position,nonTerm,expected,symbol,symbolData){return null==symbolData?"MalFormed AlphaTex: @"+position+": Error on block "+nonTerm+", expected a "+alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.toString(expected)+" found a "+alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.toString(symbol):"MalFormed AlphaTex: @"+position+": Error on block "+nonTerm+", invalid value: "+symbolData},alphaTab.importer.AlphaTexException.__super__=alphaTab.AlphaTabException,alphaTab.importer.AlphaTexException.prototype=$extend(alphaTab.AlphaTabException.prototype,{AlphaTexException:function(position,nonTerm,expected,symbol,symbolData){return this.AlphaTabException(alphaTab.importer.AlphaTexException.BuildMessage(position,nonTerm,expected,symbol,symbolData)),this.Position=0,this.NonTerm=null,this.Expected=0,this.Symbol=0,this.SymbolData=null,this.Position=position,this.NonTerm=nonTerm,this.Expected=expected,this.Symbol=symbol,this.SymbolData=symbolData,this},__class__:alphaTab.importer.AlphaTexException}),alphaTab.importer.ScoreImporter=$hx_exports.alphaTab.importer.ScoreImporter=function(){this.Data=null,this.Settings=null},alphaTab.importer.ScoreImporter.__name__=["alphaTab","importer","ScoreImporter"],alphaTab.importer.ScoreImporter.BuildImporters=function(){return[new alphaTab.importer.Gp3To5Importer,new alphaTab.importer.GpxImporter,new alphaTab.importer.Gp7Importer,new alphaTab.importer.AlphaTexImporter,new alphaTab.importer.MusicXmlImporter]},alphaTab.importer.ScoreImporter.prototype={Init:function(data,settings){this.Data=data,this.Settings=settings},GetSetting:function(key,defaultValue){return key=key.toLowerCase(),null!=this.Settings&&null!=this.Settings.ImporterSettings&&this.Settings.ImporterSettings.hasOwnProperty(key)?this.Settings.ImporterSettings[key]:defaultValue},get_Name:function(){throw new js._Boot.HaxeError("abstract")},ReadScore:function(){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.importer.ScoreImporter},alphaTab.importer.AlphaTexImporter=$hx_exports.alphaTab.importer.AlphaTexImporter=function(){alphaTab.importer.ScoreImporter.call(this)},alphaTab.importer.AlphaTexImporter.__name__=["alphaTab","importer","AlphaTexImporter"],alphaTab.importer.AlphaTexImporter.IsLetter=function(code){return!alphaTab.importer.AlphaTexImporter.IsTerminal(code)&&(code>=33&&code<=47||code>=58&&code<=126||code>128)},alphaTab.importer.AlphaTexImporter.IsTerminal=function(ch){return 46==ch||123==ch||125==ch||91==ch||93==ch||40==ch||41==ch||124==ch||39==ch||34==ch||92==ch},alphaTab.importer.AlphaTexImporter.__super__=alphaTab.importer.ScoreImporter,alphaTab.importer.AlphaTexImporter.prototype=$extend(alphaTab.importer.ScoreImporter.prototype,{get_Name:function(){return"AlphaTex"},ReadScore:function(){try{this.CreateDefaultScore(),this._curChPos=0,this._currentDuration=4;if(this._lyrics=[],this.NextChar(),this.NewSy(),14==this._sy)throw new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException("Unknown start sign <"));return this.Score(),this._score.Finish(this.Settings),this._track.ApplyLyrics(this._lyrics),this._score}catch(e){throw e instanceof js._Boot.HaxeError&&(e=e.val),js.Boot.__instanceof(e,alphaTab.importer.AlphaTexException)?new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException(e.Message)):e}},Error:function(nonterm,expected,symbolError){null==symbolError&&(symbolError=!0);var e;throw e=symbolError?(new alphaTab.importer.AlphaTexException).AlphaTexException(this._curChPos,nonterm,expected,this._sy,null):(new alphaTab.importer.AlphaTexException).AlphaTexException(this._curChPos,nonterm,expected,expected,this._syData),alphaTab.util.Logger.Error(this.get_Name(),e.Message,null),new js._Boot.HaxeError(e)},CreateDefaultScore:function(){this._score=new alphaTab.model.Score,this._score.Tempo=120,this._score.TempoLabel="",this._track=new alphaTab.model.Track(1),this._track.PlaybackInfo.Program=25,this._track.PlaybackInfo.PrimaryChannel=alphaTab.importer.AlphaTexImporter.TrackChannels[0],this._track.PlaybackInfo.SecondaryChannel=alphaTab.importer.AlphaTexImporter.TrackChannels[1],this._staff=this._track.Staves[0],this._staff.Tuning=alphaTab.model.Tuning.GetDefaultTuningFor(6).Tunings,this._score.AddTrack(this._track)},ParseClefFromString:function(str){switch(str.toLowerCase()){case"c3":case"tenor":return 1;case"alto":case"c4":return 2;case"bass":case"f4":return 3;case"n":case"neutral":return 0;case"g2":case"treble":default:return 4}},ParseClefFromInt:function(i){switch(i){case 43:return 4;case 48:return 1;case 60:return 2;case 65:return 3;default:return 4}},ParseKeySignature:function(str){switch(str.toLowerCase()){case"a":return 3;case"ab":return-4;case"b":return 5;case"bb":return-2;case"c":return 0;case"c#":return 7;case"cb":return-7;case"d":return 2;case"db":return-5;case"e":return 4;case"eb":return-3;case"f":return-1;case"f#":return 6;case"g":return 1;case"gb":return-6;default:return 0}},NextChar:function(){var b=this.Data.ReadByte();-1==b?this._ch=0:(this._ch=b,this._curChPos++)},NewSy:function(){for(this._sy=0;;){if(0==this._ch)this._sy=1;else if(alphaTab.platform.Platform.IsWhiteSpace(this._ch))this.NextChar();else if(47==this._ch)if(this.NextChar(),47==this._ch)for(;13!=this._ch&&10!=this._ch&&0!=this._ch;)this.NextChar();else if(42==this._ch)for(;0!=this._ch;)if(42==this._ch){if(this.NextChar(),47==this._ch){this.NextChar();break}}else this.NextChar();else this.Error("symbol",5,!1);else if(34==this._ch||39==this._ch){var startChar=this._ch;this.NextChar();var s="";for(this._sy=5;this._ch!=startChar&&0!=this._ch;)s+=String.fromCharCode(this._ch),this.NextChar();this._syData=s,this.NextChar()}else if(45==this._ch)if(this._allowNegatives&&this.IsDigit(this._ch)){var number=this.ReadNumber();this._sy=2,this._syData=number}else this._sy=5,this._syData=this.ReadName();else if(46==this._ch)this._sy=4,this.NextChar();else if(58==this._ch)this._sy=3,this.NextChar();else if(40==this._ch)this._sy=7,this.NextChar();else if(92==this._ch){this.NextChar();var name=this.ReadName();this._sy=12,this._syData=name}else if(41==this._ch)this._sy=8,this.NextChar();else if(123==this._ch)this._sy=9,this.NextChar();else if(125==this._ch)this._sy=10,this.NextChar();else if(124==this._ch)this._sy=11,this.NextChar();else if(42==this._ch)this._sy=13,this.NextChar();else if(60==this._ch)this._sy=14,this.NextChar();else if(this.IsDigit(this._ch)){var number1=this.ReadNumber();this._sy=2,this._syData=number1}else if(alphaTab.importer.AlphaTexImporter.IsLetter(this._ch)){var name1=this.ReadName(),tuning=alphaTab.model.TuningParser.Parse(name1);null!=tuning?(this._sy=6,this._syData=tuning):(this._sy=5,this._syData=name1)}else this.Error("symbol",5,!1);if(0!=this._sy)break}},IsDigit:function(code){return code>=48&&code<=57||45==code&&this._allowNegatives},ReadName:function(){for(var str="";str+=String.fromCharCode(this._ch),this.NextChar(),alphaTab.importer.AlphaTexImporter.IsLetter(this._ch)||this.IsDigit(this._ch)||35==this._ch;);return str},ReadNumber:function(){for(var str="";str+=String.fromCharCode(this._ch),this.NextChar(),this.IsDigit(this._ch););return alphaTab.platform.Platform.ParseInt(str)},Score:function(){this.MetaData(),this.Bars()},MetaData:function(){for(var anyMeta=!1;12==this._sy;){var syData=Std.string(this._syData).toLowerCase();if("title"==syData)this.NewSy(),5==this._sy?this._score.Title=Std.string(this._syData):this.Error("title",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("subtitle"==syData)this.NewSy(),5==this._sy?this._score.SubTitle=Std.string(this._syData):this.Error("subtitle",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("artist"==syData)this.NewSy(),5==this._sy?this._score.Artist=Std.string(this._syData):this.Error("artist",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("album"==syData)this.NewSy(),5==this._sy?this._score.Album=Std.string(this._syData):this.Error("album",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("words"==syData)this.NewSy(),5==this._sy?this._score.Words=Std.string(this._syData):this.Error("words",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("music"==syData)this.NewSy(),5==this._sy?this._score.Music=Std.string(this._syData):this.Error("music",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("copyright"==syData)this.NewSy(),5==this._sy?this._score.Copyright=Std.string(this._syData):this.Error("copyright",5,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("tempo"==syData)this.NewSy(),2==this._sy?this._score.Tempo=this._syData:this.Error("tempo",2,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("capo"==syData)this.NewSy(),2==this._sy?this._staff.Capo=this._syData:this.Error("capo",2,!0),this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta;else if("tuning"==syData){this.NewSy();switch(this._sy){case 5:var text=Std.string(this._syData).toLowerCase();if("piano"==text||"none"==text||"voice"==text){var this1=new Int32Array(0);this._staff.Tuning=this1}else this.Error("tuning",6,!0);this.NewSy();break;case 6:for(var tuning=[];;){var t=this._syData;if(tuning.push(t.get_RealValue()),this.NewSy(),6!=this._sy)break}this._staff.Tuning=new Int32Array(tuning);break;default:this.Error("tuning",6,!0)}anyMeta=!0,this._anyDataLoaded=anyMeta}else if("instrument"==syData){if(this.NewSy(),2==this._sy){var instrument=this._syData;instrument>=0&&instrument<=128?this._track.PlaybackInfo.Program=this._syData:this.Error("instrument",2,!1)}else if(5==this._sy){var instrumentName=Std.string(this._syData).toLowerCase();this._track.PlaybackInfo.Program=alphaTab.audio.GeneralMidi.GetValue(instrumentName)}else this.Error("instrument",2,!0);this.NewSy(),anyMeta=!0,this._anyDataLoaded=anyMeta}else if("lyrics"==syData){this.NewSy();var lyrics=new alphaTab.model.Lyrics;lyrics.StartBar=0,lyrics.Text="",2==this._sy&&(lyrics.StartBar=this._syData,this.NewSy()),5==this._sy?(lyrics.Text=this._syData,this.NewSy()):this.Error("lyrics",5,!0),this._lyrics.push(lyrics),anyMeta=!0,this._anyDataLoaded=anyMeta}else{if(!anyMeta)break;this.Error("metaDataTags",5,!1)}}anyMeta?(4!=this._sy&&this.Error("song",4,!0),this.NewSy()):4==this._sy&&this.NewSy()},Bars:function(){for(this.Bar();1!=this._sy;)11!=this._sy&&this.Error("bar",11,!0),this.NewSy(),this.Bar()},Bar:function(){var master=new alphaTab.model.MasterBar;this._score.AddMasterBar(master);var bar=new alphaTab.model.Bar;this._staff.AddBar(bar),master.Index>0&&(master.KeySignature=master.PreviousMasterBar.KeySignature,master.TimeSignatureDenominator=master.PreviousMasterBar.TimeSignatureDenominator,master.TimeSignatureNumerator=master.PreviousMasterBar.TimeSignatureNumerator,bar.Clef=bar.PreviousBar.Clef),this.BarMeta(bar);var voice=new alphaTab.model.Voice;for(bar.AddVoice(voice);11!=this._sy&&1!=this._sy;)this.Beat(voice);if(0==voice.Beats.length){var emptyBeat=new alphaTab.model.Beat;emptyBeat.IsEmpty=!0,voice.AddBeat(emptyBeat)}},Beat:function(voice){if(3==this._sy)return this._allowNegatives=!0,this.NewSy(),this._allowNegatives=!1,2!=this._sy&&this.Error("duration",2,!0),this._currentDuration=this.ParseDuration(this._syData),void this.NewSy();var beat=new alphaTab.model.Beat;if(voice.AddBeat(beat),null!=voice.Bar.get_MasterBar().TempoAutomation&&1==voice.Beats.length&&beat.Automations.push(voice.Bar.get_MasterBar().TempoAutomation),7==this._sy){for(this.NewSy(),this.Note(beat);8!=this._sy&&1!=this._sy;)this.Note(beat);8!=this._sy&&this.Error("note-list",8,!0),this.NewSy()}else 5==this._sy&&"r"==Std.string(this._syData).toLowerCase()?this.NewSy():this.Note(beat);4==this._sy&&(this._allowNegatives=!0,this.NewSy(),this._allowNegatives=!1,2!=this._sy&&this.Error("duration",2,!0),this._currentDuration=this.ParseDuration(this._syData),this.NewSy()),beat.Duration=this._currentDuration;var beatRepeat=1;13==this._sy&&(this.NewSy(),2!=this._sy?this.Error("multiplier",2,!0):beatRepeat=this._syData,this.NewSy()),this.BeatEffects(beat);for(var i=0;i60;)beat.RemoveWhammyBarPoint(beat.WhammyBarPoints.length-1);if(exact){beat.WhammyBarPoints.sort(function(a1,b1){return b=b1,a1.Offset-b.Offset;var b})}else for(var count=beat.WhammyBarPoints.length,step=60/count|0,i=0;i0,string=-1;isFretted&&(4!=this._sy&&this.Error("note",4,!0),this.NewSy(),2!=this._sy&&this.Error("note-string",2,!0),((string=this._syData)<1||string>this._staff.Tuning.length)&&this.Error("note-string",2,!1),this.NewSy());var note=new alphaTab.model.Note;beat.AddNote(note),isFretted?(note.String=this._staff.Tuning.length-(string-1),note.IsDead=isDead,note.IsTieDestination=isTie,isTie||(note.Fret=fret)):(note.Octave=octave,note.Tone=tone,note.IsTieDestination=isTie),this.NoteEffects(note)},NoteEffects:function(note){if(9==this._sy){for(this.NewSy();5==this._sy;){var syData=Std.string(this._syData).toLowerCase();if(this._syData=syData,"b"==syData||"be"==syData){var exact="be"==this._syData;for(this.NewSy(),7!=this._sy&&this.Error("bend-effect",7,!0),this.NewSy();8!=this._sy&&1!=this._sy;){var offset=0,value=0;exact?(2!=this._sy&&this.Error("bend-effect-value",2,!0),offset=this._syData,this.NewSy(),2!=this._sy&&this.Error("bend-effect-value",2,!0),value=this._syData):(2!=this._sy&&this.Error("bend-effect-value",2,!0),value=this._syData),note.AddBendPoint(new alphaTab.model.BendPoint(offset,value)),this.NewSy()}for(;note.BendPoints.length>60;){var index=note.BendPoints.length-1;-1!=index&¬e.BendPoints.splice(index,1)}if(exact)note.BendPoints.sort(function(comparison){return function(a,b){return comparison[0](a,b)}}([function(a1,b1){return a1.Offset-b1.Offset}]));else for(var count=note.BendPoints.length,step=60/(count-1)|0,i=0;i=400&&this.ReadLyrics(),this._versionNumber>=510&&this.Data.Skip(19),this._versionNumber>=500&&(this.ReadPageSetup(),this._score.TempoLabel=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data)),this._score.Tempo=alphaTab.io.IOHelper.ReadInt32LE(this.Data),this._versionNumber>=510&&alphaTab.importer.GpBinaryHelpers.GpReadBool(this.Data),alphaTab.io.IOHelper.ReadInt32LE(this.Data),this._versionNumber>=400&&this.Data.ReadByte(),this.ReadPlaybackInfos(),this._versionNumber>=500&&(this.Data.Skip(38),this.Data.Skip(4)),this._barCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data),this._trackCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data),this.ReadMasterBars(),this.ReadTracks(),this.ReadBars(),this._score.Finish(this.Settings),null!=this._lyrics&&this._lyricsTrack>=0&&this._score.Tracks[this._lyricsTrack].ApplyLyrics(this._lyrics),this._score},ReadVersion:function(){var version=alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength(this.Data,30);if(!StringTools.startsWith(version,"FICHIER GUITAR PRO "))throw new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException("Unsupported format"));version=HxOverrides.substr(version,"FICHIER GUITAR PRO ".length+1,null);var this1=system.Convert.ToUInt16(46),dot=version.indexOf(String.fromCharCode(this1));this._versionNumber=100*alphaTab.platform.Platform.ParseInt(HxOverrides.substr(version,0,dot))+alphaTab.platform.Platform.ParseInt(HxOverrides.substr(version,dot+1,null)),alphaTab.util.Logger.Info(this.get_Name(),"Guitar Pro version "+version+" detected",null)},ReadScoreInformation:function(){this._score.Title=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.SubTitle=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Artist=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Album=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Words=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data);var tmp=this._versionNumber>=500?alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data):this._score.Words;this._score.Music=tmp,this._score.Copyright=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Tab=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data),this._score.Instructions=alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data);for(var noticeLines=alphaTab.io.IOHelper.ReadInt32LE(this.Data),notice="",i=0;i0&&(notice+="\r\n"),notice+=Std.string(alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused(this.Data)),++i;this._score.Notices=notice},ReadLyrics:function(){this._lyrics=[],this._lyricsTrack=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1;for(var i=0;i<5;){var lyrics=new alphaTab.model.Lyrics;lyrics.StartBar=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1,lyrics.Text=alphaTab.importer.GpBinaryHelpers.GpReadStringInt(this.Data),this._lyrics.push(lyrics),++i}},ReadPageSetup:function(){this.Data.Skip(30);for(var i=0;i<10;)alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),++i},ReadPlaybackInfos:function(){this._playbackInfos=[];for(var i=0;i<64;){var info=new alphaTab.model.PlaybackInformation;info.PrimaryChannel=i,info.SecondaryChannel=i,info.Program=alphaTab.io.IOHelper.ReadInt32LE(this.Data),info.Volume=this.Data.ReadByte(),info.Balance=this.Data.ReadByte(),this.Data.Skip(6),this._playbackInfos.push(info),++i}},ReadMasterBars:function(){for(var i=0;i0&&(previousMasterBar=this._score.MasterBars[this._score.MasterBars.length-1]);var newMasterBar=new alphaTab.model.MasterBar,flags=this.Data.ReadByte();if(0!=(1&flags)?newMasterBar.TimeSignatureNumerator=this.Data.ReadByte():null!=previousMasterBar&&(newMasterBar.TimeSignatureNumerator=previousMasterBar.TimeSignatureNumerator),0!=(2&flags)?newMasterBar.TimeSignatureDenominator=this.Data.ReadByte():null!=previousMasterBar&&(newMasterBar.TimeSignatureDenominator=previousMasterBar.TimeSignatureDenominator),newMasterBar.IsRepeatStart=0!=(4&flags),0!=(8&flags)&&(newMasterBar.RepeatCount=this.Data.ReadByte()+(this._versionNumber>=500?0:1)),0!=(16&flags))if(this._versionNumber<500){for(var currentMasterBar=previousMasterBar,existentAlternatives=0;!(null==currentMasterBar||currentMasterBar.get_IsRepeatEnd()&¤tMasterBar!=previousMasterBar||currentMasterBar.IsRepeatStart);)existentAlternatives|=currentMasterBar.AlternateEndings,currentMasterBar=currentMasterBar.PreviousMasterBar;for(var repeatAlternative=0,repeatMask=this.Data.ReadByte(),i=0;i<8;){var repeating=1<i&&0==(existentAlternatives&repeating)&&(repeatAlternative|=repeating),++i}newMasterBar.AlternateEndings=system.Convert.ToUInt8(repeatAlternative)}else newMasterBar.AlternateEndings=system.Convert.ToUInt8(this.Data.ReadByte());if(0!=(32&flags)){var section=new alphaTab.model.Section;section.Text=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),section.Marker="",alphaTab.importer.GpBinaryHelpers.GpReadColor(this.Data,!1),newMasterBar.Section=section}if(0!=(64&flags)?(newMasterBar.KeySignature=js.Boot.__cast(alphaTab.platform.Platform.ReadSignedByte(this.Data),Int),newMasterBar.KeySignatureType=js.Boot.__cast(this.Data.ReadByte(),Int)):null!=previousMasterBar&&(newMasterBar.KeySignature=previousMasterBar.KeySignature,newMasterBar.KeySignatureType=previousMasterBar.KeySignatureType),this._versionNumber>=500&&0!=(3&flags)&&this.Data.Skip(4),this._versionNumber>=500&&0==(16&flags)&&(newMasterBar.AlternateEndings=system.Convert.ToUInt8(this.Data.ReadByte())),this._versionNumber>=500){switch(this.Data.ReadByte()){case 1:newMasterBar.TripletFeel=2;break;case 2:newMasterBar.TripletFeel=1}this.Data.ReadByte()}else newMasterBar.TripletFeel=this._globalTripletFeel;newMasterBar.IsDoubleBar=0!=(128&flags),this._score.AddMasterBar(newMasterBar)},ReadTracks:function(){for(var i=0;ii&&tuning.push(stringTuning),++i}mainStaff.Tuning=new Int32Array(tuning);var port=alphaTab.io.IOHelper.ReadInt32LE(this.Data),index=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1,effectChannel=alphaTab.io.IOHelper.ReadInt32LE(this.Data)-1;if(this.Data.Skip(4),index>=0&&index=500&&(this.Data.ReadByte(),this.Data.ReadByte(),this.Data.Skip(43)),this._versionNumber>=510&&(this.Data.Skip(4),alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data))},ReadBars:function(){for(var i=0;i=500&&(this.Data.ReadByte(),voiceCount=2);for(var v=0;v=0;)0!=(stringFlags&1<=500){this.Data.ReadByte();0!=(8&this.Data.ReadByte())&&this.Data.ReadByte()}},ReadChord:function(beat){var chord=new alphaTab.model.Chord,chordId=alphaTab.platform.Platform.NewGuid();if(this._versionNumber>=500){this.Data.Skip(17),chord.Name=alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength(this.Data,21),this.Data.Skip(4),chord.FirstFret=alphaTab.io.IOHelper.ReadInt32LE(this.Data);for(var i=0;i<7;){var fret=alphaTab.io.IOHelper.ReadInt32LE(this.Data);i=400){this.Data.Skip(16),chord.Name=alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength(this.Data,21),this.Data.Skip(4),chord.FirstFret=alphaTab.io.IOHelper.ReadInt32LE(this.Data);for(var i2=0;i2<7;){var fret1=alphaTab.io.IOHelper.ReadInt32LE(this.Data);i2=406?7:6;if(chord.Name=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),chord.FirstFret=alphaTab.io.IOHelper.ReadInt32LE(this.Data),chord.FirstFret>0)for(var i5=0;i5=400&&(flags2=this.Data.ReadByte()),beat.FadeIn=0!=(16&flags),(this._versionNumber<400&&0!=(1&flags)||0!=(2&flags))&&(beat.Vibrato=1),beat.HasRasgueado=0!=(1&flags2),0!=(32&flags)&&this._versionNumber>=400){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 1:beat.Tap=!0;break;case 2:beat.Slap=!0;break;case 3:beat.Pop=!0}}else if(0!=(32&flags)){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 1:beat.Tap=!0;break;case 2:beat.Slap=!0;break;case 3:beat.Pop=!0}this.Data.Skip(4)}if(0!=(4&flags2)&&this.ReadTremoloBarEffect(beat),0!=(64&flags)){var strokeUp,strokeDown;this._versionNumber<500?(strokeDown=this.Data.ReadByte(),strokeUp=this.Data.ReadByte()):(strokeUp=this.Data.ReadByte(),strokeDown=this.Data.ReadByte()),strokeUp>0?(beat.BrushType=1,beat.BrushDuration=alphaTab.importer.Gp3To5Importer.ToStrokeValue(strokeUp)):strokeDown>0&&(beat.BrushType=2,beat.BrushDuration=alphaTab.importer.Gp3To5Importer.ToStrokeValue(strokeDown))}if(0!=(2&flags2)){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 0:beat.PickStroke=0;break;case 1:beat.PickStroke=1;break;case 2:beat.PickStroke=2}}},ReadTremoloBarEffect:function(beat){this.Data.ReadByte(),alphaTab.io.IOHelper.ReadInt32LE(this.Data);var pointCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data);if(pointCount>0)for(var i=0;i=500&&this.Data.Skip(16),tableChange.Volume=alphaTab.platform.Platform.ReadSignedByte(this.Data),tableChange.Balance=alphaTab.platform.Platform.ReadSignedByte(this.Data);var chorus=alphaTab.platform.Platform.ReadSignedByte(this.Data),reverb=alphaTab.platform.Platform.ReadSignedByte(this.Data),phaser=alphaTab.platform.Platform.ReadSignedByte(this.Data),tremolo=alphaTab.platform.Platform.ReadSignedByte(this.Data);if(this._versionNumber>=500&&(tableChange.TempoName=alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data)),tableChange.Tempo=alphaTab.io.IOHelper.ReadInt32LE(this.Data),tableChange.Volume>=0&&this.Data.ReadByte(),tableChange.Balance>=0&&this.Data.ReadByte(),chorus>=0&&this.Data.ReadByte(),reverb>=0&&this.Data.ReadByte(),phaser>=0&&this.Data.ReadByte(),tremolo>=0&&this.Data.ReadByte(),tableChange.Tempo>=0&&(tableChange.Duration=alphaTab.platform.Platform.ReadSignedByte(this.Data),this._versionNumber>=510&&this.Data.ReadByte()),this._versionNumber>=400&&this.Data.ReadByte(),this._versionNumber>=500&&this.Data.ReadByte(),this._versionNumber>=510&&(alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data),alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte(this.Data)),tableChange.Volume>=0){var volumeAutomation=new alphaTab.model.Automation;volumeAutomation.IsLinear=!0,volumeAutomation.Type=1;var this1=tableChange.Volume;volumeAutomation.Value=this1,beat.Automations.push(volumeAutomation)}if(tableChange.Balance>=0){var balanceAutomation=new alphaTab.model.Automation;balanceAutomation.IsLinear=!0,balanceAutomation.Type=3;var this2=tableChange.Balance;balanceAutomation.Value=this2,beat.Automations.push(balanceAutomation)}if(tableChange.Instrument>=0){var instrumentAutomation=new alphaTab.model.Automation;instrumentAutomation.IsLinear=!0,instrumentAutomation.Type=2;var this3=tableChange.Instrument;instrumentAutomation.Value=this3,beat.Automations.push(instrumentAutomation)}if(tableChange.Tempo>=0){var tempoAutomation=new alphaTab.model.Automation;tempoAutomation.IsLinear=!0,tempoAutomation.Type=0;var this4=tableChange.Tempo;tempoAutomation.Value=this4,beat.Automations.push(tempoAutomation),beat.Voice.Bar.get_MasterBar().TempoAutomation=tempoAutomation}},ReadNote:function(track,bar,voice,beat,stringIndex){var newNote=new alphaTab.model.Note;newNote.String=bar.Staff.Tuning.length-stringIndex;var flags=this.Data.ReadByte();if(0!=(2&flags)?newNote.Accentuated=2:0!=(64&flags)&&(newNote.Accentuated=1),newNote.IsGhost=0!=(4&flags),0!=(32&flags)){var noteType=this.Data.ReadByte();3==noteType?newNote.IsDead=!0:2==noteType&&(newNote.IsTieDestination=!0)}if(0!=(1&flags)&&this._versionNumber<500&&(this.Data.ReadByte(),this.Data.ReadByte()),0!=(16&flags)){var dynamicNumber=alphaTab.platform.Platform.ReadSignedByte(this.Data);newNote.Dynamic=this.ToDynamicValue(dynamicNumber),beat.Dynamic=newNote.Dynamic}if(0!=(32&flags)&&(newNote.Fret=alphaTab.platform.Platform.ReadSignedByte(this.Data)),0!=(128&flags)&&(newNote.LeftHandFinger=js.Boot.__cast(alphaTab.platform.Platform.ReadSignedByte(this.Data),Int),newNote.RightHandFinger=js.Boot.__cast(alphaTab.platform.Platform.ReadSignedByte(this.Data),Int),newNote.IsFingering=!0),this._versionNumber>=500){0!=(1&flags)&&(newNote.DurationPercent=alphaTab.importer.GpBinaryHelpers.GpReadDouble(this.Data));var flags2=this.Data.ReadByte();newNote.AccidentalMode=0!=(2&flags2)?1:0}beat.AddNote(newNote),0!=(8&flags)&&this.ReadNoteEffects(track,voice,beat,newNote)},ToDynamicValue:function(value){switch(value){case 1:return 0;case 2:return 1;case 3:return 2;case 4:return 3;case 5:return 4;case 6:return 5;case 7:return 6;case 8:return 7;default:return 5}},ReadNoteEffects:function(track,voice,beat,note){var flags=this.Data.ReadByte(),flags2=0;this._versionNumber>=400&&(flags2=this.Data.ReadByte()),0!=(1&flags)&&this.ReadBend(note),0!=(16&flags)&&this.ReadGrace(voice,note),0!=(4&flags2)&&this.ReadTremoloPicking(beat),0!=(8&flags2)?this.ReadSlide(note):this._versionNumber<400&&0!=(4&flags)&&(note.SlideType=1),0!=(16&flags2)?this.ReadArtificialHarmonic(note):this._versionNumber<400&&(0!=(4&flags)&&(note.HarmonicType=1,note.HarmonicValue=this.DeltaFretToHarmonicValue(note.Fret)),0!=(8&flags)&&(note.HarmonicType=2)),0!=(32&flags2)&&this.ReadTrill(note),note.IsLetRing=0!=(8&flags),note.IsHammerPullOrigin=0!=(2&flags),0!=(64&flags2)&&(note.Vibrato=1),note.IsPalmMute=0!=(2&flags2),note.IsStaccato=0!=(1&flags2)},ReadBend:function(note){this.Data.ReadByte(),alphaTab.io.IOHelper.ReadInt32LE(this.Data);var pointCount=alphaTab.io.IOHelper.ReadInt32LE(this.Data);if(pointCount>0)for(var i=0;i=500){switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case 1:note.SlideType=1;break;case 2:note.SlideType=2;break;case 4:note.SlideType=6;break;case 8:note.SlideType=5;break;case 16:note.SlideType=3;break;case 32:note.SlideType=4;break;default:note.SlideType=0}}else{switch(alphaTab.platform.Platform.ReadSignedByte(this.Data)){case-2:note.SlideType=4;break;case-1:note.SlideType=3;break;case 1:note.SlideType=1;break;case 2:note.SlideType=2;break;case 3:note.SlideType=6;break;case 4:note.SlideType=5;break;default:note.SlideType=0}}},ReadArtificialHarmonic:function(note){var type=this.Data.ReadByte();if(this._versionNumber>=500)switch(type){case 1:note.HarmonicType=1,note.HarmonicValue=this.DeltaFretToHarmonicValue(note.Fret);break;case 2:this.Data.ReadByte(),this.Data.ReadByte(),this.Data.ReadByte();note.HarmonicType=2;break;case 3:note.HarmonicType=4,note.HarmonicValue=this.DeltaFretToHarmonicValue(this.Data.ReadByte());break;case 4:note.HarmonicType=3,note.HarmonicValue=12;break;case 5:note.HarmonicType=5,note.HarmonicValue=12}else if(this._versionNumber>=400)switch(type){case 1:note.HarmonicType=1;break;case 3:note.HarmonicType=4;break;case 4:note.HarmonicType=3;break;case 5:note.HarmonicType=5;break;case 15:case 17:case 22:note.HarmonicType=2}},DeltaFretToHarmonicValue:function(deltaFret){switch(deltaFret){case 2:return 2.4;case 3:return 3.2;case 8:return 8.2;case 10:return 9.6;case 14:case 15:return 14.7;case 21:case 22:return 21.7;case 4:case 5:case 7:case 9:case 12:case 16:case 17:case 19:case 24:return deltaFret;default:return 12}},ReadTrill:function(note){note.TrillValue=this.Data.ReadByte()+note.get_StringTuning();switch(this.Data.ReadByte()){case 1:note.TrillSpeed=16;break;case 2:note.TrillSpeed=32;break;case 3:note.TrillSpeed=64}},__class__:alphaTab.importer.Gp3To5Importer}),alphaTab.importer.Gp7Importer=$hx_exports.alphaTab.importer.Gp7Importer=function(){alphaTab.importer.ScoreImporter.call(this)},alphaTab.importer.Gp7Importer.__name__=["alphaTab","importer","Gp7Importer"],alphaTab.importer.Gp7Importer.__super__=alphaTab.importer.ScoreImporter,alphaTab.importer.Gp7Importer.prototype=$extend(alphaTab.importer.ScoreImporter.prototype,{get_Name:function(){return"Guitar Pro 7"},ReadScore:function(){alphaTab.util.Logger.Info(this.get_Name(),"Loading ZIP entries",null);var fileSystem=new alphaTab.io.ZipFile;fileSystem.FileFilter=function(s){return!!StringTools.endsWith(s,"score.gpif")||StringTools.endsWith(s,"BinaryStylesheet")};try{fileSystem.Load(this.Data)}catch(e){throw e instanceof js._Boot.HaxeError&&(e=e.val),js.Boot.__instanceof(e,system.Exception)?new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException(e.Message)):e}alphaTab.util.Logger.Info(this.get_Name(),"Zip entries loaded",null);for(var xml=null,binaryStylesheet=null,entry=$iterator(fileSystem.Entries)();entry.hasNext();){var entry1=entry.next();switch(entry1.FileName){case"BinaryStylesheet":binaryStylesheet=entry1.Data;break;case"score.gpif":xml=alphaTab.platform.Platform.ToString(entry1.Data)}}fileSystem.Entries=null,fileSystem=null,alphaTab.util.Logger.Info(this.get_Name(),"Start Parsing score.gpif",null);var gpifParser=new alphaTab.importer.GpifParser;gpifParser.ParseXml(xml,this.Settings),alphaTab.util.Logger.Info(this.get_Name(),"score.gpif parsed",null);var score=gpifParser.Score;if(null!=binaryStylesheet){alphaTab.util.Logger.Info(this.get_Name(),"Start Parsing BinaryStylesheet",null);var stylesheetParser=new alphaTab.importer.BinaryStylesheetParser;stylesheetParser.Parse(binaryStylesheet),null!=stylesheetParser.Stylesheet&&stylesheetParser.Stylesheet.Apply(score),alphaTab.util.Logger.Info(this.get_Name(),"BinaryStylesheet parsed",null)}return score},__class__:alphaTab.importer.Gp7Importer}),alphaTab.importer.GpBinaryHelpers=$hx_exports.alphaTab.importer.GpBinaryHelpers=function(){},alphaTab.importer.GpBinaryHelpers.__name__=["alphaTab","importer","GpBinaryHelpers"],alphaTab.importer.GpBinaryHelpers.GpReadDouble=function(data){var bytes=new Uint8Array(8);return data.Read(bytes,0,bytes.length),alphaTab.platform.Platform.ToDouble(bytes)},alphaTab.importer.GpBinaryHelpers.GpReadFloat=function(data){var bytes=new Uint8Array(4);return bytes[3]=system.Convert.ToUInt8(data.ReadByte()),bytes[2]=system.Convert.ToUInt8(data.ReadByte()),bytes[2]=system.Convert.ToUInt8(data.ReadByte()),bytes[1]=system.Convert.ToUInt8(data.ReadByte()),alphaTab.platform.Platform.ToFloat(bytes)},alphaTab.importer.GpBinaryHelpers.GpReadColor=function(data,readAlpha){null==readAlpha&&(readAlpha=!1);var r=system.Convert.ToUInt8(data.ReadByte()),g=system.Convert.ToUInt8(data.ReadByte()),b=system.Convert.ToUInt8(data.ReadByte()),a=255;return readAlpha?a=system.Convert.ToUInt8(data.ReadByte()):data.Skip(1),new alphaTab.platform.model.Color(r,g,b,a)},alphaTab.importer.GpBinaryHelpers.GpReadBool=function(data){return 0!=data.ReadByte()},alphaTab.importer.GpBinaryHelpers.GpReadStringIntUnused=function(data){return data.Skip(4),alphaTab.importer.GpBinaryHelpers.GpReadString(data,data.ReadByte())},alphaTab.importer.GpBinaryHelpers.GpReadStringInt=function(data){return alphaTab.importer.GpBinaryHelpers.GpReadString(data,alphaTab.io.IOHelper.ReadInt32LE(data))},alphaTab.importer.GpBinaryHelpers.GpReadStringIntByte=function(data){var length=alphaTab.io.IOHelper.ReadInt32LE(data)-1;return data.ReadByte(),alphaTab.importer.GpBinaryHelpers.GpReadString(data,length)},alphaTab.importer.GpBinaryHelpers.GpReadString=function(data,length){var b=new Uint8Array(length);return data.Read(b,0,b.length),alphaTab.platform.Platform.ToString(b)},alphaTab.importer.GpBinaryHelpers.GpReadStringByteLength=function(data,length){var stringLength=data.ReadByte(),s=alphaTab.importer.GpBinaryHelpers.GpReadString(data,stringLength);return stringLength0)for(var this18=this._lyricsByTrack,trackId=$iterator(Object.keys(this18))();trackId.hasNext();){var trackId1=trackId.next();this._tracksById[trackId1].ApplyLyrics(this._lyricsByTrack[trackId1])}},ParseDom:function(dom){var root=dom.DocumentElement;if(null!=root){if("GPIF"!=root.LocalName)throw new js._Boot.HaxeError((new alphaTab.importer.UnsupportedFormatException).UnsupportedFormatException("Unsupported format"));this.Score=new alphaTab.model.Score;for(var n=$iterator(root.ChildNodes)();n.hasNext();){var n1=n.next();if(1==n1.NodeType){switch(n1.LocalName){case"Bars":this.ParseBars(n1);break;case"Beats":this.ParseBeats(n1);break;case"MasterBars":this.ParseMasterBarsNode(n1);break;case"MasterTrack":this.ParseMasterTrackNode(n1);break;case"Notes":this.ParseNotes(n1);break;case"Rhythms":this.ParseRhythms(n1);break;case"Score":this.ParseScoreNode(n1);break;case"Tracks":this.ParseTracksNode(n1);break;case"Voices":this.ParseVoices(n1)}}}}},ParseScoreNode:function(element){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Album":this.Score.Album=c1.FirstChild.get_InnerText();break;case"Artist":this.Score.Artist=c1.FirstChild.get_InnerText();break;case"Copyright":this.Score.Copyright=c1.FirstChild.get_InnerText();break;case"Instructions":this.Score.Instructions=c1.FirstChild.get_InnerText();break;case"Music":this.Score.Music=c1.FirstChild.get_InnerText();break;case"Notices":this.Score.Notices=c1.FirstChild.get_InnerText();break;case"SubTitle":this.Score.SubTitle=c1.FirstChild.get_InnerText();break;case"Tabber":this.Score.Tab=c1.FirstChild.get_InnerText();break;case"Title":this.Score.Title=c1.FirstChild.get_InnerText();break;case"Words":this.Score.Words=c1.FirstChild.get_InnerText();break;case"WordsAndMusic":if(null!=c1.FirstChild&&""!=c1.FirstChild.get_InnerText()){var tmp,wordsAndMusic=c1.FirstChild.get_InnerText();if(null!=wordsAndMusic&&0!=wordsAndMusic.length){var s=this.Score.Words;tmp=null==s||0==s.length}else tmp=!1;tmp&&(this.Score.Words=wordsAndMusic);var tmp1;if(null!=wordsAndMusic&&0!=wordsAndMusic.length){var s1=this.Score.Music;tmp1=null==s1||0==s1.length}else tmp1=!1;tmp1&&(this.Score.Music=wordsAndMusic)}}}}},ParseMasterTrackNode:function(node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Automations":this.ParseAutomations(c1,this._masterTrackAutomations);break;case"Tracks":var a=c1.get_InnerText(),this2=system.Convert.ToUInt16(32);this._tracksMapping=system._CsString.CsString_Impl_.Split_CharArray(a,[this2])}}}},ParseAutomations:function(node,automations){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Automation"==c1.LocalName&&this.ParseAutomation(c1,automations)}}},ParseAutomation:function(node,automations){for(var type=null,isLinear=!1,barId=null,ratioPosition=0,value=0,reference=0,text=null,c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Bar":barId=c1.get_InnerText();break;case"Linear":isLinear="true"==c1.get_InnerText().toLowerCase();break;case"Position":var s=c1.get_InnerText();ratioPosition=parseFloat(s);break;case"Text":text=c1.get_InnerText();break;case"Type":type=c1.get_InnerText();break;case"Value":var a=c1.get_InnerText(),this2=system.Convert.ToUInt16(32),parts=system._CsString.CsString_Impl_.Split_CharArray(a,[this2]);value=parseFloat(parts[0]),reference=alphaTab.platform.Platform.ParseInt(parts[1])}}}if(null!=type){var automation=null;if("Tempo"==type&&(automation=alphaTab.model.Automation.BuildTempoAutomation(isLinear,ratioPosition,value,reference)),null!=automation&&(automation.Text=text),null!=barId){if(!automations.hasOwnProperty(barId)){automations[barId]=[]}automations[barId].push(automation)}}},ParseTracksNode:function(node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Track"==c1.LocalName&&this.ParseTrack(c1)}}},ParseTrack:function(node){var track=new alphaTab.model.Track(1);track.Staves[0].StaffKind=1;for(var trackId=node.GetAttribute("id"),c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"Color":var a=c1.get_InnerText(),this2=system.Convert.ToUInt16(32),parts=system._CsString.CsString_Impl_.Split_CharArray(a,[this2]);if(parts.length>=3){var r=alphaTab.platform.Platform.ParseInt(parts[0]),g=alphaTab.platform.Platform.ParseInt(parts[1]),b=alphaTab.platform.Platform.ParseInt(parts[2]);track.Color=new alphaTab.platform.model.Color(system.Convert.ToUInt8(r),system.Convert.ToUInt8(g),system.Convert.ToUInt8(b),255)}break;case"Instrument":var instrumentName=c1.GetAttribute("ref");(StringTools.endsWith(instrumentName,"-gs")||StringTools.endsWith(instrumentName,"GrandStaff"))&&(track.EnsureStaveCount(2),track.Staves[1].StaffKind=1);break;case"Lyrics":this.ParseLyrics(trackId,c1);break;case"GeneralMidi":case"MidiConnection":this.ParseGeneralMidi(track,c1);break;case"Name":track.Name=c1.get_InnerText();break;case"PartSounding":this.ParsePartSounding(track,c1);break;case"PlaybackState":var state=c1.get_InnerText();track.PlaybackInfo.IsSolo="Solo"==state,track.PlaybackInfo.IsMute="Mute"==state;break;case"Properties":this.ParseTrackProperties(track,c1);break;case"ShortName":track.ShortName=c1.get_InnerText();break;case"Sounds":this.ParseSounds(track,c1);break;case"Staves":this.ParseStaves(track,c1);break;case"Transpose":this.ParseTranspose(track,c1)}}}this._tracksById[trackId]=track},ParseStaves:function(track,node){for(var staffIndex=0,c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){if("Staff"==c1.LocalName){track.EnsureStaveCount(staffIndex+1);var staff=track.Staves[staffIndex];this.ParseStaff(staff,c1),++staffIndex}}}},ParseStaff:function(staff,node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Properties"==c1.LocalName&&this.ParseStaffProperties(staff,c1)}}},ParseStaffProperties:function(staff,node){for(var c=$iterator(node.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){"Property"==c1.LocalName&&this.ParseStaffProperty(staff,c1)}}},ParseStaffProperty:function(staff,node){switch(node.GetAttribute("name")){case"CapoFret":var capo=alphaTab.platform.Platform.ParseInt(node.FindChildElement("Fret").get_InnerText());staff.Capo=capo;break;case"ChordCollection":case"DiagramCollection":this.ParseDiagramCollection_Staff_XmlNode(staff,node);break;case"Tuning":for(var a=node.FindChildElement("Pitches").get_InnerText(),this2=system.Convert.ToUInt16(32),tuningParts=system._CsString.CsString_Impl_.Split_CharArray(a,[this2]),tuning=new Int32Array(tuningParts.length),i=0;i1&&(this.MergeGroup(tracks),anyMerged=!0)}if(anyMerged)for(var i=0;i0){var stavesElements=attributes[0].GetElementsByTagName("staves",!1);if(stavesElements.length>0){var staves=alphaTab.platform.Platform.ParseInt(stavesElements[0].get_InnerText());track.EnsureStaveCount(staves)}}}for(var size=track.Staves.length,bars=new Array(size),masterBar=null,b=track.Staves[0].Bars.length;b<=barIndex;){for(var s=0;s0){var previousBar=track.Staves[s].Bars[track.Staves[s].Bars.length-1];bar.Clef=previousBar.Clef}masterBar=this.GetOrCreateMasterBar(barIndex),track.Staves[s].AddBar(bar);for(var v=0;v0&&(voiceIndex=alphaTab.platform.Platform.ParseInt(voiceNodes[0].get_InnerText())-1,-1==this._firstVoice&&(this._firstVoice=voiceIndex,voiceIndex=0));var previousBeatWasPulled=this._previousBeatWasPulled;this._previousBeatWasPulled=!1;var staffElement=element.GetElementsByTagName("staff",!1),staff=1;if(staffElement.length>0){staff=alphaTab.platform.Platform.ParseInt(staffElement[0].get_InnerText()),(this._isBeamContinue||previousBeatWasPulled)&&this._previousBeat.Voice.Bar.Staff.Index!=staff-1&&(staff=this._previousBeat.Voice.Bar.Staff.Index+1,this._previousBeatWasPulled=!0);var staffId=Std.string(bars[0].Staff.Track.Index)+"-"+Std.string(staff);this._voiceOfStaff.hasOwnProperty(staffId)||(this._voiceOfStaff[staffId]=voiceIndex),voiceIndex-=this._voiceOfStaff[staffId]}var beat,bar=bars[staff-1],voice=this.GetOrCreateVoice(bar,voiceIndex);return chord||1==voice.Beats.length&&voice.IsEmpty?beat=voice.Beats[voice.Beats.length-1]:((beat=new alphaTab.model.Beat).IsEmpty=!1,voice.AddBeat(beat)),this._isBeamContinue=!1,this._previousBeat=beat,beat},ParseForward:function(element,bars){for(var beat=this.GetOrCreateBeat(element,bars,!1),duration=4*alphaTab.platform.Platform.ParseInt(element.FindChildElement("duration").get_InnerText())/js.Boot.__cast(this._divisionsPerQuarterNote,Float),durations=new Int32Array([64,32,16,8,4,2,1]),d=new system.Int32ArrayIterator(durations);d.hasNext();){var d1=d.next();if(duration>=d1){beat.Duration=js.Boot.__cast(d1,Int),duration-=d1;break}}beat.IsEmpty=!1},ParseStaffDetails:function(element,track){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"staff-lines":for(var staff=$iterator(track.Staves)();staff.hasNext();){var staff1=staff.next(),this1=new Int32Array(alphaTab.platform.Platform.ParseInt(c1.get_InnerText()));staff1.Tuning=this1}break;case"staff-tuning":this.ParseStaffTuning(c1,track)}}}for(var staff2=$iterator(track.Staves)();staff2.hasNext();){var staff3=staff2.next();if(this.IsEmptyTuning(staff3.Tuning)){var this2=new Int32Array(0);staff3.Tuning=this2}}},ParseStaffTuning:function(element,track){for(var line=alphaTab.platform.Platform.ParseInt(element.GetAttribute("line")),tuningStep="C",tuningOctave="",tuningAlter=0,c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"tuning-alter":tuningAlter=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"tuning-octave":tuningOctave=c1.get_InnerText();break;case"tuning-step":tuningStep=c1.get_InnerText()}}}for(var tuning=alphaTab.model.TuningParser.GetTuningForText(tuningStep+tuningOctave)+tuningAlter,staff=$iterator(track.Staves)();staff.hasNext();){var staff1=staff.next();staff1.Tuning[staff1.Tuning.length-line]=tuning}},ParseHarmony:function(element,track){for(var rootStep=null,rootAlter="",c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"kind":c1.GetAttribute("text"),c1.get_InnerText();break;case"root":for(var rootChild=$iterator(c1.ChildNodes)();rootChild.hasNext();){var rootChild1=rootChild.next();if(1==rootChild1.NodeType){switch(rootChild1.LocalName){case"root-alter":switch(alphaTab.platform.Platform.ParseInt(c1.get_InnerText())){case-2:rootAlter=" bb";break;case-1:rootAlter=" b";break;case 0:rootAlter="";break;case 1:rootAlter=" #";break;case 2:rootAlter=" ##"}break;case"root-step":rootStep=rootChild1.get_InnerText()}}}}}}var chord=new alphaTab.model.Chord;chord.Name=rootStep+rootAlter,this._currentChord=alphaTab.platform.Platform.NewGuid();for(var staff=$iterator(track.Staves)();staff.hasNext();){staff.next().Chords[this._currentChord]=chord}},ParseBarline:function(element,masterBar){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"ending":this.ParseEnding(c1,masterBar);break;case"repeat":this.ParseRepeat(c1,masterBar)}}}},ParseEnding:function(element,masterBar){var number=alphaTab.platform.Platform.ParseInt(element.GetAttribute("number"));number>0&&(--number,masterBar.AlternateEndings=system.Convert.ToUInt8(masterBar.AlternateEndings|system.Convert.ToUInt8(1<0,beat=this.GetOrCreateBeat(element,bars,chord);null==beat.ChordId&&null!=this._currentChord&&(beat.ChordId=this._currentChord,this._currentChord=null),null!=this._currentDirection&&(beat.Text=this._currentDirection,this._currentDirection=null);var note=new alphaTab.model.Note;beat.Voice.IsEmpty=!1,beat.IsEmpty=!1,beat.AddNote(note),beat.Dots=0;for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"accidental":this.ParseAccidental(c1,note);break;case"beam":"continue"==c1.get_InnerText()&&(this._isBeamContinue=!0);break;case"cue":break;case"dot":beat.Dots++;break;case"duration":if(beat.get_IsRest()){switch(alphaTab.platform.Platform.ParseInt(c1.get_InnerText())){case 1:beat.Duration=1;break;case 2:beat.Duration=2;break;case 4:beat.Duration=4;break;case 8:beat.Duration=8;break;case 16:beat.Duration=16;break;case 32:beat.Duration=32;break;case 64:beat.Duration=64;break;default:beat.Duration=4}}break;case"grace":beat.GraceType=2,beat.Duration=32;break;case"instrument":break;case"lyric":this.ParseLyric(c1,beat);break;case"notations":this.ParseNotations(c1,beat,note);break;case"notehead":"yes"==c1.GetAttribute("parentheses")&&(note.IsGhost=!0);break;case"pitch":this.ParsePitch(c1,note);break;case"rest":beat.IsEmpty=!1;beat.Notes=[];break;case"stem":break;case"tie":this.ParseTied(c1,note);break;case"time-modification":this.ParseTimeModification(c1,beat);break;case"type":beat.Duration=this.GetDuration(c1.get_InnerText()),0!=beat.GraceType&&beat.Duration<16&&(beat.Duration=8);break;case"unpitched":this.ParseUnpitched(c1,note)}}}if(note.get_IsStringed())for(var i=0;i0&&(note.TieDestination=this._tieStarts[0],note.IsTieDestination=!0,this._tieStarts.splice(0,1)))},ParseNotations:function(element,beat,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"articulations":this.ParseArticulations(c1,note);break;case"dynamics":this.ParseDynamics(c1,beat);break;case"glissando":case"slide":"start"==c1.GetAttribute("type")&&(note.SlideType=1);break;case"ornaments":this.ParseOrnaments(c1,note);break;case"slur":"start"==c1.GetAttribute("type")&&(beat.IsLegatoOrigin=!0);break;case"technical":this.ParseTechnical(c1,note);break;case"tied":this.ParseTied(c1,note)}}}},ParseOrnaments:function(element,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){if("tremolo"==c1.LocalName){switch(alphaTab.platform.Platform.ParseInt(c1.get_InnerText())){case 1:note.Beat.TremoloSpeed=8;break;case 2:note.Beat.TremoloSpeed=16;break;case 3:note.Beat.TremoloSpeed=32}}}}},ParseTechnical:function(element,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"down-bow":note.Beat.PickStroke=2;break;case"fret":note.Fret=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"string":note.String=alphaTab.platform.Platform.ParseInt(c1.get_InnerText()),-2147483648!=note.String&&(note.String=note.Beat.Voice.Bar.Staff.Tuning.length-note.String+1);break;case"up-bow":note.Beat.PickStroke=1}}}-2147483648!=note.String&&-2147483648!=note.Fret||(note.String=-1,note.Fret=-1)},ParseArticulations:function(element,note){for(var c=$iterator(element.ChildNodes)();c.hasNext();){switch(c.next().LocalName){case"accent":note.Accentuated=1;break;case"detached-legato":case"staccato":note.IsStaccato=!0;break;case"strong-accent":note.Accentuated=2}}},ParseDynamics:function(element,beat){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"f":beat.Dynamic=5;break;case"ff":beat.Dynamic=6;break;case"fff":beat.Dynamic=7;break;case"mf":beat.Dynamic=4;break;case"mp":beat.Dynamic=3;break;case"p":beat.Dynamic=2;break;case"pp":beat.Dynamic=1;break;case"ppp":beat.Dynamic=0}}}},ParseTimeModification:function(element,beat){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"actual-notes":beat.TupletNumerator=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"normal-notes":beat.TupletDenominator=alphaTab.platform.Platform.ParseInt(c1.get_InnerText())}}}},ParseUnpitched:function(element,note){for(var step=null,semitones=0,octave=0,c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"display-alter":semitones=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"display-octave":octave=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"display-step":step=c1.get_InnerText()}}}var value=12*octave+alphaTab.model.TuningParser.GetToneForText(step)+semitones;note.Octave=value/12|0,note.Tone=value-12*note.Octave},ParsePitch:function(element,note){for(var step=null,semitones=0,octave=0,c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"alter":var s=c1.get_InnerText();semitones=parseFloat(s);isNaN(semitones)&&(semitones=0);break;case"octave":octave=alphaTab.platform.Platform.ParseInt(c1.get_InnerText());break;case"step":step=c1.get_InnerText()}}}var value=12*octave+alphaTab.model.TuningParser.GetToneForText(step)+system.Convert.ToInt32_Single(semitones);note.Octave=value/12|0,note.Tone=value-12*note.Octave},GetOrCreateVoice:function(bar,index){if(index0){var prev=this._score.MasterBars[this._score.MasterBars.length-1];mb.TimeSignatureDenominator=prev.TimeSignatureDenominator,mb.TimeSignatureNumerator=prev.TimeSignatureNumerator,mb.KeySignature=prev.KeySignature,mb.KeySignatureType=prev.KeySignatureType}this._score.AddMasterBar(mb),++i}return this._score.MasterBars[index]},ParseIdentification:function(element){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"creator":"composer"==c1.GetAttribute("type")&&(this._score.Music=c1.get_InnerText());break;case"rights":var s=this._score.Copyright;null!=s&&0!=s.length&&(this._score.Copyright=this._score.Copyright+"\n");var tmp=this._score.Copyright+c1.get_InnerText();this._score.Copyright=tmp}}}},ParsePartList:function(element){for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"part-group":this.ParsePartGroup(c1);break;case"score-part":this.ParseScorePart(c1)}}}},ParsePartGroup:function(element){switch(element.GetAttribute("type")){case"start":this._currentPartGroup=element.GetAttribute("number");this._partGroups[this._currentPartGroup]=[];break;case"stop":this._currentPartGroup=null}},ParseScorePart:function(element){var id=element.GetAttribute("id"),track=new alphaTab.model.Track(1);track.Staves[0].StaffKind=1,this._trackById[id]=track,this._score.AddTrack(track),null!=this._currentPartGroup&&this._partGroups[this._currentPartGroup].push(track);for(var c=$iterator(element.ChildNodes)();c.hasNext();){var c1=c.next();if(1==c1.NodeType){switch(c1.LocalName){case"midi-instrument":this.ParseMidiInstrument(c1,track);break;case"part-abbreviation":track.ShortName=c1.get_InnerText();break;case"part-name":track.Name=c1.get_InnerText()}}}if(this.IsEmptyTuning(track.Staves[0].Tuning)){var tmp=track.Staves[0],this1=new Int32Array(0);tmp.Tuning=this1}},IsEmptyTuning:function(tuning){if(null==tuning)return!0;for(var i=0;i=0;)bits|=this.ReadBit()<=8){if(this._currentByte=this._source.ReadByte(),-1==this._currentByte)throw new js._Boot.HaxeError((new alphaTab.io.EndOfReaderException).EndOfReaderException());this._position=0}var value=this._currentByte>>8-this._position-1&1;return this._position++,value},ReadAll:function(){var all=alphaTab.io.ByteBuffer.Empty();try{for(;;)all.WriteByte(system.Convert.ToUInt8(this.ReadByte()))}catch(__e){if(__e instanceof js._Boot.HaxeError&&(__e=__e.val),!js.Boot.__instanceof(__e,alphaTab.io.EndOfReaderException))throw __e}return all.ToArray()},__class__:alphaTab.io.BitReader},alphaTab.io.IReadable=$hx_exports.alphaTab.io.IReadable=function(){},alphaTab.io.IReadable.__name__=["alphaTab","io","IReadable"],alphaTab.io.IReadable.prototype={__class__:alphaTab.io.IReadable},alphaTab.io.IWriteable=$hx_exports.alphaTab.io.IWriteable=function(){},alphaTab.io.IWriteable.__name__=["alphaTab","io","IWriteable"],alphaTab.io.IWriteable.prototype={__class__:alphaTab.io.IWriteable},alphaTab.io.ByteBuffer=$hx_exports.alphaTab.io.ByteBuffer=function(){this._buffer=null,this._capacity=0,this.set_Length(0),this.set_Position(0)},alphaTab.io.ByteBuffer.__name__=["alphaTab","io","ByteBuffer"],alphaTab.io.ByteBuffer.__interfaces__=[alphaTab.io.IReadable,alphaTab.io.IWriteable],alphaTab.io.ByteBuffer.Empty=function(){return alphaTab.io.ByteBuffer.WithCapactiy(0)},alphaTab.io.ByteBuffer.WithCapactiy=function(capacity){var buffer=new alphaTab.io.ByteBuffer,this1=new Uint8Array(capacity);return buffer._buffer=this1,buffer._capacity=capacity,buffer},alphaTab.io.ByteBuffer.FromBuffer=function(data){var buffer=new alphaTab.io.ByteBuffer;return buffer._buffer=data,buffer._capacity=buffer.set_Length(data.length),buffer},alphaTab.io.ByteBuffer.prototype={get_Length:function(){return this.__Length},set_Length:function(value){return this.__Length=value},get_Position:function(){return this.__Position},set_Position:function(value){return this.__Position=value},GetBuffer:function(){return this._buffer},Reset:function(){this.set_Position(0)},Skip:function(offset){this.set_Position(this.get_Position()+offset)},SetCapacity:function(value){if(value!=this._capacity){if(value>0){var newBuffer=new Uint8Array(value);if(this.get_Length()>0){var src=this._buffer,count=this.get_Length();newBuffer.set(src.subarray(0,0+count),0)}this._buffer=newBuffer}else this._buffer=null;this._capacity=value}},ReadByte:function(){if(this.get_Length()-this.get_Position()<=0)return-1;var this1=this._buffer,_g1=this.get_Position();this.set_Position(_g1+1);return this1[_g1]},Read:function(buffer,offset,count){var n=this.get_Length()-this.get_Position();if(n>count&&(n=count),n<=0)return 0;if(n<=8)for(var byteCount=n;--byteCount>=0;)buffer[offset+byteCount]=this._buffer[this.get_Position()+byteCount];else{var src=this._buffer,srcOffset=this.get_Position();buffer.set(src.subarray(srcOffset,srcOffset+n),offset)}return this.set_Position(this.get_Position()+n),n},WriteByte:function(value){var buffer=new Uint8Array(1);buffer[0]=value,this.Write(buffer,0,1)},Write:function(buffer,offset,count){var i=this.get_Position()+count;if(i>this.get_Length()&&(i>this._capacity&&this.EnsureCapacity(i),this.set_Length(i)),count<=8&&buffer!=this._buffer)for(var byteCount=count;--byteCount>=0;)this._buffer[this.get_Position()+byteCount]=buffer[offset+byteCount];else{var dst=this._buffer,dstOffset=this.get_Position(),count1=Math.min(count,buffer.length-offset);dst.set(buffer.subarray(offset,offset+count1),dstOffset)}this.set_Position(i)},EnsureCapacity:function(value){if(value>this._capacity){var newCapacity=value;newCapacity<256&&(newCapacity=256),newCapacity<2*this._capacity&&(newCapacity=2*this._capacity),this.SetCapacity(newCapacity)}},ReadAll:function(){return this.ToArray()},ToArray:function(){var copy=new Uint8Array(this.get_Length()),src=this._buffer,count=this.get_Length();return copy.set(src.subarray(0,0+count),0),copy},__class__:alphaTab.io.ByteBuffer},alphaTab.io.EndOfReaderException=$hx_exports.alphaTab.io.EndOfReaderException=function(){alphaTab.AlphaTabException.call(this)},alphaTab.io.EndOfReaderException.__name__=["alphaTab","io","EndOfReaderException"],alphaTab.io.EndOfReaderException.__super__=alphaTab.AlphaTabException,alphaTab.io.EndOfReaderException.prototype=$extend(alphaTab.AlphaTabException.prototype,{EndOfReaderException:function(){return this.AlphaTabException(""),this},__class__:alphaTab.io.EndOfReaderException}),alphaTab.io.IOHelper=$hx_exports.alphaTab.io.IOHelper=function(){},alphaTab.io.IOHelper.__name__=["alphaTab","io","IOHelper"],alphaTab.io.IOHelper.ReadInt32BE=function(input){return input.ReadByte()<<24|input.ReadByte()<<16|input.ReadByte()<<8|input.ReadByte()},alphaTab.io.IOHelper.ReadInt32LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte(),ch3=input.ReadByte();return input.ReadByte()<<24|ch3<<16|ch2<<8|ch1},alphaTab.io.IOHelper.ReadUInt32LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte(),ch3=input.ReadByte(),ch4=input.ReadByte();return alphaTab.platform.Platform.ToUInt32(ch4<<24|ch3<<16|ch2<<8|ch1)},alphaTab.io.IOHelper.ReadUInt16LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToUInt16(ch2<<8|ch1)},alphaTab.io.IOHelper.ReadInt16LE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToInt16(ch2<<8|ch1)},alphaTab.io.IOHelper.ReadUInt32BE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte(),ch3=input.ReadByte(),ch4=input.ReadByte();return alphaTab.platform.Platform.ToUInt32(ch1<<24|ch2<<16|ch3<<8|ch4)},alphaTab.io.IOHelper.ReadUInt16BE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToUInt16(ch1<<8|ch2)},alphaTab.io.IOHelper.ReadInt16BE=function(input){var ch1=input.ReadByte(),ch2=input.ReadByte();return alphaTab.platform.Platform.ToInt16(ch1<<8|ch2)},alphaTab.io.IOHelper.ReadByteArray=function(input,length){var v=new Uint8Array(length);return input.Read(v,0,length),v},alphaTab.io.IOHelper.Read8BitChars=function(input,length){var b=new Uint8Array(length);return input.Read(b,0,b.length),alphaTab.platform.Platform.ToString(b)},alphaTab.io.IOHelper.Read8BitString=function(input){for(var s="",c=input.ReadByte();0!=c;)s+=String.fromCharCode(c),c=input.ReadByte();return s},alphaTab.io.IOHelper.Read8BitStringLength=function(input,length){for(var s="",z=-1,i=0;i=0?HxOverrides.substr(t,0,z):t},alphaTab.io.IOHelper.ReadSInt8=function(input){var v=input.ReadByte();return-256*((255&v)>>7)+(255&v)},alphaTab.io.IOHelper.ReadInt24=function(input,index){var i=input[index]|input[index+1]<<8|input[index+2]<<16;return 8388608==(8388608&i)&&(i|=-16777216),i},alphaTab.io.IOHelper.ReadInt16=function(input,index){return alphaTab.platform.Platform.ToInt16(input[index]|input[index+1]<<8)},haxe.io={},haxe.io.Input=function(){},haxe.io.Input.__name__=["haxe","io","Input"],haxe.io.Input.prototype={readByte:function(){throw new js._Boot.HaxeError("Not implemented")},readBytes:function(s,pos,len){var k=len,b=s.b;if(pos<0||len<0||pos+len>s.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);try{for(;k>0;)b[pos]=this.readByte(),++pos,--k}catch(eof){if(eof instanceof js._Boot.HaxeError&&(eof=eof.val),!js.Boot.__instanceof(eof,haxe.io.Eof))throw eof}return len-k},readFullBytes:function(s,pos,len){for(;len>0;){var k=this.readBytes(s,pos,len);if(0==k)throw new js._Boot.HaxeError(haxe.io.Error.Blocked);pos+=k,len-=k}},read:function(nbytes){for(var s=new haxe.io.Bytes(new ArrayBuffer(nbytes)),p=0;nbytes>0;){var k=this.readBytes(s,p,nbytes);if(0==k)throw new js._Boot.HaxeError(haxe.io.Error.Blocked);p+=k,nbytes-=k}return s},readInt16:function(){var ch1=this.readByte(),ch2=this.readByte(),n=this.bigEndian?ch2|ch1<<8:ch1|ch2<<8;return 0!=(32768&n)?n-65536:n},readUInt16:function(){var ch1=this.readByte(),ch2=this.readByte();return this.bigEndian?ch2|ch1<<8:ch1|ch2<<8},readInt32:function(){var ch1=this.readByte(),ch2=this.readByte(),ch3=this.readByte(),ch4=this.readByte();return this.bigEndian?ch4|ch3<<8|ch2<<16|ch1<<24:ch1|ch2<<8|ch3<<16|ch4<<24},readString:function(len){var b=new haxe.io.Bytes(new ArrayBuffer(len));return this.readFullBytes(b,0,len),b.toString()},__class__:haxe.io.Input},alphaTab.io.ReadableInput=$hx_exports.alphaTab.io.ReadableInput=function(readable){this._readable=null,this._readable=readable},alphaTab.io.ReadableInput.__name__=["alphaTab","io","ReadableInput"],alphaTab.io.ReadableInput.__super__=haxe.io.Input,alphaTab.io.ReadableInput.prototype=$extend(haxe.io.Input.prototype,{readByte:function(){return this._readable.ReadByte()},readBytes:function(s,pos,len){var data=new Uint8Array(s.b.bufferValue);return this._readable.Read(data,pos,len)},__class__:alphaTab.io.ReadableInput}),alphaTab.io.ZipEntry=$hx_exports.alphaTab.io.ZipEntry=function(){this.FullName=null,this.FileName=null,this.Data=null},alphaTab.io.ZipEntry.__name__=["alphaTab","io","ZipEntry"],alphaTab.io.ZipEntry.prototype={__class__:alphaTab.io.ZipEntry},alphaTab.io.ZipFile=$hx_exports.alphaTab.io.ZipFile=function(){this.FileFilter=null,this.Entries=null;this.Entries=[],this.FileFilter=function(s){return!0}},alphaTab.io.ZipFile.__name__=["alphaTab","io","ZipFile"],alphaTab.io.ZipFile.prototype={Load:function(s){for(var haxeInput=new alphaTab.io.ReadableInput(s),_g_head=new haxe.zip.Reader(haxeInput).read().h;null!=_g_head;){var val=_g_head.item;_g_head=_g_head.next;var entry=val,fullName=entry.fileName;if(null==this.FileFilter||this.FileFilter(fullName)){var i=fullName.lastIndexOf("/"),name=i>=0?HxOverrides.substr(fullName,i+1,null):fullName,data=entry.data.b.bufferValue,this1=this.Entries,_tmp=new alphaTab.io.ZipEntry;_tmp.FullName=fullName,_tmp.FileName=name,_tmp.Data=new Uint8Array(data),this1.push(_tmp)}}},__class__:alphaTab.io.ZipFile},alphaTab.model={},alphaTab.model._AccentuationType={},alphaTab.model._AccentuationType.AccentuationType_Impl_=$hx_exports.alphaTab.model._AccentuationType.AccentuationType_Impl_={},alphaTab.model._AccentuationType.AccentuationType_Impl_.__name__=["alphaTab","model","_AccentuationType","AccentuationType_Impl_"],alphaTab.model._AccentuationType.AccentuationType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccentuationType.AccentuationType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Normal";case 2:return"Heavy"}return""},alphaTab.model._AccidentalType={},alphaTab.model._AccidentalType.AccidentalType_Impl_=$hx_exports.alphaTab.model._AccidentalType.AccidentalType_Impl_={},alphaTab.model._AccidentalType.AccidentalType_Impl_.__name__=["alphaTab","model","_AccidentalType","AccidentalType_Impl_"],alphaTab.model._AccidentalType.AccidentalType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AccidentalType.AccidentalType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Natural";case 2:return"Sharp";case 3:return"Flat";case 4:return"NaturalQuarterNoteUp";case 5:return"SharpQuarterNoteUp";case 6:return"FlatQuarterNoteUp"}return""},alphaTab.model.Automation=$hx_exports.alphaTab.model.Automation=function(){this.IsLinear=!1,this.Type=0,this.Value=0,this.RatioPosition=0,this.Text=null},alphaTab.model.Automation.__name__=["alphaTab","model","Automation"],alphaTab.model.Automation.BuildTempoAutomation=function(isLinear,ratioPosition,value,reference){(reference<1||reference>5)&&(reference=2);var references=new Float32Array([1,.5,1,1.5,2,3]),automation=new alphaTab.model.Automation;return automation.Type=0,automation.IsLinear=isLinear,automation.RatioPosition=ratioPosition,automation.Value=value*references[reference],automation},alphaTab.model.Automation.CopyTo=function(src,dst){dst.IsLinear=src.IsLinear,dst.RatioPosition=src.RatioPosition,dst.Text=src.Text,dst.Type=src.Type,dst.Value=src.Value},alphaTab.model.Automation.prototype={Clone:function(){var a=new alphaTab.model.Automation;return alphaTab.model.Automation.CopyTo(this,a),a},__class__:alphaTab.model.Automation},alphaTab.model._AutomationType={},alphaTab.model._AutomationType.AutomationType_Impl_=$hx_exports.alphaTab.model._AutomationType.AutomationType_Impl_={},alphaTab.model._AutomationType.AutomationType_Impl_.__name__=["alphaTab","model","_AutomationType","AutomationType_Impl_"],alphaTab.model._AutomationType.AutomationType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._AutomationType.AutomationType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._AutomationType.AutomationType_Impl_.toString=function(this1){switch(this1){case 0:return"Tempo";case 1:return"Volume";case 2:return"Instrument";case 3:return"Balance"}return""},alphaTab.model.Bar=$hx_exports.alphaTab.model.Bar=function(){this.Id=0,this.Index=0,this.NextBar=null,this.PreviousBar=null,this.Clef=0,this.ClefOttava=0,this.Staff=null,this.Voices=null,this.SimileMark=0,this.Id=alphaTab.model.Bar.GlobalBarId++;this.Voices=[],this.Clef=4,this.ClefOttava=2,this.SimileMark=0},alphaTab.model.Bar.__name__=["alphaTab","model","Bar"],alphaTab.model.Bar.CopyTo=function(src,dst){dst.Id=src.Id,dst.Index=src.Index,dst.Clef=src.Clef,dst.ClefOttava=src.ClefOttava,dst.SimileMark=src.SimileMark},alphaTab.model.Bar.prototype={get_MasterBar:function(){return this.Staff.Track.Score.MasterBars[this.Index]},get_IsEmpty:function(){for(var i=0,j=this.Voices.length;ithis.MaxWhammyPoint.Value)&&(this.MaxWhammyPoint=point),(null==this.MinWhammyPoint||point.Value=this.WhammyBarPoints.length)){-1!=index&&this.WhammyBarPoints.splice(index,1);var point=this.WhammyBarPoints[index];if(point==this.MaxWhammyPoint){this.MaxWhammyPoint=null;for(var currentPoint=$iterator(this.WhammyBarPoints)();currentPoint.hasNext();){var currentPoint1=currentPoint.next();(null==this.MaxWhammyPoint||currentPoint1.Value>this.MaxWhammyPoint.Value)&&(this.MaxWhammyPoint=currentPoint1)}}if(point==this.MinWhammyPoint){this.MinWhammyPoint=null;for(var currentPoint2=$iterator(this.WhammyBarPoints)();currentPoint2.hasNext();){var currentPoint3=currentPoint2.next();(null==this.MinWhammyPoint||currentPoint3.Value=0&&-1!=index&&this.Notes.splice(index,1)},GetAutomation:function(type){for(var i=0,j=this.Automations.length;i0&&this.TupletNumerator>=0&&(ticks=alphaTab.audio.MidiUtils.ApplyTuplet(ticks,this.TupletNumerator,this.TupletDenominator)),ticks},UpdateDurations:function(){var ticks=this.CalculateDuration();this.PlaybackDuration=ticks,this.DisplayDuration=ticks;switch(this.GraceType){case 1:case 2:switch(this.Duration){case 8:this.PlaybackDuration=alphaTab.audio.MidiUtils.ToTicks(32);break;case 16:this.PlaybackDuration=alphaTab.audio.MidiUtils.ToTicks(64);break;case 32:this.PlaybackDuration=alphaTab.audio.MidiUtils.ToTicks(128)}break;case 3:this.PlaybackDuration=this.PlaybackDuration/2|0;break;default:var previous=this.PreviousBeat;if(null!=previous&&3==previous.GraceType)this.PlaybackDuration=previous.PlaybackDuration;else for(;null!=previous&&1==previous.GraceType;)this.PlaybackDuration=this.PlaybackDuration-previous.PlaybackDuration,previous=previous.PreviousBeat}},Finish:function(settings){var displayMode=null==settings?0:settings.DisplayMode,isGradual="grad"==this.Text||"grad."==this.Text;isGradual&&1==displayMode&&(this.Text="");var needCopyBeatForBend=!1;this.MinNote=null,this.MaxNote=null,this.MinStringNote=null,this.MaxStringNote=null;for(var visibleNotes=0,i=0,j=this.Notes.length;ithis.MaxNote.get_RealValue())&&(this.MaxNote=note),(null==this.MinStringNote||note.Stringthis.MaxStringNote.String)&&(this.MaxStringNote=note)),++i}if(0==visibleNotes&&(this.IsEmpty=!0),this.IsSlurOrigin&&(this.IsSlurOrigin=!0,this.SlurDestination=this.NextBeat,this.get_IsSlurDestination()?(this.SlurOrigin.SlurDestination=this.SlurDestination,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this.SlurOrigin)):(this.SlurOrigin=this,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this))),this.get_IsRest()||this.IsLetRing&&this.IsPalmMute)this.get_IsRest()&&null!=this.PreviousBeat&&null!=settings&&0==settings.DisplayMode&&(this.PreviousBeat.IsLetRing&&(this.IsLetRing=!0),this.PreviousBeat.IsPalmMute&&(this.IsPalmMute=!0));else for(var currentBeat=this.PreviousBeat;null!=currentBeat&¤tBeat.get_IsRest();)this.IsLetRing||(currentBeat.IsLetRing=!1),this.IsPalmMute||(currentBeat.IsPalmMute=!1),currentBeat=currentBeat.PreviousBeat;if(this.WhammyBarPoints.length>0&&1==this.WhammyBarType){1==displayMode&&(this.WhammyStyle=isGradual?1:2);var isContinuedWhammy=this.IsContinuedWhammy=null!=this.PreviousBeat&&this.PreviousBeat.get_HasWhammyBar();if(4==this.WhammyBarPoints.length){var origin=this.WhammyBarPoints[0],middle1=this.WhammyBarPoints[1],middle2=this.WhammyBarPoints[2],destination=this.WhammyBarPoints[3];middle1.Value==middle2.Value?origin.Valuemiddle1.Value&&middle1.Value>destination.Value?(0==origin.Value||isContinuedWhammy?this.WhammyBarType=2:this.WhammyBarType=6,this.WhammyBarPoints.splice(2,1),this.WhammyBarPoints.splice(1,1)):origin.Value>middle1.Value&&middle1.Valuedestination.Value?(this.WhammyBarType=3,middle1.Offset==middle2.Offset&&this.WhammyBarPoints.splice(2,1)):origin.Value==middle1.Value&&middle1.Value==destination.Value?(0==origin.Value||isContinuedWhammy?this.WhammyBarType=4:this.WhammyBarType=5,this.WhammyBarPoints.splice(2,1),this.WhammyBarPoints.splice(1,1)):alphaTab.util.Logger.Warning("Model","Unsupported whammy type detected, fallback to custom",null):alphaTab.util.Logger.Warning("Model","Unsupported whammy type detected, fallback to custom",null)}}if(this.UpdateDurations(),needCopyBeatForBend){var cloneBeat=this.Clone();cloneBeat.Id=alphaTab.model.Beat.GlobalBeatId++;for(var i1=0,j1=cloneBeat.Notes.length;i1beat.Voice.Bar.Index||beat.Voice.Bar.Index==this.Voice.Bar.Index&&this.Index>beat.Index},HasNoteOnString:function(noteString){return this.NoteStringLookup.hasOwnProperty(noteString)},__class__:alphaTab.model.Beat},alphaTab.model.BendPoint=$hx_exports.alphaTab.model.BendPoint=function(offset,value){null==value&&(value=0),null==offset&&(offset=0),this.Offset=0,this.Value=0,this.Offset=offset,this.Value=value},alphaTab.model.BendPoint.__name__=["alphaTab","model","BendPoint"],alphaTab.model.BendPoint.CopyTo=function(src,dst){dst.Offset=src.Offset,dst.Value=src.Value},alphaTab.model.BendPoint.prototype={Clone:function(){var point=new alphaTab.model.BendPoint(0,0);return alphaTab.model.BendPoint.CopyTo(this,point),point},__class__:alphaTab.model.BendPoint},alphaTab.model._BendStyle={},alphaTab.model._BendStyle.BendStyle_Impl_=$hx_exports.alphaTab.model._BendStyle.BendStyle_Impl_={},alphaTab.model._BendStyle.BendStyle_Impl_.__name__=["alphaTab","model","_BendStyle","BendStyle_Impl_"],alphaTab.model._BendStyle.BendStyle_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendStyle.BendStyle_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendStyle.BendStyle_Impl_.toString=function(this1){switch(this1){case 0:return"Default";case 1:return"Gradual";case 2:return"Fast"}return""},alphaTab.model._BendType={},alphaTab.model._BendType.BendType_Impl_=$hx_exports.alphaTab.model._BendType.BendType_Impl_={},alphaTab.model._BendType.BendType_Impl_.__name__=["alphaTab","model","_BendType","BendType_Impl_"],alphaTab.model._BendType.BendType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._BendType.BendType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendType.BendType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._BendType.BendType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._BendType.BendType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._BendType.BendType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BendType.BendType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendType.BendType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BendType.BendType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BendType.BendType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Custom";case 2:return"Bend";case 3:return"Release";case 4:return"BendRelease";case 5:return"Hold";case 6:return"Prebend";case 7:return"PrebendBend";case 8:return"PrebendRelease"}return""},alphaTab.model._BrushType={},alphaTab.model._BrushType.BrushType_Impl_=$hx_exports.alphaTab.model._BrushType.BrushType_Impl_={},alphaTab.model._BrushType.BrushType_Impl_.__name__=["alphaTab","model","_BrushType","BrushType_Impl_"],alphaTab.model._BrushType.BrushType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._BrushType.BrushType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._BrushType.BrushType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._BrushType.BrushType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"BrushUp";case 2:return"BrushDown";case 3:return"ArpeggioUp";case 4:return"ArpeggioDown"}return""},alphaTab.model.Chord=$hx_exports.alphaTab.model.Chord=function(){this.Name=null,this.FirstFret=0,this.Strings=null,this.BarreFrets=null;this.Strings=[];this.BarreFrets=[]},alphaTab.model.Chord.__name__=["alphaTab","model","Chord"],alphaTab.model.Chord.CopyTo=function(src,dst){dst.FirstFret=src.FirstFret,dst.Name=src.Name,dst.Strings=src.Strings.slice(0)},alphaTab.model.Chord.prototype={__class__:alphaTab.model.Chord},alphaTab.model._Clef={},alphaTab.model._Clef.Clef_Impl_=$hx_exports.alphaTab.model._Clef.Clef_Impl_={},alphaTab.model._Clef.Clef_Impl_.__name__=["alphaTab","model","_Clef","Clef_Impl_"],alphaTab.model._Clef.Clef_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._Clef.Clef_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Clef.Clef_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._Clef.Clef_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._Clef.Clef_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._Clef.Clef_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Clef.Clef_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Clef.Clef_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Clef.Clef_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Clef.Clef_Impl_.toString=function(this1){switch(this1){case 0:return"Neutral";case 1:return"C3";case 2:return"C4";case 3:return"F4";case 4:return"G2"}return""},alphaTab.model._CrescendoType={},alphaTab.model._CrescendoType.CrescendoType_Impl_=$hx_exports.alphaTab.model._CrescendoType.CrescendoType_Impl_={},alphaTab.model._CrescendoType.CrescendoType_Impl_.__name__=["alphaTab","model","_CrescendoType","CrescendoType_Impl_"],alphaTab.model._CrescendoType.CrescendoType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._CrescendoType.CrescendoType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Crescendo";case 2:return"Decrescendo"}return""},alphaTab.model._Duration={},alphaTab.model._Duration.Duration_Impl_=$hx_exports.alphaTab.model._Duration.Duration_Impl_={},alphaTab.model._Duration.Duration_Impl_.__name__=["alphaTab","model","_Duration","Duration_Impl_"],alphaTab.model._Duration.Duration_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._Duration.Duration_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Duration.Duration_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._Duration.Duration_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._Duration.Duration_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._Duration.Duration_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Duration.Duration_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Duration.Duration_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Duration.Duration_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Duration.Duration_Impl_.toString=function(this1){switch(this1){case-4:return"QuadrupleWhole";case-2:return"DoubleWhole";case 1:return"Whole";case 2:return"Half";case 4:return"Quarter";case 8:return"Eighth";case 16:return"Sixteenth";case 32:return"ThirtySecond";case 64:return"SixtyFourth";case 128:return"OneHundredTwentyEighth";case 256:return"TwoHundredFiftySixth"}return""},alphaTab.model._DynamicValue={},alphaTab.model._DynamicValue.DynamicValue_Impl_=$hx_exports.alphaTab.model._DynamicValue.DynamicValue_Impl_={},alphaTab.model._DynamicValue.DynamicValue_Impl_.__name__=["alphaTab","model","_DynamicValue","DynamicValue_Impl_"],alphaTab.model._DynamicValue.DynamicValue_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._DynamicValue.DynamicValue_Impl_.toString=function(this1){switch(this1){case 0:return"PPP";case 1:return"PP";case 2:return"P";case 3:return"MP";case 4:return"MF";case 5:return"F";case 6:return"FF";case 7:return"FFF"}return""},alphaTab.model.Fermata=$hx_exports.alphaTab.model.Fermata=function(){this.Type=0,this.Length=0},alphaTab.model.Fermata.__name__=["alphaTab","model","Fermata"],alphaTab.model.Fermata.CopyTo=function(src,dst){dst.Type=src.Type,dst.Length=src.Length},alphaTab.model.Fermata.prototype={__class__:alphaTab.model.Fermata},alphaTab.model._FermataType={},alphaTab.model._FermataType.FermataType_Impl_=$hx_exports.alphaTab.model._FermataType.FermataType_Impl_={},alphaTab.model._FermataType.FermataType_Impl_.__name__=["alphaTab","model","_FermataType","FermataType_Impl_"],alphaTab.model._FermataType.FermataType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._FermataType.FermataType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._FermataType.FermataType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._FermataType.FermataType_Impl_.toString=function(this1){switch(this1){case 0:return"Short";case 1:return"Medium";case 2:return"Long"}return""},alphaTab.model._Fingers={},alphaTab.model._Fingers.Fingers_Impl_=$hx_exports.alphaTab.model._Fingers.Fingers_Impl_={},alphaTab.model._Fingers.Fingers_Impl_.__name__=["alphaTab","model","_Fingers","Fingers_Impl_"],alphaTab.model._Fingers.Fingers_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._Fingers.Fingers_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._Fingers.Fingers_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._Fingers.Fingers_Impl_.toString=function(this1){switch(this1){case-2:return"Unknown";case-1:return"NoOrDead";case 0:return"Thumb";case 1:return"IndexFinger";case 2:return"MiddleFinger";case 3:return"AnnularFinger";case 4:return"LittleFinger"}return""},alphaTab.model._GraceType={},alphaTab.model._GraceType.GraceType_Impl_=$hx_exports.alphaTab.model._GraceType.GraceType_Impl_={},alphaTab.model._GraceType.GraceType_Impl_.__name__=["alphaTab","model","_GraceType","GraceType_Impl_"],alphaTab.model._GraceType.GraceType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._GraceType.GraceType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._GraceType.GraceType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._GraceType.GraceType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"OnBeat";case 2:return"BeforeBeat";case 3:return"BendGrace"}return""},alphaTab.model._HarmonicType={},alphaTab.model._HarmonicType.HarmonicType_Impl_=$hx_exports.alphaTab.model._HarmonicType.HarmonicType_Impl_={},alphaTab.model._HarmonicType.HarmonicType_Impl_.__name__=["alphaTab","model","_HarmonicType","HarmonicType_Impl_"],alphaTab.model._HarmonicType.HarmonicType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._HarmonicType.HarmonicType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Natural";case 2:return"Artificial";case 3:return"Pinch";case 4:return"Tap";case 5:return"Semi";case 6:return"Feedback"}return""},alphaTab.model.JsonConverter=$hx_exports.alphaTab.model.JsonConverter=function(){},alphaTab.model.JsonConverter.__name__=["alphaTab","model","JsonConverter"],alphaTab.model.JsonConverter.ScoreToJson=function(score){var obj=alphaTab.model.JsonConverter.ScoreToJsObject(score);return JSON.stringify(obj,function(k,v){return ArrayBuffer.isView(v)?Array.apply([],v):v})},alphaTab.model.JsonConverter.JsonToScore=function(json,settings){return alphaTab.model.JsonConverter.JsObjectToScore(alphaTab.model.JsonConverter.JsObjectToScore(JSON.parse(json),settings),null)},alphaTab.model.JsonConverter.ScoreToJsObject=function(score){var score2={};alphaTab.model.Score.CopyTo(score,score2);score2.MasterBars=[];score2.Tracks=[],score2.Stylesheet={},alphaTab.model.RenderStylesheet.CopyTo(score.Stylesheet,score2.Stylesheet);for(var i=0;i0},get_IsSectionStart:function(){return null!=this.Section},CalculateDuration:function(){return this.TimeSignatureNumerator*alphaTab.audio.MidiUtils.ValueToTicks(this.TimeSignatureDenominator)},AddFermata:function(offset,fermata){this.Fermata[offset]=fermata},GetFermata:function(beat){return this.Fermata.hasOwnProperty(beat.PlaybackStart)?this.Fermata[beat.PlaybackStart]:null},__class__:alphaTab.model.MasterBar},alphaTab.model.ModelUtils=$hx_exports.alphaTab.model.ModelUtils=function(){},alphaTab.model.ModelUtils.__name__=["alphaTab","model","ModelUtils"],alphaTab.model.ModelUtils.GetIndex=function(duration){if(duration<0)return 0;var this1=duration;return system.Convert.ToInt32_Single(Math.log2(this1))},alphaTab.model.ModelUtils.KeySignatureIsFlat=function(ks){return ks<0},alphaTab.model.ModelUtils.KeySignatureIsNatural=function(ks){return 0==ks},alphaTab.model.ModelUtils.KeySignatureIsSharp=function(ks){return ks>0},alphaTab.model.ModelUtils.ApplyPitchOffsets=function(settings,score){for(var i=0;i0?staff.Tuning[staff.Tuning.length-(noteString-1)-1]:0},alphaTab.model.Note.CopyTo=function(src,dst){dst.Id=src.Id,dst.Accentuated=src.Accentuated,dst.Fret=src.Fret,dst.String=src.String,dst.IsHammerPullOrigin=src.IsHammerPullOrigin,dst.IsSlurOrigin=src.IsSlurOrigin,dst.HarmonicValue=src.HarmonicValue,dst.HarmonicType=src.HarmonicType,dst.IsGhost=src.IsGhost,dst.IsLetRing=src.IsLetRing,dst.IsPalmMute=src.IsPalmMute,dst.IsDead=src.IsDead,dst.IsStaccato=src.IsStaccato,dst.SlideType=src.SlideType,dst.Vibrato=src.Vibrato,dst.IsTieOrigin=src.IsTieOrigin,dst.IsTieDestination=src.IsTieDestination,dst.LeftHandFinger=src.LeftHandFinger,dst.RightHandFinger=src.RightHandFinger,dst.IsFingering=src.IsFingering,dst.TrillValue=src.TrillValue,dst.TrillSpeed=src.TrillSpeed,dst.DurationPercent=src.DurationPercent,dst.AccidentalMode=src.AccidentalMode,dst.Dynamic=src.Dynamic,dst.Octave=src.Octave,dst.Tone=src.Tone,dst.Element=src.Element,dst.Variation=src.Variation,dst.BendType=src.BendType,dst.BendStyle=src.BendStyle,dst.IsContinuedBend=src.IsContinuedBend,dst.IsVisible=src.IsVisible},alphaTab.model.Note.NextNoteOnSameLine=function(note){for(var nextBeat=note.Beat.NextBeat;null!=nextBeat&&nextBeat.Voice.Bar.Index<=note.Beat.Voice.Bar.Index+3;){var noteOnString=nextBeat.GetNoteOnString(note.String);if(null!=noteOnString)return noteOnString;nextBeat=nextBeat.NextBeat}return null},alphaTab.model.Note.PreviousNoteOnSameLine=function(note){for(var previousBeat=note.Beat.PreviousBeat;null!=previousBeat&&previousBeat.Voice.Bar.Index>=note.Beat.Voice.Bar.Index-3;){var noteOnString=previousBeat.GetNoteOnString(note.String);if(null!=noteOnString)return noteOnString;previousBeat=previousBeat.PreviousBeat}return null},alphaTab.model.Note.prototype={get_HasBend:function(){return 0!=this.BendType},get_IsStringed:function(){return this.Fret>=0&&this.String>=0},get_IsPiano:function(){return!this.get_IsStringed()&&(this.Octave>=0&&this.Tone>=0)},get_IsPercussion:function(){return!this.get_IsStringed()&&(this.Element>=0&&this.Variation>=0)},get_IsHammerPullDestination:function(){return null!=this.HammerPullOrigin},get_IsSlurDestination:function(){return null!=this.SlurOrigin},get_IsHarmonic:function(){return 0!=this.HarmonicType},get_TrillFret:function(){return this.TrillValue-this.get_StringTuning()},get_IsTrill:function(){return this.TrillValue>=0},get_StringTuning:function(){return this.Beat.Voice.Bar.Staff.Capo+alphaTab.model.Note.GetStringTuning(this.Beat.Voice.Bar.Staff,this.String)},get_RealValue:function(){return this.get_IsPercussion()?alphaTab.rendering.utils.PercussionMapper.MidiFromElementVariation(this):this.get_IsStringed()?1==this.HarmonicType?this.get_HarmonicPitch()+this.get_StringTuning()-this.Beat.Voice.Bar.Staff.TranspositionPitch:this.Fret+this.get_StringTuning()-this.Beat.Voice.Bar.Staff.TranspositionPitch+this.get_HarmonicPitch():this.get_IsPiano()?12*this.Octave+this.Tone-this.Beat.Voice.Bar.Staff.TranspositionPitch:0},get_HarmonicPitch:function(){if(0==this.HarmonicType||!this.get_IsStringed())return 0;var value=this.HarmonicValue;return alphaTab.platform.Platform.IsAlmostEqualTo(value,2.4)?36:alphaTab.platform.Platform.IsAlmostEqualTo(value,2.7)?34:value<3?0:value<=3.5?31:value<=4?28:value<=5?24:value<=6?34:value<=7?19:value<=8.5?36:value<=9?28:value<=10?34:value<=11?0:value<=12?12:value<14?0:value<=15?34:value<=16?28:value<=17?36:value<=18?0:value<=19?19:value<=21?0:value<=22?36:value<=24?24:0},get_DisplayValue:function(){var noteValue=this.get_DisplayValueWithoutBend();return this.get_HasBend()?noteValue+=this.BendPoints[0].Value/2|0:null!=this.BendOrigin?noteValue+=this.BendOrigin.BendPoints[this.BendOrigin.BendPoints.length-1].Value/2|0:this.IsTieDestination&&null!=this.TieOrigin.BendOrigin?noteValue+=this.TieOrigin.BendOrigin.BendPoints[this.TieOrigin.BendOrigin.BendPoints.length-1].Value/2|0:this.Beat.get_HasWhammyBar()?noteValue+=this.Beat.WhammyBarPoints[0].Value/2|0:this.Beat.IsContinuedWhammy&&(noteValue+=this.Beat.PreviousBeat.WhammyBarPoints[this.Beat.PreviousBeat.WhammyBarPoints.length-1].Value/2|0),noteValue},get_DisplayValueWithoutBend:function(){var noteValue=this.get_RealValue();1!=this.HarmonicType&&0!=this.HarmonicType&&(noteValue-=this.get_HarmonicPitch());switch(this.Beat.Ottava){case 0:noteValue-=24;break;case 1:noteValue-=12;break;case 2:break;case 3:noteValue+=12;break;case 4:noteValue+=24}switch(this.Beat.Voice.Bar.ClefOttava){case 0:noteValue-=24;break;case 1:noteValue-=12;break;case 2:break;case 3:noteValue+=12;break;case 4:noteValue+=24}return noteValue-this.Beat.Voice.Bar.Staff.DisplayTranspositionPitch},get_HasQuarterToneOffset:function(){return this.get_HasBend()?this.BendPoints[0].Value%2!=0:null!=this.BendOrigin?this.BendOrigin.BendPoints[this.BendOrigin.BendPoints.length-1].Value%2!=0:this.Beat.get_HasWhammyBar()?this.Beat.WhammyBarPoints[0].Value%2!=0:!!this.Beat.IsContinuedWhammy&&this.Beat.PreviousBeat.WhammyBarPoints[this.Beat.PreviousBeat.WhammyBarPoints.length-1].Value%2!=0},Clone:function(){var n=new alphaTab.model.Note,id=n.Id;alphaTab.model.Note.CopyTo(this,n);for(var i=0,j=this.BendPoints.length;ithis.MaxBendPoint.Value)&&(this.MaxBendPoint=point),0==this.BendType&&(this.BendType=1)},Finish:function(settings){var _gthis=this,nextNoteOnLine=new alphaTab.util.Lazy(function(){return alphaTab.model.Note.NextNoteOnSameLine(_gthis)}),prevNoteOnLine=new alphaTab.util.Lazy(function(){return alphaTab.model.Note.PreviousNoteOnSameLine(_gthis)}),isSongBook=null!=settings&&1==settings.DisplayMode;this.IsTieDestination&&(null==prevNoteOnLine.get_Value()?this.IsTieDestination=!1:(this.TieOrigin=prevNoteOnLine.get_Value(),this.TieOrigin.IsTieOrigin=!0,this.TieOrigin.TieDestination=this,this.Fret=this.TieOrigin.Fret,this.Octave=this.TieOrigin.Octave,this.Tone=this.TieOrigin.Tone,this.TieOrigin.get_HasBend()&&(this.BendOrigin=this.TieOrigin)),isSongBook&&this.TieOrigin.IsLetRing&&(this.IsLetRing=!0)),this.IsLetRing&&(null!=nextNoteOnLine.get_Value()&&nextNoteOnLine.get_Value().IsLetRing?this.LetRingDestination=nextNoteOnLine.get_Value():this.LetRingDestination=this,isSongBook&&this.IsTieDestination&&!this.TieOrigin.get_HasBend()&&(this.IsVisible=!1)),this.IsPalmMute&&(null!=nextNoteOnLine.get_Value()&&nextNoteOnLine.get_Value().IsPalmMute?this.PalmMuteDestination=nextNoteOnLine.get_Value():this.PalmMuteDestination=this),(this.IsHammerPullOrigin||2==this.SlideType)&&(this.IsSlurOrigin=!0,this.SlurDestination=nextNoteOnLine.get_Value(),this.get_IsSlurDestination()?(this.SlurOrigin.SlurDestination=this.SlurDestination,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this.SlurOrigin)):(this.SlurOrigin=this,null!=this.SlurDestination&&(this.SlurDestination.SlurOrigin=this))),this.IsHammerPullOrigin&&(null==nextNoteOnLine.get_Value()?this.IsHammerPullOrigin=!1:(this.HammerPullDestination=nextNoteOnLine.get_Value(),this.HammerPullDestination.HammerPullOrigin=this));switch(this.SlideType){case 1:case 2:this.SlideTarget=nextNoteOnLine.get_Value(),null==this.SlideTarget&&(this.SlideType=0)}if(this.BendPoints.length>0&&1==this.BendType){var isContinuedBend=this.IsContinuedBend=null!=this.TieOrigin&&this.TieOrigin.get_HasBend();if(4==this.BendPoints.length){var origin=this.BendPoints[0],middle1=this.BendPoints[1],middle2=this.BendPoints[2],destination=this.BendPoints[3];middle1.Value==middle2.Value?destination.Value>origin.Value?middle1.Value>destination.Value?this.BendType=4:!isContinuedBend&&origin.Value>0?(this.BendType=7,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):(this.BendType=2,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):destination.Valueorigin.Value?this.BendType=4:origin.Value>0&&!isContinuedBend?(this.BendType=6,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):(this.BendType=5,this.BendPoints.splice(2,1),this.BendPoints.splice(1,1)):alphaTab.util.Logger.Warning("Model","Unsupported bend type detected, fallback to custom",null)}else if(2==this.BendPoints.length){var origin1=this.BendPoints[0],destination1=this.BendPoints[1];destination1.Value>origin1.Value?!isContinuedBend&&origin1.Value>0?this.BendType=7:this.BendType=2:destination1.Value0},Finish:function(settings){for(var i=0,j=this.Bars.length;i0&&(bar.PreviousBar=bars[bars.length-1],bar.PreviousBar.NextBar=bar),bars.push(bar)},__class__:alphaTab.model.Staff},alphaTab.model._StaffKind={},alphaTab.model._StaffKind.StaffKind_Impl_=$hx_exports.alphaTab.model._StaffKind.StaffKind_Impl_={},alphaTab.model._StaffKind.StaffKind_Impl_.__name__=["alphaTab","model","_StaffKind","StaffKind_Impl_"],alphaTab.model._StaffKind.StaffKind_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._StaffKind.StaffKind_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._StaffKind.StaffKind_Impl_.toString=function(this1){switch(this1){case 0:return"Tablature";case 1:return"Score";case 2:return"Percussion";case 3:return"Mixed"}return""},alphaTab.model.Track=$hx_exports.alphaTab.model.Track=function(staveCount){this.Index=0,this.Score=null,this.Staves=null,this.PlaybackInfo=null,this.Color=null,this.Name=null,this.ShortName=null;this.Staves=[],this.EnsureStaveCount(staveCount),this.PlaybackInfo=new alphaTab.model.PlaybackInformation,this.Name="",this.ShortName="",this.Color=new alphaTab.platform.model.Color(200,0,0,255)},alphaTab.model.Track.__name__=["alphaTab","model","Track"],alphaTab.model.Track.CopyTo=function(src,dst){dst.Name=src.Name,dst.ShortName=src.ShortName,dst.Index=src.Index,dst.Color.Raw=src.Color.Raw,dst.Color.RGBA=src.Color.RGBA},alphaTab.model.Track.prototype={EnsureStaveCount:function(staveCount){for(;this.Staves.length10&&(this.ShortName=HxOverrides.substr(this.ShortName,0,10)));for(var i=0,j=this.Staves.length;i=0)for(var beat=staff.Bars[lyric2.StartBar].Voices[0].Beats[0],ci=0;ci=65&&c<=90||c>=97&&c<=122||35==c))return null;note+=String.fromCharCode(c)}++i}if(null==octave||0==octave.length||null==note||0==note.length)return null;var result=new alphaTab.model.TuningParseResult;return result.Octave=alphaTab.platform.Platform.ParseInt(octave)+1,result.Note=note.toLowerCase(),result.NoteValue=alphaTab.model.TuningParser.GetToneForText(result.Note),result},alphaTab.model.TuningParser.GetTuningForText=function(str){var result=alphaTab.model.TuningParser.Parse(str);return null==result?-1:result.get_RealValue()},alphaTab.model.TuningParser.GetToneForText=function(note){var b;switch(note.toLowerCase()){case"a":b=9;break;case"a#":case"bb":b=10;break;case"ab":case"g#":b=8;break;case"b":b=11;break;case"c":b=0;break;case"c#":case"db":b=1;break;case"d":b=2;break;case"e":b=4;break;case"d#":case"eb":b=3;break;case"f":b=5;break;case"g":b=7;break;case"f#":case"gb":b=6;break;default:return 0}return b},alphaTab.model._VibratoType={},alphaTab.model._VibratoType.VibratoType_Impl_=$hx_exports.alphaTab.model._VibratoType.VibratoType_Impl_={},alphaTab.model._VibratoType.VibratoType_Impl_.__name__=["alphaTab","model","_VibratoType","VibratoType_Impl_"],alphaTab.model._VibratoType.VibratoType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.model._VibratoType.VibratoType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.model._VibratoType.VibratoType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Slight";case 2:return"Wide"}return""},alphaTab.model.Voice=$hx_exports.alphaTab.model.Voice=function(){this._beatLookup=null,this.Index=0,this.Bar=null,this.Beats=null,this.IsEmpty=!1;this.Beats=[],this.IsEmpty=!0},alphaTab.model.Voice.__name__=["alphaTab","model","Voice"],alphaTab.model.Voice.CopyTo=function(src,dst){dst.Index=src.Index,dst.IsEmpty=src.IsEmpty},alphaTab.model.Voice.prototype={InsertBeat:function(after,newBeat){newBeat.NextBeat=after.NextBeat,null!=newBeat.NextBeat&&(newBeat.NextBeat.PreviousBeat=newBeat),newBeat.PreviousBeat=after,newBeat.Voice=this,after.NextBeat=newBeat,this.Beats.splice(after.Index+1,0,newBeat)},AddBeat:function(beat){beat.Voice=this,beat.Index=this.Beats.length,this.Beats.push(beat),beat.IsEmpty||(this.IsEmpty=!1)},Chain:function(beat){if(null!=this.Bar)if(beat.Index0?(beat.NextBeat=nextVoice.Beats[0],beat.NextBeat.PreviousBeat=beat):beat.NextBeat.PreviousBeat=beat}},AddGraceBeat:function(beat){if(0!=this.Beats.length){var lastBeat=this.Beats[this.Beats.length-1],index=this.Beats.length-1;-1!=index&&this.Beats.splice(index,1),this.AddBeat(beat),this.AddBeat(lastBeat),this.IsEmpty=!1}else this.AddBeat(beat)},GetBeatAtDisplayStart:function(displayStart){return this._beatLookup.hasOwnProperty(displayStart)?this._beatLookup[displayStart]:null},Finish:function(settings){this._beatLookup={};for(var index=0;index=0&&rect.top<=window.innerHeight&&rect.left+rect.width>=0&&rect.left<=window.innerWidth},alphaTab.platform.javaScript.AlphaTabApi.prototype={get_IsElementVisible:function(){return!(!this.Element.offsetWidth&&!this.Element.offsetHeight)||!!this.Element.getClientRects().length},get_Tracks:function(){var tracks=this.TrackIndexesToTracks(this.TrackIndexes);return 0==tracks.length&&this.Score.Tracks.length>0&&tracks.push(this.Score.Tracks[0]),tracks},GetDataAttributes:function(){var dataAttributes={};if(this.Element.dataset)for(var json=this.Element.dataset,key=HxOverrides.iter(Object.keys(json));key.hasNext();){var key1=key.next(),value=this.Element.dataset[key1];try{var stringValue=value;value=JSON.parse(stringValue)}catch(__e){""==value&&(value=null)}dataAttributes[key1]=value}else for(var i=0;i"),preview.document.body.appendChild(a4);var dualScreenLeft;dualScreenLeft=void 0!==window.ScreenLeft?window.ScreenLeft:window.screen.left;var dualScreenTop;dualScreenTop=void 0!==window.ScreenTop?window.ScreenTop:window.screen.top;var screenWidth;if(void 0!==window.innerWidth)screenWidth=window.innerWidth;else{screenWidth=void 0!==window.document.documentElement.clientWidth?window.document.documentElement.clientWidth:window.screen.width}var screenHeight;if(void 0!==window.innerHeight)screenHeight=window.innerHeight;else{screenHeight=void 0!==window.document.documentElement.clientHeight?window.document.documentElement.clientHeight:window.screen.height}var w=a4.offsetWidth+50,h=window.innerHeight,left=(screenWidth/2|0)-(w/2|0)+dualScreenLeft,top=(screenHeight/2|0)-(h/2|0)+dualScreenTop;preview.resizeTo(w,h),preview.moveTo(left,top),preview.focus();var settings=alphaTab.Settings.get_Defaults();settings.ScriptFile=this.Settings.ScriptFile,settings.FontDirectory=this.Settings.FontDirectory,settings.Scale=.8,settings.StretchForce=.8,settings.DisableLazyLoading=!0,settings.UseWebWorker=!1;var alphaTab1=new alphaTab.platform.javaScript.AlphaTabApi(a4,settings);alphaTab1.Renderer.PostRenderFinished=system._EventAction.EventAction_Impl_.add(alphaTab1.Renderer.PostRenderFinished,function(){alphaTab1._canvasElement.style.height="100%",preview.print()});var tmp=this.get_Tracks();alphaTab1.SetTracks(tmp,!0)},AppendRenderResult:function(result){var _gthis=this;null!=result&&(this._canvasElement.style.width=Std.string(result.TotalWidth)+"px",this._canvasElement.style.height=Std.string(result.TotalHeight)+"px"),null!=result&&null==result.RenderResult||(this._renderResults.push(result),window.setTimeout(function(){for(;_gthis._renderResults.length>0;){var renderResult=_gthis._renderResults[0];if(_gthis._renderResults.splice(0,1),null==renderResult)for(;_gthis._canvasElement.childElementCount>_gthis._totalResultCount;)_gthis._canvasElement.removeChild(_gthis._canvasElement.lastChild);else{var body=renderResult.RenderResult;if("string"==typeof body){var placeholder;if(_gthis._totalResultCount<_gthis._canvasElement.childElementCount?placeholder=_gthis._canvasElement.childNodes.item(_gthis._totalResultCount):(placeholder=window.document.createElement("div"),_gthis._canvasElement.appendChild(placeholder)),placeholder.style.width=Std.string(renderResult.Width)+"px",placeholder.style.height=Std.string(renderResult.Height)+"px",placeholder.style.display="inline-block",alphaTab.platform.javaScript.AlphaTabApi.IsElementInViewPort(placeholder)||_gthis.Settings.DisableLazyLoading){var bodyHtml=body;placeholder.outerHTML=bodyHtml}else placeholder.svg=body,placeholder.setAttribute("data-lazy","true")}else _gthis._totalResultCount<_gthis._canvasElement.childElementCount?_gthis._canvasElement.replaceChild(renderResult.RenderResult,_gthis._canvasElement.childNodes.item(_gthis._totalResultCount)):_gthis._canvasElement.appendChild(renderResult.RenderResult);_gthis._totalResultCount++}}},1))},CreateStyleElement:function(settings){var elementDocument=this.Element.ownerDocument,styleElement=elementDocument.getElementById("alphaTabStyle");if(null==styleElement){var fontDirectory=settings.FontDirectory;(styleElement=elementDocument.createElement("style")).id="alphaTabStyle",styleElement.type="text/css";var css="";css+="@font-face {\r\n",css=(css=(css=(css=(css=(css+=" font-family: 'alphaTab';\r\n")+" src: url('"+fontDirectory+"Bravura.eot');\r\n")+" src: url('"+fontDirectory+"Bravura.eot?#iefix') format('embedded-opentype')\r\n")+" , url('"+fontDirectory+"Bravura.woff') format('woff')\r\n")+" , url('"+fontDirectory+"Bravura.otf') format('opentype')\r\n")+" , url('"+fontDirectory+"Bravura.svg#Bravura') format('svg');\r\n",css+=" font-weight: normal;\r\n",css+=" font-style: normal;\r\n",css+="}\r\n",css+=".alphaTabSurface * {\r\n",css+=" cursor: default;\r\n",css+="}\r\n",css+=".at {\r\n",css+=" font-family: 'alphaTab';\r\n",css+=" speak: none;\r\n",css+=" font-style: normal;\r\n",css+=" font-weight: normal;\r\n",css+=" font-variant: normal;\r\n",css+=" text-transform: none;\r\n",css+=" line-height: 1;\r\n",css+=" line-height: 1;\r\n",css+=" -webkit-font-smoothing: antialiased;\r\n",css+=" -moz-osx-font-smoothing: grayscale;\r\n",css+=" font-size: 34px;\r\n",css+=" overflow: visible !important;\r\n",css+="}\r\n",styleElement.innerHTML=css,elementDocument.getElementsByTagName("head").item(0).appendChild(styleElement),alphaTab.Environment.CheckForFontAvailability()}},Destroy:function(){this.Element.innerHTML="",this.Renderer.Destroy()},Load:function(data){var _gthis=this;this.Element.classList.add("loading");try{data instanceof ArrayBuffer?this.ScoreLoaded(alphaTab.importer.ScoreLoader.LoadScoreFromBytes(new Uint8Array(data),this.Settings),!0):data instanceof Uint8Array?this.ScoreLoaded(alphaTab.importer.ScoreLoader.LoadScoreFromBytes(data,this.Settings),!0):"string"==typeof data&&alphaTab.importer.ScoreLoader.LoadScoreAsync(data,function(s){_gthis.ScoreLoaded(s,!0)},function(e){_gthis.Error("import",e)},this.Settings)}catch(e1){if(e1 instanceof js._Boot.HaxeError&&(e1=e1.val),!js.Boot.__instanceof(e1,system.Exception))throw e1;this.Error("import",e1)}},Tex:function(contents){this.Element.classList.add("loading");try{var parser=new alphaTab.importer.AlphaTexImporter,data=alphaTab.io.ByteBuffer.FromBuffer(alphaTab.platform.Platform.StringToByteArray(contents));parser.Init(data,this.Settings),this.ScoreLoaded(parser.ReadScore(),!0)}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;this.Error("import",e)}},SetTracks:function(tracksData,render){null==render&&(render=!0);var tmp;if(tracksData.length){tmp="number"==typeof tracksData[0].Index}else tmp=!1;if(tmp)this.Score=tracksData[0].Score;else{"number"==typeof tracksData.Index&&(this.Score=tracksData.Score)}this.TrackIndexes=this.ParseTracks(tracksData),render&&this.Render()},TrackIndexesToTracks:function(trackIndexes){for(var tracks=[],track=new system.Int32ArrayIterator(trackIndexes);track.hasNext();){var track1=track.next();track1>=0&&track1=0&&tracks.push(value),++i}else{"number"==typeof tracksData.Index&&tracks.push(tracksData.Index.As())}return new Int32Array(tracks)},ScoreLoaded:function(score,render){null==render&&(render=!0),alphaTab.model.ModelUtils.ApplyPitchOffsets(this.Settings,score),this.Score=score,this.LoadMidiForScore(),this.TriggerEvent("loaded",score),render&&this.Render()},Error:function(type,details){alphaTab.util.Logger.Error(type,"An unexpected error occurred",details),this.TriggerEvent("error",{type:type,details:details})},TriggerEvent:function(name,details){if(null!=this.Element){name="alphaTab."+name;var e=window.document.createEvent("CustomEvent");e.initCustomEvent(name,!1,!1,details),this.Element.dispatchEvent(e);var json=window;if(json&&"jQuery"in json){(0,window.jQuery)(this.Element).trigger(name,details)}}},Render:function(){var _gthis=this;if(null!=this.Renderer){var renderAction=null;(renderAction=function(){alphaTab.Environment.IsFontLoaded||"html5"!=_gthis.Settings.Engine?_gthis.Renderer.Render(_gthis.Score,_gthis.TrackIndexes):window.setTimeout(function(){renderAction()},500)})()}},UpdateLayout:function(json){this.Settings.Layout=alphaTab.Settings.LayoutFromJson(json),this.Renderer.UpdateSettings(this.Settings),this.Renderer.Invalidate()},SetupPlayer:function(){var _gthis=this,supportsWebAudio=!!window.ScriptProcessorNode,supportsWebWorkers=!!window.Worker,forceFlash=!!window.ForceFlash,alphaSynthScriptFile=alphaTab.Environment.ScriptFile;supportsWebAudio&&!forceFlash?(alphaTab.util.Logger.Info("Player","Will use webworkers for synthesizing and web audio api for playback",null),this._player=new alphaTab.platform.javaScript.AlphaSynthWebWorkerApi(new alphaTab.platform.javaScript.AlphaSynthWebAudioOutput,alphaSynthScriptFile,this.Settings.LogLevel)):supportsWebWorkers&&(alphaTab.util.Logger.Info("Player","Will use webworkers for synthesizing and flash for playback",null),this._player=new alphaTab.platform.javaScript.AlphaSynthWebWorkerApi(new alphaTab.platform.javaScript.AlphaSynthFlashOutput(alphaSynthScriptFile),alphaSynthScriptFile,this.Settings.LogLevel)),this.Player=this._player,null==this._player?alphaTab.util.Logger.Error("Player","Player requires webworkers and web audio api or flash, browser unsupported",null):(this._player.On("ready",function(){_gthis.LoadSoundFont(_gthis.Settings.SoundFontFile),_gthis.LoadMidiForScore()}),this._player.On("readyForPlayback",function(){_gthis.TriggerEvent("playerReady",null)}),this._player.On("soundFontLoad",function(data){_gthis.TriggerEvent("soundFontLoad",data)}),this._player.On("soundFontLoaded",function(){_gthis.TriggerEvent("soundFontLoaded",null)}),this._player.On("soundFontLoadFailed",function(){_gthis.TriggerEvent("soundFontLoadFailed",null)}),this._player.On("midiLoad",function(data1){_gthis.TriggerEvent("midiLoad",data1)}),this._player.On("midiFileLoaded",function(){_gthis.TriggerEvent("midiFileLoaded",null)}),this._player.On("midiFileLoadFailed",function(){_gthis.TriggerEvent("midiFileLoadFailed",null)}),this._player.On("playerStateChanged",function(data2){_gthis.TriggerEvent("playerStateChanged",data2)}),this._player.On("positionChanged",function(data3){_gthis.TriggerEvent("positionChanged",data3)}),this._player.On("finished",function(data4){_gthis.TriggerEvent("finished",data4)}),this.Settings.EnableCursor&&this.SetupCursor())},LoadMidiForScore:function(){if(null!=this.Player&&null!=this.Score&&this._player.get_IsReady()){alphaTab.util.Logger.Info("AlphaTab","Generating Midi",null);var midiFile=new alphaTab.audio.synth.midi.MidiFile,handler=new alphaTab.audio.generator.AlphaSynthMidiFileHandler(midiFile),generator=new alphaTab.audio.generator.MidiFileGenerator(this.Score,this.Settings,handler);generator.Generate(),this._tickCache=generator.TickLookup,this._player.LoadMidiFile(midiFile)}},DownloadMidi:function(){var midiFile=new alphaTab.audio.synth.midi.MidiFile,handler=new alphaTab.audio.generator.AlphaSynthMidiFileHandler(midiFile);new alphaTab.audio.generator.MidiFileGenerator(this.Score,this.Settings,handler).Generate();var fileName,uint8Array=midiFile.ToBinary(),s=this.Score.Title;fileName=null==s||0==s.length?"File.mid":this.Score.Title+".mid";var dlLink=js.Boot.__cast(window.document.createElement("a"),HTMLAnchorElement);dlLink.download=fileName;var blob=new Blob([uint8Array],{type:"audio/midi"}),url=URL.createObjectURL(blob);dlLink.href=url,dlLink.style.display="none",window.document.body.appendChild(dlLink),dlLink.click(),window.document.body.removeChild(dlLink)},SetTrackVolume:function(tracks,volume){if(null!=this.Player)for(var track=$iterator(this.TrackIndexesToTracks(this.ParseTracks(tracks)))();track.hasNext();){var track1=track.next(),this1=volume;this.Player.SetChannelVolume(track1.PlaybackInfo.PrimaryChannel,this1);var this2=volume;this.Player.SetChannelVolume(track1.PlaybackInfo.SecondaryChannel,this2)}},SetTrackSolo:function(tracks,solo){if(null!=this.Player)for(var track=$iterator(this.TrackIndexesToTracks(this.ParseTracks(tracks)))();track.hasNext();){var track1=track.next();this.Player.SetChannelSolo(track1.PlaybackInfo.PrimaryChannel,solo),this.Player.SetChannelSolo(track1.PlaybackInfo.SecondaryChannel,solo)}},SetTrackMute:function(tracks,mute){if(null!=this.Player)for(var track=$iterator(this.TrackIndexesToTracks(this.ParseTracks(tracks)))();track.hasNext();){var track1=track.next();this.Player.SetChannelMute(track1.PlaybackInfo.PrimaryChannel,mute),this.Player.SetChannelMute(track1.PlaybackInfo.SecondaryChannel,mute)}},LoadSoundFont:function(value){null!=this.Player&&("string"==typeof value?this._player.LoadSoundFontFromUrl(value):this._player.LoadSoundFont(value))},Play:function(){null!=this.Player&&this._player.Play()},Pause:function(){null!=this.Player&&this.Player.Pause()},PlayPause:function(){null!=this.Player&&this.Player.PlayPause()},Stop:function(){null!=this.Player&&(this.Player.Stop(),this.CursorUpdateTick(0,!0))},SetupCursor:function(){var _gthis=this,cursorWrapper=window.document.createElement("div");cursorWrapper.classList.add("cursors");var selectionWrapper=window.document.createElement("div");selectionWrapper.classList.add("selectionWrapper");var barCursor=window.document.createElement("div");barCursor.classList.add("barCursor");var beatCursor=window.document.createElement("div");beatCursor.classList.add("beatCursor");var surface=this.Element.querySelector(".alphaTabSurface");this.Element.style.position="relative",this.Element.style.textAlign="left",cursorWrapper.style.position="absolute",cursorWrapper.style.zIndex="1000",cursorWrapper.style.display="inline",cursorWrapper.style.pointerEvents="none",selectionWrapper.style.position="absolute",barCursor.style.position="absolute",beatCursor.style.position="absolute",beatCursor.style.transition="all 0s linear",this._cursorWrapper=cursorWrapper,this._barCursor=barCursor,this._beatCursor=beatCursor,this._selectionWrapper=selectionWrapper,this.Element.insertBefore(cursorWrapper,this.Element.firstChild),cursorWrapper.appendChild(selectionWrapper),cursorWrapper.appendChild(barCursor),cursorWrapper.appendChild(beatCursor),this._previousTick=0,this._playerState=0,this.Renderer.PostRenderFinished=system._EventAction.EventAction_Impl_.add(this.Renderer.PostRenderFinished,function(){_gthis._cursorCache=_gthis.Renderer.get_BoundsLookup(),_gthis.CursorUpdateTick(_gthis._previousTick,!1);var surfaceSite=surface.getBoundingClientRect();cursorWrapper.style.width=surfaceSite.width+"px",cursorWrapper.style.height=surfaceSite.height+"px"}),this._player.On("positionChanged",function(data){_gthis._previousTick=data.CurrentTick,window.setTimeout(function(){_gthis.CursorUpdateTick(data.CurrentTick,!1)},0)}),this._player.On("playerStateChanged",function(data1){_gthis._playerState=data1.State,window.setTimeout(function(){_gthis.CursorUpdateTick(_gthis._previousTick,!1)},0)}),this.Settings.EnableSeekByClick&&this.SetupClickHandling()},SetupClickHandling:function(){var _gthis=this;this._canvasElement.addEventListener("mousedown",function(e){if(0==e.button){e.preventDefault();var parentOffset=_gthis.GetOffset(_gthis._canvasElement),relX=e.pageX-parentOffset.X,relY=e.pageY-parentOffset.Y,beat=_gthis._cursorCache.GetBeatAtPos(relX,relY);null!=beat&&(_gthis._selectionStart=new alphaTab.platform.javaScript.SelectionInfo(beat),_gthis._selectionEnd=null,_gthis._selecting=!0)}}),this._canvasElement.addEventListener("mousemove",function(e1){if(_gthis._selecting){var parentOffset1=_gthis.GetOffset(_gthis._canvasElement),relX1=e1.pageX-parentOffset1.X,relY1=e1.pageY-parentOffset1.Y,beat1=_gthis._cursorCache.GetBeatAtPos(relX1,relY1);null==beat1||null!=_gthis._selectionEnd&&_gthis._selectionEnd.Beat==beat1||(_gthis._selectionEnd=new alphaTab.platform.javaScript.SelectionInfo(beat1),_gthis.CursorSelectRange(_gthis._selectionStart,_gthis._selectionEnd))}}),this._canvasElement.addEventListener("mouseup",function(e2){if(_gthis._selecting){if(e2.preventDefault(),null!=_gthis._selectionEnd){var startTick=_gthis._selectionStart.Beat.get_AbsoluteDisplayStart();if(_gthis._selectionStart.Beat.get_AbsoluteDisplayStart()0){var beat=cache.FindBeat(tracks,tick);if(null!=beat){var this1=beat.Duration;_gthis.CursorUpdateBeat(beat.CurrentBeat,beat.NextBeat,this1,stop)}}}})},CursorUpdateBeat:function(beat,nextBeat,duration,stop){if(null!=beat){var cache=this._cursorCache;if(null!=cache){var previousBeat=this._currentBeat,previousCache=this._previousCursorCache,previousState=this._previousStateForCursor;if(this._currentBeat=beat,this._previousCursorCache=cache,this._previousStateForCursor=this._playerState,beat!=previousBeat||cache!=previousCache||previousState!=this._playerState){var barCursor=this._barCursor,beatCursor=this._beatCursor,beatBoundings=cache.FindBeat(beat);if(null!=beatBoundings){var barBoundings=beatBoundings.BarBounds.MasterBarBounds,barBounds=barBoundings.VisualBounds;barCursor.style.top=Std.string(barBounds.Y)+"px",barCursor.style.left=Std.string(barBounds.X)+"px",barCursor.style.width=Std.string(barBounds.W)+"px",barCursor.style.height=Std.string(barBounds.H)+"px",beatCursor.style.transition="none",beatCursor.style.top=Std.string(barBounds.Y)+"px",beatCursor.style.left=Std.string(beatBoundings.VisualBounds.X)+"px",beatCursor.style.width=Std.string(this.Settings.BeatCursorWidth)+"px",beatCursor.style.height=Std.string(barBounds.H)+"px";for(var elements=this.Element.getElementsByClassName("atHighlight");elements.length>0;)elements.item(0).classList.remove("atHighlight");if(1==this._playerState||stop){var duration1=this.Player.get_PlaybackSpeed();if(duration/=duration1,!stop){for(var className=alphaTab.rendering.glyphs.BeatContainerGlyph.GetGroupId(beat),elementsToHighlight=this.Element.getElementsByClassName(className),i=0;i=elementRight||barBoundings.VisualBounds.X=0&&(stringSize+=data[code]*size/dataSize),++i}return stringSize*factor},alphaTab.platform.svg.FontSizes.prototype={__class__:alphaTab.platform.svg.FontSizes},alphaTab.platform.svg._SupportedFonts={},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_=$hx_exports.alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_={},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.__name__=["alphaTab","platform","svg","_SupportedFonts","SupportedFonts_Impl_"],alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.toString=function(this1){switch(this1){case 0:return"TimesNewRoman";case 1:return"Arial"}return""},alphaTab.rendering.BarRendererBase=$hx_exports.alphaTab.rendering.BarRendererBase=function(renderer,bar){this._preBeatGlyphs=null,this._voiceContainers=null,this._postBeatGlyphs=null,this.Staff=null,this.X=0,this.Y=0,this.Width=0,this.Height=0,this.Index=0,this.TopOverflow=0,this.BottomOverflow=0,this.Helpers=null,this.Bar=null,this.IsLinkedToPrevious=!1,this.CanWrap=!1,this.ScoreRenderer=null,this._wasFirstOfLine=!1,this.LayoutingInfo=null,this._appliedLayoutingInfo=0,this.IsFinalized=!1,this.TopPadding=0,this.BottomPadding=0,this.Bar=bar,this.ScoreRenderer=renderer,this.Helpers=new alphaTab.rendering.utils.BarHelpers(bar),this.CanWrap=!0},alphaTab.rendering.BarRendererBase.__name__=["alphaTab","rendering","BarRendererBase"],alphaTab.rendering.BarRendererBase.prototype={get_NextRenderer:function(){return null==this.Bar.NextBar?null:this.ScoreRenderer.Layout.GetRendererForBar(this.Staff.get_StaveId(),this.Bar.NextBar)},get_PreviousRenderer:function(){return null==this.Bar.PreviousBar?null:this.ScoreRenderer.Layout.GetRendererForBar(this.Staff.get_StaveId(),this.Bar.PreviousBar)},RegisterOverflowTop:function(topOverflow){topOverflow>this.TopOverflow&&(this.TopOverflow=topOverflow)},RegisterOverflowBottom:function(bottomOverflow){bottomOverflow>this.BottomOverflow&&(this.BottomOverflow=bottomOverflow)},ScaleToWidth:function(width){for(var containerWidth=width-this._preBeatGlyphs.Width-this._postBeatGlyphs.Width,this1=this._voiceContainers,voice=$iterator(Object.keys(this1))();voice.hasNext();){var voice1=voice.next();this._voiceContainers[voice1].ScaleToWidth(containerWidth)}this._postBeatGlyphs.X=this._preBeatGlyphs.X+this._preBeatGlyphs.Width+containerWidth,this.Width=width},get_Resources:function(){return this.ScoreRenderer.RenderingResources},get_Settings:function(){return this.ScoreRenderer.Settings},get_Scale:function(){return this.get_Settings().Scale},get_IsFirstOfLine:function(){return 0==this.Index},get_IsLast:function(){return this.Bar.Index==this.ScoreRenderer.Layout.LastBarIndex},RegisterLayoutingInfo:function(){var info=this.LayoutingInfo,preSize=this._preBeatGlyphs.Width;info.PreBeatSize=this.LayoutingInfo.Version)return!1;this._appliedLayoutingInfo=this.LayoutingInfo.Version,this._preBeatGlyphs.Width=this.LayoutingInfo.PreBeatSize;for(var voiceEnd=this._preBeatGlyphs.X+this._preBeatGlyphs.Width,this1=this._voiceContainers,voice=$iterator(Object.keys(this1))();voice.hasNext();){var voice1=voice.next(),c=this._voiceContainers[voice1];c.X=this._preBeatGlyphs.X+this._preBeatGlyphs.Width,c.ApplyLayoutingInfo(this.LayoutingInfo);var newEnd=c.X+c.Width;voiceEndthis.Height&&(this.Height=glyph.Height)}},CreateOrResizeGlyph:function(sizing,b){var g;switch(sizing){case 0:case 1:case 2:return(g=this.Info.CreateNewGlyph(this.Renderer,b)).Renderer=this.Renderer,g.Beat=b,g.DoLayout(),this._effectGlyphs[b.Voice.Index][b.Index]=g,this._uniqueEffectGlyphs[b.Voice.Index].push(g),g;case 4:case 5:var singleSizing=4==sizing?1:2;if(b.Index>0||this.Renderer.Index>0){var prevBeat=b.PreviousBeat;if(this.Info.ShouldCreateGlyph(this.Renderer.get_Settings(),prevBeat)){var prevEffect=null;if(b.Index>0&&this._effectGlyphs[b.Voice.Index].hasOwnProperty(prevBeat.Index))prevEffect=this._effectGlyphs[b.Voice.Index][prevBeat.Index];else if(this.Renderer.Index>0){var voiceGlyphs=js.Boot.__cast(this.Renderer.get_PreviousRenderer(),alphaTab.rendering.EffectBarRenderer).GetBand(this.Voice,this.Info.get_EffectId())._effectGlyphs[b.Voice.Index];voiceGlyphs.hasOwnProperty(prevBeat.Index)&&(prevEffect=voiceGlyphs[prevBeat.Index])}var newGlyph=this.CreateOrResizeGlyph(singleSizing,b);return null!=prevEffect&&this.Info.CanExpand(prevBeat,b)&&(prevEffect.NextGlyph=newGlyph,newGlyph.PreviousGlyph=prevEffect,this.IsLinkedToPrevious=!0),newGlyph}return this.CreateOrResizeGlyph(singleSizing,b)}return this.CreateOrResizeGlyph(singleSizing,b);case 6:return(g=this.Info.CreateNewGlyph(this.Renderer,b)).Renderer=this.Renderer,g.Beat=b,g.DoLayout(),this._effectGlyphs[b.Voice.Index][b.Index]=g,this._uniqueEffectGlyphs[b.Voice.Index].push(g),g}return null},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.Glyph.prototype.Paint.call(this,cx,cy,canvas);for(var i=0,j=this._uniqueEffectGlyphs.length;ithis.Shared.Height&&(this.Shared.Height=effectBand.Height),(null==this.Shared.FirstBeat||effectBand.FirstBeat.IsBefore(this.Shared.FirstBeat))&&(this.Shared.FirstBeat=effectBand.FirstBeat),(null==this.Shared.LastBeat||effectBand.LastBeat.IsAfter(this.Shared.LastBeat))&&(this.Shared.LastBeat=effectBand.LastBeat)},CanBeUsed:function(band){return!!(null==this.Shared.UniqueEffectId&&band.Info.get_CanShareBand()||band.Info.get_EffectId()==this.Shared.UniqueEffectId)&&(!(null!=this.Shared.FirstBeat&&!this.Shared.LastBeat.IsBefore(band.FirstBeat))||this.Shared.LastBeat.IsBefore(this.Shared.FirstBeat))},__class__:alphaTab.rendering.EffectBandSlot},alphaTab.rendering.EffectBandSlotShared=$hx_exports.alphaTab.rendering.EffectBandSlotShared=function(){this.UniqueEffectId=null,this.Y=0,this.Height=0,this.FirstBeat=null,this.LastBeat=null,this.Y=0,this.Height=0},alphaTab.rendering.EffectBandSlotShared.__name__=["alphaTab","rendering","EffectBandSlotShared"],alphaTab.rendering.EffectBandSlotShared.prototype={__class__:alphaTab.rendering.EffectBandSlotShared},alphaTab.rendering._EffectBarGlyphSizing={},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_=$hx_exports.alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_={},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.__name__=["alphaTab","rendering","_EffectBarGlyphSizing","EffectBarGlyphSizing_Impl_"],alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.toString=function(this1){switch(this1){case 0:return"SinglePreBeat";case 1:return"SingleOnBeat";case 2:return"SingleOnBeatToEnd";case 3:return"GroupedBeforeBeat";case 4:return"GroupedOnBeat";case 5:return"GroupedOnBeatToEnd";case 6:return"FullBar"}return""},alphaTab.rendering.EffectBarRenderer=$hx_exports.alphaTab.rendering.EffectBarRenderer=function(renderer,bar,infos){alphaTab.rendering.BarRendererBase.call(this,renderer,bar),this._infos=null,this._bands=null,this._bandLookup=null,this.SizingInfo=null,this._infos=infos},alphaTab.rendering.EffectBarRenderer.__name__=["alphaTab","rendering","EffectBarRenderer"],alphaTab.rendering.EffectBarRenderer.__super__=alphaTab.rendering.BarRendererBase,alphaTab.rendering.EffectBarRenderer.prototype=$extend(alphaTab.rendering.BarRendererBase.prototype,{UpdateSizes:function(){this.TopOverflow=0,this.BottomOverflow=0,this.TopPadding=0,this.BottomPadding=0,this.UpdateHeight(),alphaTab.rendering.BarRendererBase.prototype.UpdateSizes.call(this)},FinalizeRenderer:function(){alphaTab.rendering.BarRendererBase.prototype.FinalizeRenderer.call(this),this.UpdateHeight()},UpdateHeight:function(){if(null!=this.SizingInfo){for(var y=0,slot=$iterator(this.SizingInfo.Slots)();slot.hasNext();){var slot1=slot.next();slot1.Shared.Y=y;for(var band=$iterator(slot1.Bands)();band.hasNext();){var band1=band.next();band1.Y=y,band1.Height=slot1.Shared.Height}y+=slot1.Shared.Height}this.Height=y}},ApplyLayoutingInfo:function(){if(!alphaTab.rendering.BarRendererBase.prototype.ApplyLayoutingInfo.call(this))return!1;if(this.Index>0){var previousRenderer=js.Boot.__cast(this.get_PreviousRenderer(),alphaTab.rendering.EffectBarRenderer);this.SizingInfo=previousRenderer.SizingInfo}else this.SizingInfo=new alphaTab.rendering.EffectBandSizingInfo;for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){var effectBand1=effectBand.next();effectBand1.AlignGlyphs(),effectBand1.IsEmpty||this.SizingInfo.Register(effectBand1)}return this.UpdateHeight(),!0},ScaleToWidth:function(width){alphaTab.rendering.BarRendererBase.prototype.ScaleToWidth.call(this,width);for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){effectBand.next().AlignGlyphs()}},CreateBeatGlyphs:function(){this._bands=[];this._bandLookup={};for(var voice=$iterator(this.Bar.Voices)();voice.hasNext();){var voice1=voice.next();if(this.HasVoiceContainer(voice1))for(var info=HxOverrides.iter(this._infos);info.hasNext();){var info1=info.next(),band=new alphaTab.rendering.EffectBand(voice1,info1);band.Renderer=this,band.DoLayout(),this._bands.push(band),this._bandLookup[Std.string(voice1.Index)+"."+info1.get_EffectId()]=band}}for(var voice2=$iterator(this.Bar.Voices)();voice2.hasNext();){var voice3=voice2.next();this.HasVoiceContainer(voice3)&&this.CreateVoiceGlyphs(voice3)}for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){effectBand.next().IsLinkedToPrevious&&(this.IsLinkedToPrevious=!0)}},CreateVoiceGlyphs:function(v){for(var b=$iterator(v.Beats)();b.hasNext();){var b1=b.next(),container=new alphaTab.rendering.glyphs.BeatContainerGlyph(b1,this.GetOrCreateVoiceContainer(v));container.PreNotes=new alphaTab.rendering.glyphs.BeatGlyphBase,container.OnNotes=new alphaTab.rendering.glyphs.BeatOnNoteGlyphBase,this.AddBeatGlyph(container);for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){effectBand.next().CreateGlyph(b1)}}},Paint:function(cx,cy,canvas){this.PaintBackground(cx,cy,canvas);for(var effectBand=$iterator(this._bands)();effectBand.hasNext();){var effectBand1=effectBand.next();canvas.set_Color(0==effectBand1.Voice.Index?this.get_Resources().MainGlyphColor:this.get_Resources().SecondaryGlyphColor),effectBand1.IsEmpty||effectBand1.Paint(cx+this.X,cy+this.Y,canvas)}},GetBand:function(voice,effectId){var id=Std.string(voice.Index)+"."+effectId;return this._bandLookup.hasOwnProperty(id)?this._bandLookup[id]:null},__class__:alphaTab.rendering.EffectBarRenderer}),alphaTab.rendering.RenderFinishedEventArgs=$hx_exports.alphaTab.rendering.RenderFinishedEventArgs=function(){this.Width=0,this.Height=0,this.TotalWidth=0,this.TotalHeight=0,this.FirstMasterBarIndex=0,this.LastMasterBarIndex=0,this.RenderResult=null},alphaTab.rendering.RenderFinishedEventArgs.__name__=["alphaTab","rendering","RenderFinishedEventArgs"],alphaTab.rendering.RenderFinishedEventArgs.prototype={__class__:alphaTab.rendering.RenderFinishedEventArgs},alphaTab.rendering.RenderingResources=$hx_exports.alphaTab.rendering.RenderingResources=function(scale){this.CopyrightFont=null,this.TitleFont=null,this.SubTitleFont=null,this.WordsFont=null,this.EffectFont=null,this.TablatureFont=null,this.GraceFont=null,this.StaveLineColor=null,this.BarSeperatorColor=null,this.BarNumberFont=null,this.BarNumberColor=null,this.FingeringFont=null,this.MarkerFont=null,this.TabClefFont=null,this.MainGlyphColor=null,this.SecondaryGlyphColor=null,this.Scale=0,this.ScoreInfoColor=null,this.Init(scale)},alphaTab.rendering.RenderingResources.__name__=["alphaTab","rendering","RenderingResources"],alphaTab.rendering.RenderingResources.prototype={Init:function(scale){this.Scale=scale;this.EffectFont=new alphaTab.platform.model.Font("Georgia",12*scale,2),this.CopyrightFont=new alphaTab.platform.model.Font("Arial",12*scale,1),this.TitleFont=new alphaTab.platform.model.Font("Georgia",32*scale,0),this.SubTitleFont=new alphaTab.platform.model.Font("Georgia",20*scale,0),this.WordsFont=new alphaTab.platform.model.Font("Georgia",15*scale,0),this.TablatureFont=new alphaTab.platform.model.Font("Arial",13*scale,0),this.GraceFont=new alphaTab.platform.model.Font("Arial",11*scale,0),this.StaveLineColor=new alphaTab.platform.model.Color(165,165,165,255),this.BarSeperatorColor=new alphaTab.platform.model.Color(34,34,17,255),this.BarNumberFont=new alphaTab.platform.model.Font("Arial",11*scale,0),this.BarNumberColor=new alphaTab.platform.model.Color(200,0,0,255),this.FingeringFont=new alphaTab.platform.model.Font("Georgia",14*scale,0),this.MarkerFont=new alphaTab.platform.model.Font("Georgia",14*scale,1),this.TabClefFont=new alphaTab.platform.model.Font("Arial",18*scale,1),this.ScoreInfoColor=new alphaTab.platform.model.Color(0,0,0,255),this.MainGlyphColor=new alphaTab.platform.model.Color(0,0,0,255),this.SecondaryGlyphColor=new alphaTab.platform.model.Color(0,0,0,100)},__class__:alphaTab.rendering.RenderingResources},alphaTab.rendering.utils={},alphaTab.rendering.utils.IBeamYCalculator=$hx_exports.alphaTab.rendering.utils.IBeamYCalculator=function(){},alphaTab.rendering.utils.IBeamYCalculator.__name__=["alphaTab","rendering","utils","IBeamYCalculator"],alphaTab.rendering.utils.IBeamYCalculator.prototype={__class__:alphaTab.rendering.utils.IBeamYCalculator},alphaTab.rendering.ScoreBarRenderer=$hx_exports.alphaTab.rendering.ScoreBarRenderer=function(renderer,bar){alphaTab.rendering.BarRendererBase.call(this,renderer,bar),this.SimpleWhammyOverflow=0,this.AccidentalHelper=null,this._startSpacing=!1,this.AccidentalHelper=new alphaTab.rendering.utils.AccidentalHelper(bar)},alphaTab.rendering.ScoreBarRenderer.__name__=["alphaTab","rendering","ScoreBarRenderer"],alphaTab.rendering.ScoreBarRenderer.__interfaces__=[alphaTab.rendering.utils.IBeamYCalculator],alphaTab.rendering.ScoreBarRenderer.PaintSingleBar=function(canvas,x1,y1,x2,y2,size){canvas.BeginPath(),canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2),canvas.LineTo(x2,y2+size),canvas.LineTo(x1,y1+size),canvas.ClosePath(),canvas.Fill()},alphaTab.rendering.ScoreBarRenderer.__super__=alphaTab.rendering.BarRendererBase,alphaTab.rendering.ScoreBarRenderer.prototype=$extend(alphaTab.rendering.BarRendererBase.prototype,{GetBeatDirection:function(beat){var g=js.Boot.__cast(this.GetOnNotesGlyphForBeat(beat),alphaTab.rendering.glyphs.ScoreBeatGlyph);return null!=g?g.NoteHeads.get_Direction():0},GetNoteX:function(note,onEnd){null==onEnd&&(onEnd=!0);var g=js.Boot.__cast(this.GetOnNotesGlyphForBeat(note.Beat),alphaTab.rendering.glyphs.ScoreBeatGlyph);if(null!=g){var x=g.Container.VoiceContainer.X+g.Container.X+g.X;return onEnd&&(x+=g.Width),x}return 0},GetNoteY:function(note,aboveNote){null==aboveNote&&(aboveNote=!1);var beat=js.Boot.__cast(this.GetOnNotesGlyphForBeat(note.Beat),alphaTab.rendering.glyphs.ScoreBeatGlyph);return null!=beat?beat.NoteHeads.GetNoteY(note,aboveNote):0},get_LineOffset:function(){return 9*this.get_Scale()},UpdateSizes:function(){var res=this.get_Resources(),glyphOverflow=res.TablatureFont.Size/2+.2*res.TablatureFont.Size;this.TopPadding=glyphOverflow,this.BottomPadding=glyphOverflow,this.Height=4*this.get_LineOffset()+this.TopPadding+this.BottomPadding,alphaTab.rendering.BarRendererBase.prototype.UpdateSizes.call(this)},DoLayout:function(){if(alphaTab.rendering.BarRendererBase.prototype.DoLayout.call(this),!this.Bar.get_IsEmpty()&&null!=this.AccidentalHelper.MaxNoteValueBeat){var top=this.GetScoreY(0,0),bottom=this.GetScoreY(8,0),whammyOffset=this.SimpleWhammyOverflow;this.RegisterOverflowTop(whammyOffset);var maxNoteY=this.GetYPositionForNoteValue(this.AccidentalHelper.MaxNoteValue),maxNoteHelper=this.Helpers.GetBeamingHelperForBeat(this.AccidentalHelper.MaxNoteValueBeat);if(0==maxNoteHelper.Direction&&(maxNoteY-=this.GetStemSize(maxNoteHelper),maxNoteY-=maxNoteHelper.FingeringCount*this.get_Resources().GraceFont.Size,maxNoteHelper.HasTuplet&&(maxNoteY-=2*this.get_Resources().EffectFont.Size)),maxNoteHelper.HasTuplet){maxNoteY-=1.5*this.get_Resources().EffectFont.Size}maxNoteYbottom&&this.RegisterOverflowBottom(Math.abs(minNoteY)-bottom)}},Paint:function(cx,cy,canvas){alphaTab.rendering.BarRendererBase.prototype.Paint.call(this,cx,cy,canvas),this.PaintBeams(cx,cy,canvas),this.PaintTuplets(cx,cy,canvas)},PaintTuplets:function(cx,cy,canvas){for(var i=0,j=this.Helpers.TupletHelpers.length;i0&&!alphaTab.rendering.utils.BeamingHelper.IsFullBarJoin(beat,h.Beats[i-1],barIndex)&&(barStartX=beatLineX-brokenBarOffset,barEndX=beatLineX,barStartY=barY+this.CalculateBeamY(h,barStartX)*scaleMod,barEndY=barY+this.CalculateBeamY(h,barEndX)*scaleMod,alphaTab.rendering.ScoreBarRenderer.PaintSingleBar(canvas,cx+this.X+barStartX,barStartY,cx+this.X+barEndX,barEndY,barSize));++barIndex}++i}},PaintFooter:function(cx,cy,canvas,h){var beat=h.Beats[0];if(3!=beat.GraceType&&(0==beat.GraceType||1!=this.get_Settings().DisplayMode)){var beamY,fingeringY,isGrace=0!=beat.GraceType,scaleMod=isGrace?.75:1,stemSize=this.GetFooterStemSize(h.ShortestDuration),beatLineX=h.GetBeatLineX(beat)+this.get_Scale(),direction=h.Direction,topY=this.GetYPositionForNoteValue(h.MaxNoteValue),bottomY=this.GetYPositionForNoteValue(h.MinNoteValue);if(1==direction?(beamY=bottomY+=stemSize*scaleMod,fingeringY=cy+this.Y+bottomY):(beamY=topY-=stemSize*scaleMod,fingeringY=cy+this.Y+topY),this.PaintFingering(canvas,beat,cx+this.X+beatLineX,direction,fingeringY),1!=beat.Duration&&-2!=beat.Duration&&-4!=beat.Duration){if(canvas.set_LineWidth(1.3*this.get_Scale()),canvas.BeginPath(),canvas.MoveTo(cx+this.X+beatLineX,cy+this.Y+topY),canvas.LineTo(cx+this.X+beatLineX,cy+this.Y+bottomY),canvas.Stroke(),canvas.set_LineWidth(this.get_Scale()),2==beat.GraceType){var graceSizeY=15*this.get_Scale(),graceSizeX=12*this.get_Scale();canvas.BeginPath(),1==direction?(canvas.MoveTo(cx+this.X+beatLineX-graceSizeX/2,cy+this.Y+bottomY-graceSizeY),canvas.LineTo(cx+this.X+beatLineX+graceSizeX/2,cy+this.Y+bottomY)):(canvas.MoveTo(cx+this.X+beatLineX-graceSizeX/2,cy+this.Y+topY+graceSizeY),canvas.LineTo(cx+this.X+beatLineX+graceSizeX/2,cy+this.Y+topY)),canvas.Stroke()}if(beat.Duration>4||isGrace){var glyph=new alphaTab.rendering.glyphs.BeamGlyph(beatLineX-this.get_Scale()/2,beamY,beat.Duration,direction,isGrace);glyph.Renderer=this,glyph.DoLayout(),glyph.Paint(cx+this.X,cy+this.Y,canvas)}}}},PaintFingering:function(canvas,beat,beatLineX,direction,topY){var settings=this.get_Settings();if(0==settings.FingeringMode){0==direction?beatLineX-=10*this.get_Scale():beatLineX+=3*this.get_Scale();var noteList=beat.Notes.slice(0);noteList.sort(function(a1,b1){return b=b1,a1.get_RealValue()-b.get_RealValue();var b});for(var n=0;n2&&this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.RepeatCountGlyph(0,this.GetScoreY(-1,-3),this.Bar.get_MasterBar().RepeatCount))):this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.BarSeperatorGlyph(0,0))},CreateStartSpacing:function(){this._startSpacing||(this.AddPreBeatGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,2*this.get_Scale())),this._startSpacing=!0)},CreateKeySignatureGlyphs:function(){var offsetClef=0,currentKey=this.Bar.get_MasterBar().KeySignature,previousKey=null==this.Bar.PreviousBar?0:this.Bar.PreviousBar.get_MasterBar().KeySignature;switch(this.Bar.Clef){case 0:offsetClef=0;break;case 1:offsetClef=-1;break;case 2:offsetClef=1;break;case 3:offsetClef=2;break;case 4:offsetClef=1}var newLines={},newGlyphs=[];if(alphaTab.model.ModelUtils.KeySignatureIsSharp(currentKey))for(var i=0;i0&&(lineY+=lineOffset);var tmp=cx+this.X,this1=system.Convert.ToInt32_Single(lineY);canvas.FillRect(tmp,this1,this.Width,this.get_Scale()),++i}canvas.set_Color(res.MainGlyphColor),this.PaintSimileMark(cx,cy,canvas)},__class__:alphaTab.rendering.ScoreBarRenderer}),alphaTab.rendering.glyphs.BeatContainerGlyph=$hx_exports.alphaTab.rendering.glyphs.BeatContainerGlyph=function(beat,voiceContainer){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this.VoiceContainer=null,this.Beat=null,this.PreNotes=null,this.OnNotes=null,this.Ties=null,this.MinWidth=0,this.Beat=beat;this.Ties=[],this.VoiceContainer=voiceContainer},alphaTab.rendering.glyphs.BeatContainerGlyph.__name__=["alphaTab","rendering","glyphs","BeatContainerGlyph"],alphaTab.rendering.glyphs.BeatContainerGlyph.GetGroupId=function(beat){return"b"+beat.Id},alphaTab.rendering.glyphs.BeatContainerGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.BeatContainerGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{get_OnTimeX:function(){return this.OnNotes.X+this.OnNotes.CenterX},RegisterLayoutingInfo:function(layoutings){for(var preBeatStretch=this.get_OnTimeX(),postBeatStretch=0,tie=$iterator(this.Ties)();tie.hasNext();){var tie1=tie.next();tie1.Width>postBeatStretch&&(postBeatStretch=tie1.Width)}postBeatStretch+=this.OnNotes.X+(this.OnNotes.Width-this.OnNotes.CenterX),layoutings.AddBeatSpring(this.Beat,preBeatStretch,postBeatStretch),layoutings.SetPreBeatSize(this.Beat,this.PreNotes.Width),layoutings.SetOnBeatSize(this.Beat,this.OnNotes.Width),layoutings.SetBeatCenterX(this.Beat,this.OnNotes.CenterX)},ApplyLayoutingInfo:function(info){var offset=info.GetBeatCenterX(this.Beat)-this.OnNotes.CenterX;this.PreNotes.X=offset,this.PreNotes.Width=info.GetPreBeatSize(this.Beat),this.OnNotes.Width=info.GetOnBeatSize(this.Beat),this.OnNotes.X=this.PreNotes.X+this.PreNotes.Width,this.OnNotes.UpdateBeamingHelper()},DoLayout:function(){this.PreNotes.X=0,this.PreNotes.Renderer=this.Renderer,this.PreNotes.Container=this,this.PreNotes.DoLayout(),this.OnNotes.X=this.PreNotes.X+this.PreNotes.Width,this.OnNotes.Renderer=this.Renderer,this.OnNotes.Container=this,this.OnNotes.DoLayout();for(var i=this.Beat.Notes.length-1;i>=0;)this.CreateTies(this.Beat.Notes[i--]);this.UpdateWidth()},UpdateWidth:function(){if(this.MinWidth=this.PreNotes.Width+this.OnNotes.Width,!this.Beat.get_IsRest())if(1==this.OnNotes.BeamingHelper.Beats.length)this.Beat.Duration>=8&&(this.MinWidth=this.MinWidth+20*this.get_Scale());else{switch(this.Beat.Duration){case 128:case 256:this.MinWidth=this.MinWidth+10*this.get_Scale()}}for(var tieWidth=0,tie=$iterator(this.Ties)();tie.hasNext();){var tie1=tie.next();tie1.Width>tieWidth&&(tieWidth=tie1.Width)}this.MinWidth=this.MinWidth+tieWidth,this.Width=this.MinWidth},ScaleToWidth:function(beatWidth){for(var tie=$iterator(this.Ties)();tie.hasNext();){tie.next().DoLayout()}this.OnNotes.UpdateBeamingHelper(),this.Width=beatWidth},CreateTies:function(n){},Paint:function(cx,cy,canvas){if(!this.Beat.Voice.IsEmpty){if(!(this.PreNotes.get_IsEmpty()&&this.OnNotes.get_IsEmpty()&&0==this.Ties.length)){canvas.BeginGroup(alphaTab.rendering.glyphs.BeatContainerGlyph.GetGroupId(this.Beat)),this.PreNotes.Paint(cx+this.X,cy+this.Y,canvas),this.OnNotes.Paint(cx+this.X,cy+this.Y,canvas);for(var staffX=cx-this.VoiceContainer.X-this.Renderer.X,staffY=cy-this.VoiceContainer.Y-this.Renderer.Y,i=0,j=this.Ties.length;i=0&&track10&&tracks.push(score.Tracks[0]),this.Tracks=tracks,this.Invalidate()}catch(e){if(e instanceof js._Boot.HaxeError&&(e=e.val),!js.Boot.__instanceof(e,system.Exception))throw e;this.OnError("render",e)}},RenderTracks:function(tracks){0==tracks.length?this.Score=null:this.Score=tracks[0].Score,this.Tracks=tracks,this.Invalidate()},UpdateSettings:function(settings){this.Settings=settings},Invalidate:function(){if(0!=this.Settings.Width){if(this.set_BoundsLookup(new alphaTab.rendering.utils.BoundsLookup),0!=this.Tracks.length){this.RecreateCanvas(),this.RenderingResources.Scale!=this.Settings.Scale&&(this.RenderingResources.Init(this.Settings.Scale),this.Canvas.set_LineWidth(this.Settings.Scale)),this.Canvas.set_Resources(this.RenderingResources),alphaTab.util.Logger.Info("Rendering","Rendering "+this.Tracks.length+" tracks",null);for(var i=0;i2&&this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.RepeatCountGlyph(0,this.GetTabY(-.5,-3),this.Bar.get_MasterBar().RepeatCount))):this.AddPostBeatGlyph(new alphaTab.rendering.glyphs.BarSeperatorGlyph(0,0))},GetTabY:function(line,correction){return null==correction&&(correction=0),this.get_LineOffset()*line+correction*this.get_Scale()},PaintBackground:function(cx,cy,canvas){alphaTab.rendering.BarRendererBase.prototype.PaintBackground.call(this,cx,cy,canvas);var res=this.get_Resources();canvas.set_Color(res.StaveLineColor);for(var lineY=cy+this.Y+this.TopPadding,padding=this.get_Scale(),tabNotes=[],i=0,j=this.Bar.Staff.Tuning.length;ib1[0]?1:a1[0]0&&(lineY+=lineOffset);for(var lineX=0,line2=$iterator(tabNotes[i1])();line2.hasNext();){var line3=line2.next(),tmp=cx+this.X+lineX,this4=system.Convert.ToInt32_Single(lineY),tmp1=this.get_Scale();canvas.FillRect(tmp,this4,line3[0]-lineX,tmp1),lineX=line3[0]+line3[1]}var tmp2=cx+this.X+lineX,this5=system.Convert.ToInt32_Single(lineY);canvas.FillRect(tmp2,this5,this.Width-lineX,this.get_Scale()),++i1}canvas.set_Color(res.MainGlyphColor),this.PaintSimileMark(cx,cy,canvas)},Paint:function(cx,cy,canvas){alphaTab.rendering.BarRendererBase.prototype.Paint.call(this,cx,cy,canvas),this.RenderRhythm&&this.PaintBeams(cx,cy,canvas)},PaintBeams:function(cx,cy,canvas){for(var i=0,j=this.Helpers.BeamHelpers.length;i0&&!alphaTab.rendering.utils.BeamingHelper.IsFullBarJoin(beat,h.Beats[i-1],barIndex)&&(barStartX=beatLineX-brokenBarOffset,barEndX=beatLineX,barStartY=barY,barEndY=barY,alphaTab.rendering.TabBarRenderer.PaintSingleBar(canvas,cx+this.X+barStartX,barStartY,cx+this.X+barEndX,barEndY,barSize));++barIndex}}++i}},PaintFooter:function(cx,cy,canvas,h){for(var beat=$iterator(h.Beats)();beat.hasNext();){var beat1=beat.next();if(1==beat1.Duration||-2==beat1.Duration||-4==beat1.Duration)return;var beatLineX=h.GetBeatLineX(beat1),y1=cy+this.Y,y2=cy+this.Y+this.Height,startGlyph=js.Boot.__cast(this.GetOnNotesGlyphForBeat(beat1),alphaTab.rendering.glyphs.TabBeatGlyph);if(null==startGlyph.NoteNumbers?y1+=this.Height-this.RhythmHeight:y1+=startGlyph.NoteNumbers.GetNoteY(startGlyph.NoteNumbers.MinStringNote,!1)+this.get_LineOffset()/2,0==h.Direction){beatLineX-=startGlyph.Width/2}else{beatLineX+=startGlyph.Width/2}if(canvas.BeginPath(),canvas.MoveTo(cx+this.X+beatLineX,y1),canvas.LineTo(cx+this.X+beatLineX,y2),canvas.Stroke(),beat1.Duration>4){var glyph=new alphaTab.rendering.glyphs.BeamGlyph(0,0,beat1.Duration,1,!1);glyph.Renderer=this,glyph.DoLayout(),glyph.Paint(cx+this.X+beatLineX,y2,canvas)}}},__class__:alphaTab.rendering.TabBarRenderer}),alphaTab.rendering.glyphs.EffectGlyph=$hx_exports.alphaTab.rendering.glyphs.EffectGlyph=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this.Beat=null,this.NextGlyph=null,this.PreviousGlyph=null,this.Height=0},alphaTab.rendering.glyphs.EffectGlyph.__name__=["alphaTab","rendering","glyphs","EffectGlyph"],alphaTab.rendering.glyphs.EffectGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.EffectGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{__class__:alphaTab.rendering.glyphs.EffectGlyph}),alphaTab.rendering.glyphs.MusicFontGlyph=$hx_exports.alphaTab.rendering.glyphs.MusicFontGlyph=function(x,y,glyphScale,symbol){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y),this.GlyphScale=0,this.Symbol=-1,this.GlyphScale=glyphScale,this.Symbol=symbol},alphaTab.rendering.glyphs.MusicFontGlyph.__name__=["alphaTab","rendering","glyphs","MusicFontGlyph"],alphaTab.rendering.glyphs.MusicFontGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.MusicFontGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{Paint:function(cx,cy,canvas){canvas.FillMusicFontSymbol(cx+this.X,cy+this.Y,this.GlyphScale*this.get_Scale(),this.Symbol)},__class__:alphaTab.rendering.glyphs.MusicFontGlyph}),alphaTab.rendering.glyphs.AccentuationGlyph=$hx_exports.alphaTab.rendering.glyphs.AccentuationGlyph=function(x,y,accentuation){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.AccentuationGlyph.GetSymbol(accentuation))},alphaTab.rendering.glyphs.AccentuationGlyph.__name__=["alphaTab","rendering","glyphs","AccentuationGlyph"],alphaTab.rendering.glyphs.AccentuationGlyph.GetSymbol=function(accentuation){switch(accentuation){case 0:return-1;case 1:return 58528;case 2:return 58540;default:return-1}},alphaTab.rendering.glyphs.AccentuationGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.AccentuationGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*this.get_Scale()},__class__:alphaTab.rendering.glyphs.AccentuationGlyph}),alphaTab.rendering.glyphs.AccidentalGlyph=$hx_exports.alphaTab.rendering.glyphs.AccidentalGlyph=function(x,y,accidentalType,isGrace){null==isGrace&&(isGrace=!1),alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,alphaTab.rendering.glyphs.AccidentalGlyph.GetMusicSymbol(accidentalType)),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.AccidentalGlyph.__name__=["alphaTab","rendering","glyphs","AccidentalGlyph"],alphaTab.rendering.glyphs.AccidentalGlyph.GetMusicSymbol=function(accidentalType){switch(accidentalType){case 1:return 57953;case 2:return 57954;case 3:return 57952;case 4:return 57970;case 5:return 57972;case 6:return 57968}return-1},alphaTab.rendering.glyphs.AccidentalGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.AccidentalGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=8*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.AccidentalGlyph}),alphaTab.rendering.glyphs.GlyphGroup=$hx_exports.alphaTab.rendering.glyphs.GlyphGroup=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this.Glyphs=null},alphaTab.rendering.glyphs.GlyphGroup.__name__=["alphaTab","rendering","glyphs","GlyphGroup"],alphaTab.rendering.glyphs.GlyphGroup.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.GlyphGroup.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{get_IsEmpty:function(){return null==this.Glyphs||0==this.Glyphs.length},DoLayout:function(){if(null!=this.Glyphs&&0!=this.Glyphs.length){for(var w=0,i=0,j=this.Glyphs.length;ib.Y?1:0;var a,b});var columns=[];columns.push(-3e3);for(var accidentalSize=21*this.get_Scale(),i=0,j=this.Glyphs.length;ig.Y;)if(++gColumn==columns.length){columns.push(-3e3)}var this4=gColumn;g.X=this4,columns[gColumn]=g.Y+accidentalSize,++i}var columnWidth=8*this.get_Scale(),padding=2*this.get_Scale();0==this.Glyphs.length?this.Width=0:this.Width=padding+columnWidth*columns.length;for(var i1=0,j1=this.Glyphs.length;i10){var res=this.Renderer.get_Resources();canvas.set_Font(res.WordsFont),canvas.MoveTo(cx+this.X,cy+this.Y+this.Height),canvas.LineTo(cx+this.X,cy+this.Y),canvas.LineTo(cx+this.X+this.Width,cy+this.Y),canvas.Stroke(),canvas.FillText(this._endingsString,cx+this.X+3*this.get_Scale(),cy+this.Y*this.get_Scale())}},__class__:alphaTab.rendering.glyphs.AlternateEndingsGlyph}),alphaTab.rendering.glyphs.BarNumberGlyph=$hx_exports.alphaTab.rendering.glyphs.BarNumberGlyph=function(x,y,number){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this._number=0,this._number=number},alphaTab.rendering.glyphs.BarNumberGlyph.__name__=["alphaTab","rendering","glyphs","BarNumberGlyph"],alphaTab.rendering.glyphs.BarNumberGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.BarNumberGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().BarNumberFont),this.Width=this.Renderer.ScoreRenderer.Canvas.MeasureText(Std.string(this._number))+5*this.get_Scale()},Paint:function(cx,cy,canvas){if(this.Renderer.Staff.IsFirstInAccolade){var res=this.Renderer.get_Resources(),c=canvas.get_Color();canvas.set_Color(res.BarNumberColor),canvas.set_Font(res.BarNumberFont),canvas.FillText(Std.string(this._number),cx+this.X,cy+this.Y),canvas.set_Color(c)}},__class__:alphaTab.rendering.glyphs.BarNumberGlyph}),alphaTab.rendering.glyphs.BarSeperatorGlyph=$hx_exports.alphaTab.rendering.glyphs.BarSeperatorGlyph=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y)},alphaTab.rendering.glyphs.BarSeperatorGlyph.__name__=["alphaTab","rendering","glyphs","BarSeperatorGlyph"],alphaTab.rendering.glyphs.BarSeperatorGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.BarSeperatorGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Renderer.get_IsLast()?this.Width=15*this.get_Scale():null!=this.Renderer.get_NextRenderer()&&this.Renderer.get_NextRenderer().Staff==this.Renderer.Staff&&this.Renderer.get_NextRenderer().Bar.get_MasterBar().IsRepeatStart?this.Width=2*this.get_Scale():(this.Width=2*this.get_Scale(),this.Renderer.Bar.get_MasterBar().IsDoubleBar&&(this.Width=this.Width+2*this.get_Scale()))},Paint:function(cx,cy,canvas){var blockWidth=4*this.get_Scale(),top=cy+this.Y+this.Renderer.TopPadding,bottom=cy+this.Y+this.Renderer.Height-this.Renderer.BottomPadding,left=system.Convert.ToInt32_Single(cx+this.X),h=bottom-top;this.Renderer.get_IsLast()?(canvas.FillRect(left+this.Width-blockWidth-blockWidth,top,this.get_Scale(),h),canvas.FillRect(left+this.Width-blockWidth,top,blockWidth,h)):null!=this.Renderer.get_NextRenderer()&&this.Renderer.get_NextRenderer().Staff==this.Renderer.Staff&&this.Renderer.get_NextRenderer().Bar.get_MasterBar().IsRepeatStart||(canvas.FillRect(left+this.Width-this.get_Scale(),top,this.get_Scale(),h),this.Renderer.Bar.get_MasterBar().IsDoubleBar&&canvas.FillRect(left+this.Width-5*this.get_Scale(),top,this.get_Scale(),h))},__class__:alphaTab.rendering.glyphs.BarSeperatorGlyph}),alphaTab.rendering.glyphs.BeamGlyph=$hx_exports.alphaTab.rendering.glyphs.BeamGlyph=function(x,y,duration,direction,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,alphaTab.rendering.glyphs.BeamGlyph.GetSymbol(duration,direction,isGrace))},alphaTab.rendering.glyphs.BeamGlyph.__name__=["alphaTab","rendering","glyphs","BeamGlyph"],alphaTab.rendering.glyphs.BeamGlyph.GetSymbol=function(duration,direction,isGrace){if(isGrace&&(duration=8),0==direction)switch(duration){case 8:return 57920;case 16:return 57922;case 32:return 57924;case 64:return 57926;case 128:return 57928;case 256:return 57930;default:return 57920}else switch(duration){case 8:return 57921;case 16:return 57923;case 32:return 57925;case 64:return 57927;case 128:case 256:return 57929;default:return 57921}},alphaTab.rendering.glyphs.BeamGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.BeamGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=0},__class__:alphaTab.rendering.glyphs.BeamGlyph}),alphaTab.rendering.glyphs.BeatGlyphBase=$hx_exports.alphaTab.rendering.glyphs.BeatGlyphBase=function(){alphaTab.rendering.glyphs.GlyphGroup.call(this,0,0),this.Container=null},alphaTab.rendering.glyphs.BeatGlyphBase.__name__=["alphaTab","rendering","glyphs","BeatGlyphBase"],alphaTab.rendering.glyphs.BeatGlyphBase.__super__=alphaTab.rendering.glyphs.GlyphGroup,alphaTab.rendering.glyphs.BeatGlyphBase.prototype=$extend(alphaTab.rendering.glyphs.GlyphGroup.prototype,{DoLayout:function(){var w=0;if(null!=this.Glyphs)for(var i=0,j=this.Glyphs.length;i=0;)action(this.Container.Beat.Notes[i]),--i},__class__:alphaTab.rendering.glyphs.BeatGlyphBase}),alphaTab.rendering.glyphs.BeatOnNoteGlyphBase=$hx_exports.alphaTab.rendering.glyphs.BeatOnNoteGlyphBase=function(){alphaTab.rendering.glyphs.BeatGlyphBase.call(this),this.BeamingHelper=null,this.CenterX=0,this.CenterX=0},alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.__name__=["alphaTab","rendering","glyphs","BeatOnNoteGlyphBase"],alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.__super__=alphaTab.rendering.glyphs.BeatGlyphBase,alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.prototype=$extend(alphaTab.rendering.glyphs.BeatGlyphBase.prototype,{UpdateBeamingHelper:function(){},__class__:alphaTab.rendering.glyphs.BeatOnNoteGlyphBase}),alphaTab.rendering.glyphs.GroupedEffectGlyph=$hx_exports.alphaTab.rendering.glyphs.GroupedEffectGlyph=function(endPosition){alphaTab.rendering.glyphs.EffectGlyph.call(this,0,0),this.EndPosition=0,this.ForceGroupedRendering=!1,this.EndOnBarLine=!1,this.EndPosition=endPosition},alphaTab.rendering.glyphs.GroupedEffectGlyph.__name__=["alphaTab","rendering","glyphs","GroupedEffectGlyph"],alphaTab.rendering.glyphs.GroupedEffectGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{get_IsLinkedWithPrevious:function(){return null!=this.PreviousGlyph&&this.PreviousGlyph.Renderer.Staff.StaveGroup==this.Renderer.Staff.StaveGroup},get_IsLinkedWithNext:function(){return!(null==this.NextGlyph||!this.NextGlyph.Renderer.IsFinalized)&&this.NextGlyph.Renderer.Staff.StaveGroup==this.Renderer.Staff.StaveGroup},Paint:function(cx,cy,canvas){if(!this.get_IsLinkedWithPrevious())if(this.get_IsLinkedWithNext()||this.ForceGroupedRendering){var lastLinkedGlyph;if(!this.get_IsLinkedWithNext()&&this.ForceGroupedRendering)lastLinkedGlyph=this;else for(lastLinkedGlyph=js.Boot.__cast(this.NextGlyph,alphaTab.rendering.glyphs.GroupedEffectGlyph);lastLinkedGlyph.get_IsLinkedWithNext();)lastLinkedGlyph=js.Boot.__cast(lastLinkedGlyph.NextGlyph,alphaTab.rendering.glyphs.GroupedEffectGlyph);var endBeatRenderer=lastLinkedGlyph.Renderer,endBeat=lastLinkedGlyph.Beat,position=this.EndPosition,cxRenderer=cx-this.Renderer.X,endX=this.CalculateEndX(endBeatRenderer,endBeat,cxRenderer,position);this.PaintGrouped(cx,cy,endX,canvas)}else this.PaintNonGrouped(cx,cy,canvas)},CalculateEndX:function(endBeatRenderer,endBeat,cx,endPosition){return null==endBeat?cx+endBeatRenderer.X+this.X+this.Width:cx+endBeatRenderer.X+endBeatRenderer.GetBeatX(endBeat,endPosition)},PaintNonGrouped:function(cx,cy,canvas){var cxRenderer=cx-this.Renderer.X,endX=this.CalculateEndX(this.Renderer,this.Beat,cxRenderer,this.EndPosition);this.PaintGrouped(cx,cy,endX,canvas)},PaintGrouped:function(cx,cy,endX,canvas){throw new js._Boot.HaxeError("abstract")},__class__:alphaTab.rendering.glyphs.GroupedEffectGlyph}),alphaTab.rendering.glyphs.BeatVibratoGlyph=$hx_exports.alphaTab.rendering.glyphs.BeatVibratoGlyph=function(type){alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,4),this._type=0,this._stepSize=0,this._type=type},alphaTab.rendering.glyphs.BeatVibratoGlyph.__name__=["alphaTab","rendering","glyphs","BeatVibratoGlyph"],alphaTab.rendering.glyphs.BeatVibratoGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.BeatVibratoGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this);switch(this._type){case 1:this._stepSize=12*this.get_Scale();break;case 2:this._stepSize=23*this.get_Scale()}this.Height=18*this.get_Scale()},PaintGrouped:function(cx,cy,endX,canvas){var startX=cx+this.X,width=endX-startX,loops=system.Convert.ToInt32_Single(Math.max(1,width/this._stepSize));canvas.BeginPath(),canvas.MoveTo(startX,cy+this.Y);for(var i=0;iinfo.Line)&&(this.MinNote=info),(null==this.MaxNote||this.MaxNote.Line8},DoLayout:function(){this._infos.sort(function(a1,b1){return a=a1,b=b1,system._Int32.Int32_Impl_.CompareTo_Int32(b.Line,a.Line);var a,b});for(var displacedX=0,lastDisplaced=!1,lastLine=0,anyDisplaced=!1,direction=this.get_Direction(),w=0,i=0,j=this._infos.length;i=this.MinNote.Line;){var this1=l,lY=cy+scoreRenderer.GetScoreY(this1,0);canvas.FillRect(cx-linePadding+this.NoteStartX,lY,lineWidth,this.get_Scale()),l-=2}canvas.set_Color(color)}if(this.get_HasBottomOverflow()){var color1=canvas.get_Color();canvas.set_Color(this.Renderer.ScoreRenderer.RenderingResources.StaveLineColor);for(var l1=12;l1<=this.MaxNote.Line;){var this2=l1,lY1=cy+scoreRenderer.GetScoreY(this2,0);canvas.FillRect(cx-linePadding+this.NoteStartX,lY1,lineWidth,this.get_Scale()),l1+=2}canvas.set_Color(color1)}for(var infos=this._infos,x=cx+this._noteHeadPadding,g=$iterator(infos)();g.hasNext();){var g1=g.next();g1.Glyph.Renderer=this.Renderer,g1.Glyph.Paint(x,cy,canvas)}},__class__:alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase}),alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph=$hx_exports.alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph=function(beat,showParenthesis){null==showParenthesis&&(showParenthesis=!1),alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.call(this),this._beat=null,this._showParenthesis=!1,this._noteValueLookup=null,this._accidentals=null,this._preNoteParenthesis=null,this._postNoteParenthesis=null,this.IsEmpty=!1,this.NoteHeadOffset=0,this._beat=beat,this._showParenthesis=showParenthesis,this.IsEmpty=!0,this._accidentals=new alphaTab.rendering.glyphs.AccidentalGroupGlyph;this._noteValueLookup={},showParenthesis&&(this._preNoteParenthesis=new alphaTab.rendering.glyphs.GhostNoteContainerGlyph(!0),this._postNoteParenthesis=new alphaTab.rendering.glyphs.GhostNoteContainerGlyph(!1))},alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.__name__=["alphaTab","rendering","glyphs","BendNoteHeadGroupGlyph"],alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.__super__=alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase,alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.prototype=$extend(alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.prototype,{get_Direction:function(){return 0},GetNoteValueY:function(noteValue,aboveNote){return null==aboveNote&&(aboveNote=!1),this._noteValueLookup.hasOwnProperty(noteValue)?this.Y+this._noteValueLookup[noteValue].Y+(aboveNote?-6.75*this.get_Scale()/2:0):0},ContainsNoteValue:function(noteValue){return this._noteValueLookup.hasOwnProperty(noteValue)},GetNoteX:function(noteValue,onMiddle){if(null==onMiddle&&(onMiddle=!0),this._noteValueLookup.hasOwnProperty(noteValue)){var n=this._noteValueLookup[noteValue],pos=this.X+n.X;if(onMiddle){pos+=n.Width/2}return pos}return 0},AddGlyph:function(noteValue,quarterBend){null==quarterBend&&(quarterBend=!1);var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),noteHeadGlyph=new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,!0),accidental=sr.AccidentalHelper.ApplyAccidentalForValue(this._beat,noteValue,quarterBend),line=sr.AccidentalHelper.GetNoteLineForValue(noteValue,!1),this1=line;noteHeadGlyph.Y=sr.GetScoreY(this1,0),this._showParenthesis&&(this._preNoteParenthesis.Renderer=this.Renderer,this._postNoteParenthesis.Renderer=this.Renderer,this._preNoteParenthesis.AddParenthesisOnLine(line,!0),this._postNoteParenthesis.AddParenthesisOnLine(line,!0)),0!=accidental&&this._accidentals.AddGlyph(new alphaTab.rendering.glyphs.AccidentalGlyph(0,noteHeadGlyph.Y,accidental,!0)),this._noteValueLookup[noteValue]=noteHeadGlyph,this.Add(noteHeadGlyph,line),this.IsEmpty=!1},DoLayout:function(){var x=0;if(this._showParenthesis&&(this._preNoteParenthesis.X=x,this._preNoteParenthesis.Renderer=this.Renderer,this._preNoteParenthesis.DoLayout(),x+=this._preNoteParenthesis.Width+2*this.get_Scale()),this._accidentals.get_IsEmpty()||(this._accidentals.X=x,this._accidentals.Renderer=this.Renderer,this._accidentals.DoLayout(),x+=this._accidentals.Width+2*this.get_Scale()),this.NoteStartX=x,alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.prototype.DoLayout.call(this),this.NoteHeadOffset=this.NoteStartX+(this.Width-this.NoteStartX)/2,this._showParenthesis){var tmp=this.Width,tmp1=this.get_Scale();this._postNoteParenthesis.X=tmp+2*tmp1,this._postNoteParenthesis.Renderer=this.Renderer,this._postNoteParenthesis.DoLayout(),this.Width=this.Width+(this._postNoteParenthesis.Width+2*this.get_Scale())}},Paint:function(cx,cy,canvas){this._accidentals.get_IsEmpty()?this._showParenthesis&&this._preNoteParenthesis.X:this._accidentals.X,this._accidentals.get_IsEmpty()||this._accidentals.Paint(cx+this.X,cy+this.Y,canvas),this._showParenthesis&&(this._preNoteParenthesis.Paint(cx+this.X,cy+this.Y,canvas),this._postNoteParenthesis.Paint(cx+this.X,cy+this.Y,canvas)),alphaTab.rendering.glyphs.ScoreNoteChordGlyphBase.prototype.Paint.call(this,cx,cy,canvas)},__class__:alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph}),alphaTab.rendering.glyphs.ChineseCymbalGlyph=$hx_exports.alphaTab.rendering.glyphs.ChineseCymbalGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57564),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.ChineseCymbalGlyph.__name__=["alphaTab","rendering","glyphs","ChineseCymbalGlyph"],alphaTab.rendering.glyphs.ChineseCymbalGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.ChineseCymbalGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.ChineseCymbalGlyph}),alphaTab.rendering.glyphs.CircleGlyph=$hx_exports.alphaTab.rendering.glyphs.CircleGlyph=function(x,y,size){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this._size=0,this._size=size},alphaTab.rendering.glyphs.CircleGlyph.__name__=["alphaTab","rendering","glyphs","CircleGlyph"],alphaTab.rendering.glyphs.CircleGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.CircleGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=this._size+3*this.get_Scale()},Paint:function(cx,cy,canvas){canvas.FillCircle(cx+this.X,cy+this.Y,this._size)},__class__:alphaTab.rendering.glyphs.CircleGlyph}),alphaTab.rendering.glyphs.ClefGlyph=$hx_exports.alphaTab.rendering.glyphs.ClefGlyph=function(x,y,clef,clefOttava){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.ClefGlyph.GetSymbol(clef)),this._clef=0,this._clefOttava=0,this._clef=clef,this._clefOttava=clefOttava},alphaTab.rendering.glyphs.ClefGlyph.__name__=["alphaTab","rendering","glyphs","ClefGlyph"],alphaTab.rendering.glyphs.ClefGlyph.GetSymbol=function(clef){switch(clef){case 0:return 57449;case 1:case 2:return 57436;case 3:return 57442;case 4:return 57424;default:return-1}},alphaTab.rendering.glyphs.ClefGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.ClefGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){switch(this._clef){case 0:this.Width=15*this.get_Scale();break;case 1:case 2:case 3:case 4:this.Width=28*this.get_Scale()}},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.MusicFontGlyph.prototype.Paint.call(this,cx,cy,canvas);var numberGlyph,top=!1;switch(this._clefOttava){case 0:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-4*this.get_Scale(),0,.5,58644),top=!0;break;case 1:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-2*this.get_Scale(),0,.5,58640),top=!0;break;case 3:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-6*this.get_Scale(),0,.5,58640);break;case 4:numberGlyph=new alphaTab.rendering.glyphs.MusicFontGlyph(-8*this.get_Scale(),0,.5,58644);break;default:return}var offsetY,offsetX;switch(this._clef){case 0:offsetY=top?-12:15,offsetX=0;break;case 1:case 2:offsetY=top?-19:27,offsetX=0;break;case 3:offsetY=top?-9:27,offsetX=-4;break;case 4:offsetY=top?-37:30,offsetX=0;break;default:return}numberGlyph.Renderer=this.Renderer,numberGlyph.DoLayout();var x=this.Width/2;numberGlyph.Paint(cx+this.X+x+offsetX*this.get_Scale(),cy+this.Y+offsetY*this.get_Scale(),canvas)},__class__:alphaTab.rendering.glyphs.ClefGlyph}),alphaTab.rendering.glyphs.CrescendoGlyph=$hx_exports.alphaTab.rendering.glyphs.CrescendoGlyph=function(x,y,crescendo){alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,4),this._crescendo=0,this._crescendo=crescendo,this.X=x,this.Y=y},alphaTab.rendering.glyphs.CrescendoGlyph.__name__=["alphaTab","rendering","glyphs","CrescendoGlyph"],alphaTab.rendering.glyphs.CrescendoGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.CrescendoGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this),this.Height=17*this.get_Scale()},PaintGrouped:function(cx,cy,endX,canvas){var startX=cx+this.X,height=this.Height*this.get_Scale();canvas.BeginPath(),1==this._crescendo?(endX-=4*this.get_Scale(),canvas.MoveTo(endX,cy+this.Y),canvas.LineTo(startX,cy+this.Y+height/2),canvas.LineTo(endX,cy+this.Y+height)):(endX-=4*this.get_Scale(),canvas.MoveTo(startX,cy+this.Y),canvas.LineTo(endX,cy+this.Y+height/2),canvas.LineTo(startX,cy+this.Y+height)),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.CrescendoGlyph}),alphaTab.rendering.glyphs.DeadNoteHeadGlyph=$hx_exports.alphaTab.rendering.glyphs.DeadNoteHeadGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57514),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.DeadNoteHeadGlyph.__name__=["alphaTab","rendering","glyphs","DeadNoteHeadGlyph"],alphaTab.rendering.glyphs.DeadNoteHeadGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DeadNoteHeadGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.DeadNoteHeadGlyph}),alphaTab.rendering.glyphs.DiamondNoteHeadGlyph=$hx_exports.alphaTab.rendering.glyphs.DiamondNoteHeadGlyph=function(x,y,duration,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.GetSymbol(duration)),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.__name__=["alphaTab","rendering","glyphs","DiamondNoteHeadGlyph"],alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.GetSymbol=function(duration){switch(duration){case-4:case-2:case 1:case 2:return 57566;default:return 57564}},alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DiamondNoteHeadGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.DiamondNoteHeadGlyph}),alphaTab.rendering.glyphs.DigitGlyph=$hx_exports.alphaTab.rendering.glyphs.DigitGlyph=function(x,y,digit,scale){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,scale,alphaTab.rendering.glyphs.DigitGlyph.GetSymbol(digit)),this._digit=0,this._scale=0,this._digit=digit,this._scale=scale},alphaTab.rendering.glyphs.DigitGlyph.__name__=["alphaTab","rendering","glyphs","DigitGlyph"],alphaTab.rendering.glyphs.DigitGlyph.GetSymbol=function(digit){switch(digit){case 0:return 57472;case 1:return 57473;case 2:return 57474;case 3:return 57475;case 4:return 57476;case 5:return 57477;case 6:return 57478;case 7:return 57479;case 8:return 57480;case 9:return 57481;default:return-1}},alphaTab.rendering.glyphs.DigitGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DigitGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Y=this.Y+7*this.get_Scale(),this.Width=this.GetDigitWidth(this._digit)*this.get_Scale()*this._scale},GetDigitWidth:function(digit){switch(digit){case 1:return 10;case 0:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:return 14;default:return 0}},__class__:alphaTab.rendering.glyphs.DigitGlyph}),alphaTab.rendering.glyphs.DrumSticksGlyph=$hx_exports.alphaTab.rendering.glyphs.DrumSticksGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57513),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.DrumSticksGlyph.__name__=["alphaTab","rendering","glyphs","DrumSticksGlyph"],alphaTab.rendering.glyphs.DrumSticksGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DrumSticksGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.DrumSticksGlyph}),alphaTab.rendering.glyphs.DynamicsGlyph=$hx_exports.alphaTab.rendering.glyphs.DynamicsGlyph=function(x,y,dynamics){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,.6,alphaTab.rendering.glyphs.DynamicsGlyph.GetSymbol(dynamics))},alphaTab.rendering.glyphs.DynamicsGlyph.__name__=["alphaTab","rendering","glyphs","DynamicsGlyph"],alphaTab.rendering.glyphs.DynamicsGlyph.GetSymbol=function(dynamics){switch(dynamics){case 0:return 58666;case 1:return 58667;case 2:return 58656;case 3:return 58668;case 4:return 58669;case 5:return 58658;case 6:return 58671;case 7:return 58672;default:return-1}},alphaTab.rendering.glyphs.DynamicsGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.DynamicsGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.MusicFontGlyph.prototype.DoLayout.call(this),this.Height=17*this.get_Scale(),this.Y=this.Y+this.Height/2},__class__:alphaTab.rendering.glyphs.DynamicsGlyph}),alphaTab.rendering.glyphs.FadeInGlyph=$hx_exports.alphaTab.rendering.glyphs.FadeInGlyph=function(x,y){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y)},alphaTab.rendering.glyphs.FadeInGlyph.__name__=["alphaTab","rendering","glyphs","FadeInGlyph"],alphaTab.rendering.glyphs.FadeInGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.FadeInGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=17*this.get_Scale()},Paint:function(cx,cy,canvas){var size=6*this.get_Scale(),width=Math.max(this.Width,14*this.get_Scale()),offset=this.Height/2;canvas.BeginPath(),canvas.MoveTo(cx+this.X,cy+this.Y+offset),canvas.QuadraticCurveTo(cx+this.X+width/2,cy+this.Y+offset,cx+this.X+width,cy+this.Y+offset-size),canvas.MoveTo(cx+this.X,cy+this.Y+offset),canvas.QuadraticCurveTo(cx+this.X+width/2,cy+this.Y+offset,cx+this.X+width,cy+this.Y+offset+size),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.FadeInGlyph}),alphaTab.rendering.glyphs.FermataGlyph=$hx_exports.alphaTab.rendering.glyphs.FermataGlyph=function(x,y,fermata){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.FermataGlyph.GetSymbol(fermata))},alphaTab.rendering.glyphs.FermataGlyph.__name__=["alphaTab","rendering","glyphs","FermataGlyph"],alphaTab.rendering.glyphs.FermataGlyph.GetSymbol=function(accentuation){switch(accentuation){case 0:return 58564;case 1:return 58560;case 2:return 58566;default:return-1}},alphaTab.rendering.glyphs.FermataGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.FermataGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=23*this.get_Scale(),this.Height=12*this.get_Scale()},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.MusicFontGlyph.prototype.Paint.call(this,cx-this.Width/2,cy+this.Height,canvas)},__class__:alphaTab.rendering.glyphs.FermataGlyph}),alphaTab.rendering.glyphs.GhostNoteContainerGlyph=$hx_exports.alphaTab.rendering.glyphs.GhostNoteContainerGlyph=function(isOpen){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._isOpen=!1,this._infos=null,this._glyphs=null,this.IsEmpty=!1,this._isOpen=isOpen;this._infos=[];this._glyphs=[],this.IsEmpty=!0},alphaTab.rendering.glyphs.GhostNoteContainerGlyph.__name__=["alphaTab","rendering","glyphs","GhostNoteContainerGlyph"],alphaTab.rendering.glyphs.GhostNoteContainerGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.GhostNoteContainerGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{AddParenthesis:function(n){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),line=sr.GetNoteLine(n),hasParenthesis=n.IsGhost||this.IsTiedBend(n)&&sr.get_Settings().ShowParenthesisForTiedBends;this.AddParenthesisOnLine(line,hasParenthesis)},AddParenthesisOnLine:function(line,hasParenthesis){var info=new alphaTab.rendering.glyphs.GhostNoteInfo(line,hasParenthesis);this._infos.push(info),hasParenthesis&&(this.IsEmpty=!1)},IsTiedBend:function(note){return!!note.IsTieDestination&&(!!note.TieOrigin.get_HasBend()||this.IsTiedBend(note.TieOrigin))},DoLayout:function(){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer);this._infos.sort(function(a1,b1){return a=a1,b=b1,system._Int32.Int32_Impl_.CompareTo_Int32(a.Line,b.Line);var a,b});for(var previousGlyph=null,sizePerLine=sr.GetScoreY(1,0),i=0,j=this._infos.length;i0?this._glyphs[0].Width:0},Paint:function(cx,cy,canvas){alphaTab.rendering.glyphs.Glyph.prototype.Paint.call(this,cx,cy,canvas);for(var g=$iterator(this._glyphs)();g.hasNext();){g.next().Paint(cx+this.X,cy+this.Y,canvas)}},__class__:alphaTab.rendering.glyphs.GhostNoteContainerGlyph}),alphaTab.rendering.glyphs.GhostNoteInfo=$hx_exports.alphaTab.rendering.glyphs.GhostNoteInfo=function(line,isGhost){this.Line=0,this.IsGhost=!1,this.Line=line,this.IsGhost=isGhost},alphaTab.rendering.glyphs.GhostNoteInfo.__name__=["alphaTab","rendering","glyphs","GhostNoteInfo"],alphaTab.rendering.glyphs.GhostNoteInfo.prototype={__class__:alphaTab.rendering.glyphs.GhostNoteInfo},alphaTab.rendering.glyphs.GhostParenthesisGlyph=$hx_exports.alphaTab.rendering.glyphs.GhostParenthesisGlyph=function(isOpen){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._isOpen=!1,this.Height=0,this._isOpen=isOpen},alphaTab.rendering.glyphs.GhostParenthesisGlyph.__name__=["alphaTab","rendering","glyphs","GhostParenthesisGlyph"],alphaTab.rendering.glyphs.GhostParenthesisGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.GhostParenthesisGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.Glyph.prototype.DoLayout.call(this),this.Width=6*this.get_Scale()},Paint:function(cx,cy,canvas){if(this._isOpen){alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),cx+this.X+this.Width,cy+this.Y+this.Height,cx+this.X+this.Width,cy+this.Y,!1,6,3)}else{alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),cx+this.X,cy+this.Y,cx+this.X,cy+this.Y+this.Height,!1,6,3)}canvas.Fill()},__class__:alphaTab.rendering.glyphs.GhostParenthesisGlyph}),alphaTab.rendering.glyphs.HiHatGlyph=$hx_exports.alphaTab.rendering.glyphs.HiHatGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,isGrace?.75:1,57523),this._isGrace=!1,this._isGrace=isGrace},alphaTab.rendering.glyphs.HiHatGlyph.__name__=["alphaTab","rendering","glyphs","HiHatGlyph"],alphaTab.rendering.glyphs.HiHatGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.HiHatGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=9*(this._isGrace?.75:1)*this.get_Scale()},__class__:alphaTab.rendering.glyphs.HiHatGlyph}),alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup=$hx_exports.alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup=function(){alphaTab.rendering.glyphs.GlyphGroup.call(this,0,0);this.Glyphs=[]},alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup.__name__=["alphaTab","rendering","glyphs","LeftToRightLayoutingGlyphGroup"],alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup.__super__=alphaTab.rendering.glyphs.GlyphGroup,alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup.prototype=$extend(alphaTab.rendering.glyphs.GlyphGroup.prototype,{AddGlyph:function(g){g.X=0==this.Glyphs.length?0:this.Glyphs[this.Glyphs.length-1].X+this.Glyphs[this.Glyphs.length-1].Width,g.Renderer=this.Renderer,g.DoLayout(),this.Width=g.X+g.Width,alphaTab.rendering.glyphs.GlyphGroup.prototype.AddGlyph.call(this,g)},__class__:alphaTab.rendering.glyphs.LeftToRightLayoutingGlyphGroup}),alphaTab.rendering.glyphs.LineRangedGlyph=$hx_exports.alphaTab.rendering.glyphs.LineRangedGlyph=function(label){alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,1),this._label=null,this._label=label},alphaTab.rendering.glyphs.LineRangedGlyph.__name__=["alphaTab","rendering","glyphs","LineRangedGlyph"],alphaTab.rendering.glyphs.LineRangedGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.LineRangedGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){this.Renderer.get_Settings().ExtendLineEffectsToBeatEnd&&(this.EndPosition=4,this.ForceGroupedRendering=!0),alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this),this.Height=this.Renderer.get_Resources().EffectFont.Size},PaintNonGrouped:function(cx,cy,canvas){var res=this.Renderer.get_Resources();canvas.set_Font(res.EffectFont);var x=canvas.get_TextAlign();canvas.set_TextAlign(1),canvas.FillText(this._label,cx+this.X,cy+this.Y),canvas.set_TextAlign(x)},PaintGrouped:function(cx,cy,endX,canvas){this.PaintNonGrouped(cx,cy,canvas);var lineSpacing=3*this.get_Scale(),textWidth=canvas.MeasureText(this._label),startX=cx+this.X+textWidth/2+lineSpacing,lineY=cy+this.Y+4*this.get_Scale(),lineSize=8*this.get_Scale();if(endX>startX){for(var lineX=startX;lineX=0&&(this._noteString=HxOverrides.substr(this._noteString,0,i+2)),this._noteString="<"+this._noteString+">"}if(n.get_IsTrill())this._trillNoteString="("+(n.get_TrillFret()-n.Beat.Voice.Bar.Staff.TranspositionPitch)+")";else if(alphaTab.platform.Platform.IsAlmostEqualTo(n.HarmonicValue,0))this._trillNoteString="";else{switch(n.HarmonicType){case 2:case 3:case 4:case 5:case 6:var s=Std.string(fret+n.HarmonicValue),this5=system.Convert.ToUInt16(46),i1=s.indexOf(String.fromCharCode(this5));i1>=0&&(s=HxOverrides.substr(s,0,i1+2)),this._trillNoteString="<"+s+">";break;default:this._trillNoteString=""}}var s1=this._noteString;if(this.IsEmpty=null==s1||0==s1.length,!this.IsEmpty){this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().TablatureFont),this.Width=this.NoteStringWidth=this.Renderer.ScoreRenderer.Canvas.MeasureText(this._noteString),this.Height=this.Renderer.ScoreRenderer.Canvas.get_Font().Size;var s2=this._trillNoteString;!(null==s2||0==s2.length)&&(this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().GraceFont),this._trillNoteStringWidth=3*this.get_Scale()+this.Renderer.ScoreRenderer.Canvas.MeasureText(this._trillNoteString),this.Width=this.Width+this._trillNoteStringWidth)}},Paint:function(cx,cy,canvas){if(!this.IsEmpty){var textWidth=this.NoteStringWidth+this._trillNoteStringWidth,x=cx+this.X+(this.Width-textWidth)/2;this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().GraceFont),canvas.FillText(this._trillNoteString,x+this.NoteStringWidth+3*this.get_Scale(),cy+this.Y),this.Renderer.ScoreRenderer.Canvas.set_Font(this.Renderer.get_Resources().TablatureFont),canvas.FillText(this._noteString,x,cy+this.Y)}},__class__:alphaTab.rendering.glyphs.NoteNumberGlyph}),alphaTab.rendering.glyphs.NoteVibratoGlyph=$hx_exports.alphaTab.rendering.glyphs.NoteVibratoGlyph=function(x,y,type,scale){null==scale&&(scale=1.2),alphaTab.rendering.glyphs.GroupedEffectGlyph.call(this,4),this._type=0,this._scale=0,this._symbol=-1,this._symbolSize=0,this._symbolOffset=0,this._type=type,this._scale=scale,this.X=x,this.Y=y},alphaTab.rendering.glyphs.NoteVibratoGlyph.__name__=["alphaTab","rendering","glyphs","NoteVibratoGlyph"],alphaTab.rendering.glyphs.NoteVibratoGlyph.__super__=alphaTab.rendering.glyphs.GroupedEffectGlyph,alphaTab.rendering.glyphs.NoteVibratoGlyph.prototype=$extend(alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.GroupedEffectGlyph.prototype.DoLayout.call(this);var symbolHeight=0;switch(this._type){case 1:this._symbol=60068,this._symbolSize=8.5*this._scale,this._symbolOffset=10*this._scale,symbolHeight=6*this._scale;break;case 2:this._symbol=60126,this._symbolSize=10*this._scale,this._symbolOffset=7*this._scale,symbolHeight=10*this._scale}this.Height=symbolHeight*this.get_Scale()},PaintGrouped:function(cx,cy,endX,canvas){for(var width=endX-(cx+this.X),step=this._symbolSize*this.get_Scale(),loops=system.Convert.ToInt32_Single(Math.max(1,width/step)),loopX=0,i=0;i0;){var num=i%10,gl=new alphaTab.rendering.glyphs.DigitGlyph(0,0,num,this._scale);this.AddGlyph(gl),i=i/10|0}this.Glyphs.reverse();for(var cx=0,j=0,k=this.Glyphs.length;jstartX){for(var lineX=startX;lineX0){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i1=0;i10){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i=0;i=67||alphaTab.rendering.glyphs.ScoreBeatGlyph.NormalKeys.hasOwnProperty(value)?new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,isGrace):alphaTab.rendering.glyphs.ScoreBeatGlyph.XKeys.hasOwnProperty(value)?new alphaTab.rendering.glyphs.DrumSticksGlyph(0,0,isGrace):46==value?new alphaTab.rendering.glyphs.HiHatGlyph(0,0,isGrace):49==value||57==value?new alphaTab.rendering.glyphs.DiamondNoteHeadGlyph(0,0,n.Beat.Duration,isGrace):52==value?new alphaTab.rendering.glyphs.ChineseCymbalGlyph(0,0,isGrace):51==value||53==value||59==value?new alphaTab.rendering.glyphs.RideCymbalGlyph(0,0,isGrace):new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,isGrace)}return n.IsDead?new alphaTab.rendering.glyphs.DeadNoteHeadGlyph(0,0,isGrace):3==n.Beat.GraceType?new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,4,!0):1==n.HarmonicType?new alphaTab.rendering.glyphs.DiamondNoteHeadGlyph(0,0,n.Beat.Duration,isGrace):new alphaTab.rendering.glyphs.NoteHeadGlyph(0,0,n.Beat.Duration,isGrace)},CreateNoteGlyph:function(n){if(3!=n.Beat.GraceType||n.get_HasBend()){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),noteHeadGlyph=this.CreateNoteHeadGlyph(n),line=sr.GetNoteLine(n),this1=line;if(noteHeadGlyph.Y=sr.GetScoreY(this1,0),this.NoteHeads.AddNoteGlyph(noteHeadGlyph,n,line),0!=n.HarmonicType&&1!=n.HarmonicType){var harmonicFret=n.get_DisplayValue()+n.get_HarmonicPitch();noteHeadGlyph=new alphaTab.rendering.glyphs.DiamondNoteHeadGlyph(0,0,n.Beat.Duration,0!=this.Container.Beat.GraceType);var this2=line=sr.AccidentalHelper.GetNoteLineForValue(harmonicFret,!1);noteHeadGlyph.Y=sr.GetScoreY(this2,0),this.NoteHeads.AddNoteGlyph(noteHeadGlyph,n,line)}n.IsStaccato&&!this.NoteHeads.BeatEffects.hasOwnProperty("Staccato")&&(this.NoteHeads.BeatEffects.Staccato=new alphaTab.rendering.glyphs.CircleGlyph(0,0,1.5)),1!=n.Accentuated||this.NoteHeads.BeatEffects.hasOwnProperty("Accent")||(this.NoteHeads.BeatEffects.Accent=new alphaTab.rendering.glyphs.AccentuationGlyph(0,0,1)),2!=n.Accentuated||this.NoteHeads.BeatEffects.hasOwnProperty("HAccent")||(this.NoteHeads.BeatEffects.HAccent=new alphaTab.rendering.glyphs.AccentuationGlyph(0,0,2))}},__class__:alphaTab.rendering.glyphs.ScoreBeatGlyph}),alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph=function(){alphaTab.rendering.glyphs.BeatGlyphBase.call(this)},alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph.__name__=["alphaTab","rendering","glyphs","ScoreBeatPreNotesGlyph"],alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph.__super__=alphaTab.rendering.glyphs.BeatGlyphBase,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph.prototype=$extend(alphaTab.rendering.glyphs.BeatGlyphBase.prototype,{get_PrebendNoteHeadOffset:function(){return this._prebends.X+this._prebends.NoteHeadOffset},DoLayout:function(){if(!this.Container.Beat.get_IsRest()){var accidentals=new alphaTab.rendering.glyphs.AccidentalGroupGlyph,ghost=new alphaTab.rendering.glyphs.GhostNoteContainerGlyph(!0);ghost.Renderer=this.Renderer,this._prebends=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(this.Container.Beat,!0),this._prebends.Renderer=this.Renderer;for(var note=$iterator(this.Container.Beat.Notes)();note.hasNext();){var note1=note.next();if(note1.IsVisible){if(note1.get_HasBend()){switch(note1.BendType){case 6:case 7:case 8:this._prebends.AddGlyph(note1.get_DisplayValue()-(note1.BendPoints[0].Value/2|0),!1)}}else if(note1.Beat.get_HasWhammyBar()){switch(note1.Beat.WhammyBarType){case 5:case 6:this._prebends.AddGlyph(note1.get_DisplayValue()-(note1.Beat.WhammyBarPoints[0].Value/2|0),!1)}}this.CreateAccidentalGlyph(note1,accidentals),ghost.AddParenthesis(note1)}}this._prebends.IsEmpty||(this.AddGlyph(this._prebends),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*(0!=this.Container.Beat.GraceType?.75:1)*this.get_Scale()))),0!=this.Container.Beat.BrushType&&(this.AddGlyph(new alphaTab.rendering.glyphs.ScoreBrushGlyph(this.Container.Beat)),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*this.get_Scale()))),ghost.IsEmpty||(this.AddGlyph(ghost),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*(0!=this.Container.Beat.GraceType?.75:1)*this.get_Scale()))),accidentals.get_IsEmpty()||(this.AddGlyph(accidentals),this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,4*(0!=this.Container.Beat.GraceType?.75:1)*this.get_Scale())))}alphaTab.rendering.glyphs.BeatGlyphBase.prototype.DoLayout.call(this)},CreateAccidentalGlyph:function(n,accidentals){var sr=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),accidental=sr.AccidentalHelper.ApplyAccidental(n),noteLine=sr.GetNoteLine(n),isGrace=0!=this.Container.Beat.GraceType;if(0!=accidental){var this1=noteLine;accidentals.AddGlyph(new alphaTab.rendering.glyphs.AccidentalGlyph(0,sr.GetScoreY(this1,0),accidental,isGrace))}if(0!=n.HarmonicType&&1!=n.HarmonicType){var harmonicFret=n.get_DisplayValue()+n.get_HarmonicPitch();accidental=sr.AccidentalHelper.ApplyAccidentalForValue(n.Beat,harmonicFret,isGrace);var this2=noteLine=sr.AccidentalHelper.GetNoteLineForValue(harmonicFret,!1);accidentals.AddGlyph(new alphaTab.rendering.glyphs.AccidentalGlyph(0,sr.GetScoreY(this2,0),accidental,isGrace))}},__class__:alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph}),alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph=function(){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._bendNoteHeads=null;this._bendNoteHeads=[]},alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.__name__=["alphaTab","rendering","glyphs","ScoreHelperNotesBaseGlyph"],alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DrawBendSlur:function(canvas,x1,y1,x2,y2,down,scale,slurText){var normalVectorX=y2-y1,normalVectorY=x2-x1,this1=normalVectorX*normalVectorX+normalVectorY*normalVectorY,length=js.Boot.__cast(Math.sqrt(this1),Float);down?normalVectorX*=-1:normalVectorY*=-1,normalVectorX/=length,normalVectorY/=length;var offset=11*scale;x2-x1<20&&(offset/=2);var cp1X=(x2+x1)/2+offset*normalVectorX,cp1Y=(y2+y1)/2+offset*normalVectorY;if(canvas.BeginPath(),canvas.MoveTo(x1,y1),canvas.LineTo(cp1X,cp1Y),canvas.LineTo(x2,y2),canvas.Stroke(),null!=slurText&&0!=slurText.length){var w=canvas.MeasureText(slurText),textOffset=down?0:-canvas.get_Font().Size;canvas.FillText(slurText,cp1X-w/2,cp1Y+textOffset)}},DoLayout:function(){alphaTab.rendering.glyphs.Glyph.prototype.DoLayout.call(this),this.Width=0;for(var noteHeads=$iterator(this._bendNoteHeads)();noteHeads.hasNext();){var noteHeads1=noteHeads.next();noteHeads1.DoLayout(),this.Width=this.Width+(noteHeads1.Width+10*this.get_Scale())}},GetBeamDirection:function(beat,noteRenderer){return 0==noteRenderer.GetBeatDirection(beat)?1:0},__class__:alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph}),alphaTab.rendering.glyphs.ScoreBendGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreBendGlyph=function(beat){alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.call(this),this._beat=null,this._notes=null,this._endNoteGlyph=null,this._middleNoteGlyph=null,this._beat=beat;this._notes=[],this._middleNoteGlyph=null,this._endNoteGlyph=null},alphaTab.rendering.glyphs.ScoreBendGlyph.__name__=["alphaTab","rendering","glyphs","ScoreBendGlyph"],alphaTab.rendering.glyphs.ScoreBendGlyph.__super__=alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph,alphaTab.rendering.glyphs.ScoreBendGlyph.prototype=$extend(alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.prototype,{AddBends:function(note){if(this._notes.push(note),!note.IsTieOrigin){switch(note.BendType){case 3:if(!note.IsTieOrigin){var endGlyphs=this._endNoteGlyph;null==endGlyphs&&((endGlyphs=this._endNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(endGlyphs));var lastBendPoint=note.BendPoints[note.BendPoints.length-1];endGlyphs.AddGlyph(this.GetBendNoteValue(note,lastBendPoint),lastBendPoint.Value%2!=0)}break;case 4:var middleGlyphs=this._middleNoteGlyph;null==middleGlyphs&&((middleGlyphs=this._middleNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(middleGlyphs));var middleBendPoint=note.BendPoints[1];middleGlyphs.AddGlyph(this.GetBendNoteValue(note,note.BendPoints[1]),middleBendPoint.Value%2!=0);var endGlyphs1=this._endNoteGlyph;null==endGlyphs1&&((endGlyphs1=this._endNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(endGlyphs1));var lastBendPoint1=note.BendPoints[note.BendPoints.length-1];endGlyphs1.AddGlyph(this.GetBendNoteValue(note,lastBendPoint1),lastBendPoint1.Value%2!=0);break;case 2:case 7:case 8:var endGlyphs2=this._endNoteGlyph;null==endGlyphs2&&((endGlyphs2=this._endNoteGlyph=new alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph(note.Beat,!1)).Renderer=this.Renderer,this._bendNoteHeads.push(endGlyphs2));var lastBendPoint2=note.BendPoints[note.BendPoints.length-1];endGlyphs2.AddGlyph(this.GetBendNoteValue(note,lastBendPoint2),lastBendPoint2.Value%2!=0)}}},Paint:function(cx,cy,canvas){var startNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._beat.Voice.Bar),startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,2),endBeatX=cx+startNoteRenderer.X;this._beat.get_IsLastOfVoice()?endBeatX+=startNoteRenderer.get_PostBeatGlyphsStart():endBeatX+=startNoteRenderer.GetBeatX(this._beat.NextBeat,0);var middleX=(startX+(endBeatX-=7*this.get_Scale()))/2;null!=this._middleNoteGlyph&&(this._middleNoteGlyph.X=middleX-this._middleNoteGlyph.NoteHeadOffset,this._middleNoteGlyph.Y=cy+startNoteRenderer.Y,this._middleNoteGlyph.Paint(0,0,canvas)),null!=this._endNoteGlyph&&(this._endNoteGlyph.X=endBeatX-this._endNoteGlyph.NoteHeadOffset,this._endNoteGlyph.Y=cy+startNoteRenderer.Y,this._endNoteGlyph.Paint(0,0,canvas));this._notes.sort(function(a1,b1){return a=a1,b1.get_DisplayValue()-a.get_DisplayValue();var a});for(var directionBeat=3==this._beat.GraceType?this._beat.NextBeat:this._beat,direction=1==this._notes.length?this.GetBeamDirection(directionBeat,startNoteRenderer):0,i=0;i0&&i>=(this._notes.length/2|0)&&(direction=1);var startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(note,!0),heightOffset=9*this.get_Scale()*.75*.5;1==direction&&(startY+=9*this.get_Scale());var slurText=1==note.BendStyle?"grad.":"";if(note.IsTieOrigin){var endNote=note.TieDestination,endNoteRenderer=null==endNote?null:this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endNote.Beat.Voice.Bar);if(null==endNoteRenderer||endNoteRenderer.Staff!=startNoteRenderer.Staff){var endX=cx+startNoteRenderer.X+startNoteRenderer.Width,noteValueToDraw=note.TieDestination.get_RealValue(),endY=(startNoteRenderer.AccidentalHelper.ApplyAccidentalForValue(note.Beat,noteValueToDraw,!1),cy+startNoteRenderer.Y),this2=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(noteValueToDraw,!1),endY1=endY+startNoteRenderer.GetScoreY(this2,0);5==note.BendType||6==note.BendType?(alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY1,1==direction,22,4),canvas.Fill()):this.DrawBendSlur(canvas,startX,startY,endX,endY1,1==direction,this.get_Scale(),slurText)}else{var endX1=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endNote.Beat,2),endY2=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(endNote,!0);1==direction&&(endY2+=9*this.get_Scale()),5==note.BendType||6==note.BendType?(alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX1,endY2,1==direction,22,4),canvas.Fill()):this.DrawBendSlur(canvas,startX,startY,endX1,endY2,1==direction,this.get_Scale(),slurText)}switch(note.BendType){case 6:case 7:case 8:var preX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(note.Beat,0);preX+=js.Boot.__cast(startNoteRenderer.GetBeatContainer(note.Beat).PreNotes,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph).get_PrebendNoteHeadOffset();var preY=cy+startNoteRenderer.Y,this3=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(note.get_DisplayValue()-(note.BendPoints[0].Value/2|0),!1),preY1=preY+startNoteRenderer.GetScoreY(this3,0)+heightOffset;this.DrawBendSlur(canvas,preX,preY1,startX,startY,1==direction,this.get_Scale(),null)}}else{0==direction&&(heightOffset=-heightOffset);var endValue,endY3;switch(note.BendType){case 2:endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._endNoteGlyph.GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endBeatX,endY3,1==direction,this.get_Scale(),slurText);break;case 3:this._bendNoteHeads.length>0&&(endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endBeatX,endY3,1==direction,this.get_Scale(),slurText));break;case 4:var middleValue=this.GetBendNoteValue(note,note.BendPoints[1]),middleY=this._middleNoteGlyph.GetNoteValueY(middleValue,!1)+heightOffset;this.DrawBendSlur(canvas,startX,startY,middleX,middleY,1==direction,this.get_Scale(),slurText),endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._endNoteGlyph.GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,middleX,middleY,endBeatX,endY3,1==direction,this.get_Scale(),slurText);break;case 6:case 7:case 8:var preX1=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(note.Beat,0);preX1+=js.Boot.__cast(startNoteRenderer.GetBeatContainer(note.Beat).PreNotes,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph).get_PrebendNoteHeadOffset();var preY2=cy+startNoteRenderer.Y,this4=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(note.get_DisplayValue()-(note.BendPoints[0].Value/2|0),!1),preY3=preY2+startNoteRenderer.GetScoreY(this4,0)+heightOffset;this.DrawBendSlur(canvas,preX1,preY3,startX,startY,1==direction,this.get_Scale(),null),this._bendNoteHeads.length>0&&(endValue=this.GetBendNoteValue(note,note.BendPoints[note.BendPoints.length-1]),endY3=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endBeatX,endY3,1==direction,this.get_Scale(),slurText))}}++i}},GetBendNoteValue:function(note,bendPoint){return note.get_DisplayValueWithoutBend()+(bendPoint.Value/2|0)},__class__:alphaTab.rendering.glyphs.ScoreBendGlyph}),alphaTab.rendering.glyphs.ScoreBrushGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreBrushGlyph=function(beat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._beat=null,this._beat=beat},alphaTab.rendering.glyphs.ScoreBrushGlyph.__name__=["alphaTab","rendering","glyphs","ScoreBrushGlyph"],alphaTab.rendering.glyphs.ScoreBrushGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.ScoreBrushGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=10*this.get_Scale()},Paint:function(cx,cy,canvas){var scoreBarRenderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.ScoreBarRenderer),lineSize=scoreBarRenderer.get_LineOffset(),startY=cy+this.Y+(scoreBarRenderer.GetNoteY(this._beat.MaxNote,!1)-lineSize),endY=cy+this.Y+scoreBarRenderer.GetNoteY(this._beat.MinNote,!1)+lineSize,arrowX=cx+this.X+this.Width/2,arrowSize=8*this.get_Scale();if(0!=this._beat.BrushType)if(3==this._beat.BrushType){var lineStartY=startY-arrowSize,lineEndY=endY-arrowSize;canvas.BeginRotate(cx+this.X+2*this.get_Scale(),lineEndY,-90);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=Math.abs(lineEndY-lineStartY),glyph.Paint(0,0,canvas),canvas.EndRotate(),canvas.BeginPath(),canvas.MoveTo(arrowX,endY),canvas.LineTo(arrowX+arrowSize/2,endY-arrowSize),canvas.LineTo(arrowX-arrowSize/2,endY-arrowSize),canvas.ClosePath(),canvas.Fill()}else if(4==this._beat.BrushType){var lineStartY1=startY+arrowSize,lineEndY1=endY+arrowSize;canvas.BeginRotate(cx+this.X+7*this.get_Scale(),lineStartY1,90);var glyph1=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph1.Renderer=this.Renderer,glyph1.DoLayout(),glyph1.Width=Math.abs(lineEndY1-lineStartY1),glyph1.Paint(0,0,canvas),canvas.EndRotate(),canvas.BeginPath(),canvas.MoveTo(arrowX,startY),canvas.LineTo(arrowX+arrowSize/2,startY+arrowSize),canvas.LineTo(arrowX-arrowSize/2,startY+arrowSize),canvas.ClosePath(),canvas.Fill()}},__class__:alphaTab.rendering.glyphs.ScoreBrushGlyph}),alphaTab.rendering.glyphs.TieGlyph=$hx_exports.alphaTab.rendering.glyphs.TieGlyph=function(startBeat,endBeat,forEnd){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this.StartBeat=null,this.EndBeat=null,this.YOffset=0,this._forEnd=!1,this.StartBeat=startBeat,this.EndBeat=endBeat,this._forEnd=forEnd},alphaTab.rendering.glyphs.TieGlyph.__name__=["alphaTab","rendering","glyphs","TieGlyph"],alphaTab.rendering.glyphs.TieGlyph.PaintTie=function(canvas,scale,x1,y1,x2,y2,down,offset,size){if(null==size&&(size=4),null==offset&&(offset=22),null==down&&(down=!1),x1!=x2||y1!=y2){if(x2this._startNote.get_RealValue();startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1);var lineOffset=2.25*this.get_Scale();if(isUp?startY+=lineOffset:startY-=lineOffset,null!=this._startNote.SlideTarget){var endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startNote.SlideTarget.Beat.Voice.Bar);null==endNoteRenderer||endNoteRenderer.Staff!=startNoteRenderer.Staff?(endX=cx+startNoteRenderer.X+this._parent.X,endY=startY):(endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(this._startNote.SlideTarget.Beat,0)-offsetX,endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(this._startNote.SlideTarget,!1),isUp?endY-=lineOffset:endY+=lineOffset)}else endX=cx+startNoteRenderer.X+this._parent.X,endY=startY;break;case 3:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1)-offsetX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+9;break;case 4:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1)-offsetX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1);break;case 5:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0)+offsetX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1);break;case 6:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0)+offsetX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+9;break;case 7:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-4.5,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+9,waves=!0;break;case 8:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+4.5,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-9,waves=!0;break;default:return}if(waves){var b=endX-startX,a=endY-startY,this2=a,this3=b,this4=a/Math.sqrt(Math.pow(this2,2)+Math.pow(this3,2)),angle=js.Boot.__cast(57.29577951308238*Math.asin(this4),Float);canvas.BeginRotate(startX,startY,angle);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=b,glyph.Paint(0,0,canvas),canvas.EndRotate()}else canvas.BeginPath(),canvas.MoveTo(startX,startY),canvas.LineTo(endX,endY),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.ScoreSlideLineGlyph}),alphaTab.rendering.glyphs.ScoreSlurGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreSlurGlyph=function(startBeat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._startBeat=null,this._startBeat=startBeat},alphaTab.rendering.glyphs.ScoreSlurGlyph.__name__=["alphaTab","rendering","glyphs","ScoreSlurGlyph"],alphaTab.rendering.glyphs.ScoreSlurGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.ScoreSlurGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{GetBeamDirection:function(beat,noteRenderer){return 0==js.Boot.__cast(noteRenderer,alphaTab.rendering.ScoreBarRenderer).GetBeatDirection(beat)?1:0},Paint:function(cx,cy,canvas){var slurId="score.slur."+this._startBeat.SlurOrigin.Id,renderer=this.Renderer;if(!renderer.Staff.GetSharedLayoutData(slurId,!1)){renderer.Staff.SetSharedLayoutData(slurId,!0);var startNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startBeat.Voice.Bar),direction=this.GetBeamDirection(this._startBeat,startNoteRenderer),startX=cx+startNoteRenderer.X,startY=cy+startNoteRenderer.Y;if(this._startBeat.SlurOrigin.Id==this._startBeat.Id){startX+=startNoteRenderer.GetBeatX(this._startBeat,2);var note=1==direction?this._startBeat.MinNote:this._startBeat.MaxNote;startY+=startNoteRenderer.GetNoteY(note,!1)}else startY+=startNoteRenderer.Height;var endX,endY,endBeat=this._startBeat.SlurOrigin.SlurDestination,endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endBeat.Voice.Bar);if(null==endNoteRenderer||startNoteRenderer.Staff!=endNoteRenderer.Staff)endX=cx+(endNoteRenderer=js.Boot.__cast(startNoteRenderer.Staff.BarRenderers[startNoteRenderer.Staff.BarRenderers.length-1],alphaTab.rendering.ScoreBarRenderer)).X+endNoteRenderer.Width,endY=cy+endNoteRenderer.Y+endNoteRenderer.Height;else{endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat,2);var endBeatHelper=endNoteRenderer.Helpers.GetBeamingHelperForBeat(endBeat);if(endBeatHelper.Direction==direction)endY=cy+endNoteRenderer.Y+endNoteRenderer.CalculateBeamY(endBeatHelper,endX);else{var note1=1==direction?endBeat.MinNote:endBeat.MaxNote;endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note1,!1)}}var height=(endX-startX)*this.Renderer.get_Settings().SlurHeightFactor;alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==direction,height,4),canvas.Fill()}},__class__:alphaTab.rendering.glyphs.ScoreSlurGlyph}),alphaTab.rendering.glyphs.ScoreTieGlyph=$hx_exports.alphaTab.rendering.glyphs.ScoreTieGlyph=function(startNote,endNote,forEnd){null==forEnd&&(forEnd=!1),alphaTab.rendering.glyphs.TieGlyph.call(this,null==startNote?null:startNote.Beat,null==endNote?null:endNote.Beat,forEnd),this.StartNote=null,this.EndNote=null,this.StartNote=startNote,this.EndNote=endNote},alphaTab.rendering.glyphs.ScoreTieGlyph.__name__=["alphaTab","rendering","glyphs","ScoreTieGlyph"],alphaTab.rendering.glyphs.ScoreTieGlyph.__super__=alphaTab.rendering.glyphs.TieGlyph,alphaTab.rendering.glyphs.ScoreTieGlyph.prototype=$extend(alphaTab.rendering.glyphs.TieGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.TieGlyph.prototype.DoLayout.call(this),this.YOffset=4.5},GetBeamDirection:function(beat,noteRenderer){return 0==js.Boot.__cast(noteRenderer,alphaTab.rendering.ScoreBarRenderer).GetBeatDirection(beat)?1:0},GetStartY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this.StartNote,!1)},GetEndY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this.EndNote,!1)},GetStartX:function(noteRenderer){return noteRenderer.GetBeatX(this.StartNote.Beat,2)},GetEndX:function(noteRenderer){return noteRenderer.GetNoteX(this.EndNote,!1)},__class__:alphaTab.rendering.glyphs.ScoreTieGlyph}),alphaTab.rendering.glyphs.TimeSignatureGlyph=$hx_exports.alphaTab.rendering.glyphs.TimeSignatureGlyph=function(x,y,numerator,denominator,isCommon){alphaTab.rendering.glyphs.GlyphGroup.call(this,x,y),this._numerator=0,this._denominator=0,this._isCommon=!1,this._numerator=numerator,this._denominator=denominator,this._isCommon=isCommon},alphaTab.rendering.glyphs.TimeSignatureGlyph.__name__=["alphaTab","rendering","glyphs","TimeSignatureGlyph"],alphaTab.rendering.glyphs.TimeSignatureGlyph.__super__=alphaTab.rendering.glyphs.GlyphGroup,alphaTab.rendering.glyphs.TimeSignatureGlyph.prototype=$extend(alphaTab.rendering.glyphs.GlyphGroup.prototype,{get_CommonY:function(){throw new js._Boot.HaxeError("abstract")},get_NumeratorY:function(){throw new js._Boot.HaxeError("abstract")},get_DenominatorY:function(){throw new js._Boot.HaxeError("abstract")},get_CommonScale:function(){throw new js._Boot.HaxeError("abstract")},get_NumberScale:function(){throw new js._Boot.HaxeError("abstract")},DoLayout:function(){if(this._isCommon&&2==this._numerator&&2==this._denominator){var common=new alphaTab.rendering.glyphs.MusicFontGlyph(0,this.get_CommonY(),this.get_CommonScale(),57483);common.Width=14*this.get_Scale(),this.AddGlyph(common),alphaTab.rendering.glyphs.GlyphGroup.prototype.DoLayout.call(this)}else if(this._isCommon&&4==this._numerator&&4==this._denominator){var common1=new alphaTab.rendering.glyphs.MusicFontGlyph(0,this.get_CommonY(),this.get_CommonScale(),57482);common1.Width=14*this.get_Scale(),this.AddGlyph(common1),alphaTab.rendering.glyphs.GlyphGroup.prototype.DoLayout.call(this)}else{var numerator=new alphaTab.rendering.glyphs.NumberGlyph(0,this.get_NumeratorY(),this._numerator,this.get_NumberScale()),denominator=new alphaTab.rendering.glyphs.NumberGlyph(0,this.get_DenominatorY(),this._denominator,this.get_NumberScale());this.AddGlyph(numerator),this.AddGlyph(denominator),alphaTab.rendering.glyphs.GlyphGroup.prototype.DoLayout.call(this);for(var i=0,j=this.Glyphs.length;i0&&i>=(this._beat.Notes.length/2|0)&&(direction=1);var endX=cx+startNoteRenderer.X;beat.get_IsLastOfVoice()?endX+=startNoteRenderer.Width:endX+=startNoteRenderer.GetBeatX(beat,4),endX-=7*this.get_Scale();var slurText=1==beat.WhammyStyle&&0==i?"grad.":"",endNoteRenderer=null;note.IsTieOrigin&&(null!=(endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),note.TieDestination.Beat.Voice.Bar))&&endNoteRenderer.Staff==startNoteRenderer.Staff?endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(note.TieDestination.Beat,2):endNoteRenderer=null);var heightOffset=9*this.get_Scale()*.75*.5;0==direction&&(heightOffset=-heightOffset);var endValue,endY;switch(beat.WhammyBarType){case 2:0==i&&(this._bendNoteHeads[0].X=endX-this._bendNoteHeads[0].NoteHeadOffset,this._bendNoteHeads[0].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[0].Paint(0,0,canvas)),endValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1]),this._bendNoteHeads[0].ContainsNoteValue(endValue)?(endY=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endX,endY,1==direction,this.get_Scale(),slurText)):null!=endNoteRenderer&&(note.IsTieOrigin&¬e.TieDestination.Beat.get_HasWhammyBar()||note.Beat.IsContinuedWhammy)?(endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),this.DrawBendSlur(canvas,startX,startY,endX,endY,1==direction,this.get_Scale(),slurText)):note.IsTieOrigin&&(endY=null==endNoteRenderer?startY:cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==beatDirection,22,4),canvas.Fill());break;case 3:if(1==whammyMode){if(0==i){var simpleStartX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,1)-2*this.get_Scale(),simpleEndX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,3)+2*this.get_Scale(),middleX=(simpleStartX+simpleEndX)/2,text=Std.string((this._beat.WhammyBarPoints[1].Value-this._beat.WhammyBarPoints[0].Value)/4|0);canvas.set_Font(this.Renderer.get_Resources().TablatureFont),canvas.FillText(text,middleX,cy+this.Y);var simpleStartY=cy+this.Y+canvas.get_Font().Size+2*this.get_Scale(),simpleEndY=simpleStartY+12*this.get_Scale();this._beat.WhammyBarPoints[1].Value>this._beat.WhammyBarPoints[0].Value?(canvas.MoveTo(simpleStartX,simpleEndY),canvas.LineTo(middleX,simpleStartY),canvas.LineTo(simpleEndX,simpleEndY)):(canvas.MoveTo(simpleStartX,simpleStartY),canvas.LineTo(middleX,simpleEndY),canvas.LineTo(simpleEndX,simpleStartY)),canvas.Stroke()}note.IsTieOrigin&&(endY=null==endNoteRenderer?startY:cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==beatDirection,22,4),canvas.Fill())}else{var middleX1=(startX+endX)/2;this._bendNoteHeads[0].X=middleX1-this._bendNoteHeads[0].NoteHeadOffset,this._bendNoteHeads[0].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[0].Paint(0,0,canvas);var middleValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[1]),middleY=this._bendNoteHeads[0].GetNoteValueY(middleValue,!1)+heightOffset;this.DrawBendSlur(canvas,startX,startY,middleX1,middleY,1==direction,this.get_Scale(),slurText),this._bendNoteHeads[1].X=endX-this._bendNoteHeads[1].NoteHeadOffset,this._bendNoteHeads[1].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[1].Paint(0,0,canvas),endValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1]),endY=this._bendNoteHeads[1].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,middleX1,middleY,endX,endY,1==direction,this.get_Scale(),slurText)}break;case 4:note.IsTieOrigin&&(endY=null==endNoteRenderer?startY:cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(note.TieDestination,!0),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==beatDirection,22,4),canvas.Fill());break;case 5:case 6:var preX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(note.Beat,0);preX+=js.Boot.__cast(startNoteRenderer.GetBeatContainer(note.Beat).PreNotes,alphaTab.rendering.glyphs.ScoreBeatPreNotesGlyph).get_PrebendNoteHeadOffset();var preY=cy+startNoteRenderer.Y,this2=startNoteRenderer.AccidentalHelper.GetNoteLineForValue(note.get_DisplayValue()-(note.Beat.WhammyBarPoints[0].Value/2|0),!1),preY1=preY+startNoteRenderer.GetScoreY(this2,0)+heightOffset;this.DrawBendSlur(canvas,preX,preY1,startX,startY,1==direction,this.get_Scale(),slurText),this._bendNoteHeads.length>0&&(this._bendNoteHeads[0].X=endX-this._bendNoteHeads[0].NoteHeadOffset,this._bendNoteHeads[0].Y=cy+startNoteRenderer.Y,this._bendNoteHeads[0].Paint(0,0,canvas),endValue=this.GetBendNoteValue(note,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1]),endY=this._bendNoteHeads[0].GetNoteValueY(endValue,!1)+heightOffset,this.DrawBendSlur(canvas,startX,startY,endX,endY,1==direction,this.get_Scale(),slurText))}++i}canvas.set_TextAlign(textalign)},GetBendNoteValue:function(note,bendPoint){return note.get_DisplayValueWithoutBend()+(bendPoint.Value/2|0)},__class__:alphaTab.rendering.glyphs.ScoreWhammyBarGlyph}),alphaTab.rendering.glyphs.SpacingGlyph=$hx_exports.alphaTab.rendering.glyphs.SpacingGlyph=function(x,y,width){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this.Width=width},alphaTab.rendering.glyphs.SpacingGlyph.__name__=["alphaTab","rendering","glyphs","SpacingGlyph"],alphaTab.rendering.glyphs.SpacingGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.SpacingGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{__class__:alphaTab.rendering.glyphs.SpacingGlyph}),alphaTab.rendering.glyphs.TabBeatContainerGlyph=$hx_exports.alphaTab.rendering.glyphs.TabBeatContainerGlyph=function(beat,voiceContainer){alphaTab.rendering.glyphs.BeatContainerGlyph.call(this,beat,voiceContainer),this._bend=null},alphaTab.rendering.glyphs.TabBeatContainerGlyph.__name__=["alphaTab","rendering","glyphs","TabBeatContainerGlyph"],alphaTab.rendering.glyphs.TabBeatContainerGlyph.__super__=alphaTab.rendering.glyphs.BeatContainerGlyph,alphaTab.rendering.glyphs.TabBeatContainerGlyph.prototype=$extend(alphaTab.rendering.glyphs.BeatContainerGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.BeatContainerGlyph.prototype.DoLayout.call(this),null!=this._bend&&(this._bend.Renderer=this.Renderer,this._bend.DoLayout(),this.UpdateWidth())},CreateTies:function(n){if(n.IsVisible){var renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(n.IsTieOrigin&&renderer.ShowTiedNotes&&n.TieDestination.IsVisible){var tie=new alphaTab.rendering.glyphs.TabTieGlyph(n,n.TieDestination,!1,!1);this.Ties.push(tie)}if(n.IsTieDestination&&renderer.ShowTiedNotes){var tie1=new alphaTab.rendering.glyphs.TabTieGlyph(n.TieOrigin,n,!1,!0);this.Ties.push(tie1)}if(null!=n.SlurOrigin){var tie2=new alphaTab.rendering.glyphs.TabSlurGlyph(n);this.Ties.push(tie2)}if(0!=n.SlideType){var l=new alphaTab.rendering.glyphs.TabSlideLineGlyph(n.SlideType,n,this);this.Ties.push(l)}n.get_HasBend()&&(null==this._bend&&(this._bend=new alphaTab.rendering.glyphs.TabBendGlyph(n.Beat),this._bend.Renderer=this.Renderer,this.Ties.push(this._bend)),this._bend.AddBends(n))}},__class__:alphaTab.rendering.glyphs.TabBeatContainerGlyph}),alphaTab.rendering.glyphs.TabBeatGlyph=$hx_exports.alphaTab.rendering.glyphs.TabBeatGlyph=function(){alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.call(this)},alphaTab.rendering.glyphs.TabBeatGlyph.__name__=["alphaTab","rendering","glyphs","TabBeatGlyph"],alphaTab.rendering.glyphs.TabBeatGlyph.__super__=alphaTab.rendering.glyphs.BeatOnNoteGlyphBase,alphaTab.rendering.glyphs.TabBeatGlyph.prototype=$extend(alphaTab.rendering.glyphs.BeatOnNoteGlyphBase.prototype,{DoLayout:function(){var tabRenderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(this.Container.Beat.get_IsRest()){var line=0,offset1=0;switch(this.Container.Beat.Duration){case-4:case-2:line=3;break;case 1:line=2;break;case 2:case 4:line=3;break;case 8:case 16:line=2,offset1=5;break;case 32:case 64:case 128:case 256:line=3}var this2=offset1,y=tabRenderer.GetTabY(line,this2);if(this.RestGlyph=new alphaTab.rendering.glyphs.TabRestGlyph(0,y,tabRenderer.ShowRests,this.Container.Beat.Duration),this.RestGlyph.Beat=this.Container.Beat,this.RestGlyph.BeamingHelper=this.BeamingHelper,this.AddGlyph(this.RestGlyph),this.Container.Beat.Dots>0&&tabRenderer.ShowRests){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i1=0;i10&&tabRenderer.RenderRhythm){this.AddGlyph(new alphaTab.rendering.glyphs.SpacingGlyph(0,0,5*this.get_Scale()));for(var i=0;i0&&(-1==this._releaseMinValue||value0&&(-1==this._releaseMinValue||value0&&(-1==this._releaseMinValue||value=0&&(renderPoints[1].LineValue=value);break;case 4:renderPoints[1].LineValue=this._bendMiddleMinValue,(value=note1.IsTieOrigin?this._releaseContinuedMinValue:this._releaseMinValue)>=0&&(renderPoints[2].LineValue=value);break;case 6:renderPoints[0].LineValue=this._preBendMinValue;break;case 7:renderPoints[0].LineValue=this._preBendMinValue,renderPoints[1].LineValue=note1.IsTieOrigin?this._bendEndContinuedMinValue:this._bendEndMinValue;break;case 8:renderPoints[0].LineValue=this._preBendMinValue,(value=note1.IsTieOrigin?this._releaseContinuedMinValue:this._releaseMinValue)>=0&&(renderPoints[1].LineValue=value)}}this.Width=0;this._notes.sort(function(a1,b1){return b=b1,(a=a1).get_IsStringed()?a.String-b.String:a.get_RealValue()-b.get_RealValue();var a,b})},CreateRenderingPoints:function(note){var renderingPoints=[];switch(note.BendType){case 1:for(var bendPoint=$iterator(note.BendPoints)();bendPoint.hasNext();){var bendPoint1=bendPoint.next();renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(bendPoint1.Offset,bendPoint1.Value))}break;case 4:renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(0,note.BendPoints[0].Value)),renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(30,note.BendPoints[1].Value)),renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(60,note.BendPoints[3].Value));break;case 2:case 3:case 5:case 6:case 7:case 8:renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(0,note.BendPoints[0].Value)),renderingPoints.push(new alphaTab.rendering.glyphs.TabBendRenderPoint(60,note.BendPoints[1].Value))}return renderingPoints},Paint:function(cx,cy,canvas){var color=canvas.get_Color();this._notes.length>1&&canvas.set_Color(this.Renderer.get_Resources().SecondaryGlyphColor);for(var note=$iterator(this._notes)();note.hasNext();){for(var endNoteRenderer,note1=note.next(),renderPoints=this._renderPoints[note1.Id],startNoteRenderer=this.Renderer,endNote=note1,isMultiBeatBend=!1,endNoteHasBend=!1,slurText=1==note1.BendStyle?"grad.":"",endBeat=null;endNote.IsTieOrigin;){var nextNote=endNote.TieDestination;if(null==(endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),nextNote.Beat.Voice.Bar))||startNoteRenderer.Staff!=endNoteRenderer.Staff)break;if(isMultiBeatBend=!0,(endNote=nextNote).get_HasBend()||!this.Renderer.get_Settings().ExtendBendArrowsOnTiedNotes){endNoteHasBend=!0;break}}endBeat=endNote.Beat,endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endBeat.Voice.Bar),endBeat.get_IsLastOfVoice()&&!endNote.get_HasBend()&&this.Renderer.get_Settings().ExtendBendArrowsOnTiedNotes&&(endBeat=null);var startX=0,endX=0,topY=cy+startNoteRenderer.Y;startNoteRenderer.Y,startNoteRenderer.GetNoteY(note1,!1);startX=cx+startNoteRenderer.X,renderPoints[0].Value>0||note1.IsContinuedBend?startX+=startNoteRenderer.GetBeatX(note1.Beat,2):startX+=startNoteRenderer.GetNoteX(note1,!0),endX=null==endBeat||endBeat.get_IsLastOfVoice()&&!endNoteHasBend?cx+endNoteRenderer.X+endNoteRenderer.get_PostBeatGlyphsStart():endNoteHasBend||null==endBeat.NextBeat?cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat,2):5==note1.BendType?cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat.NextBeat,1):cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat.NextBeat,0),isMultiBeatBend||(endX-=6*this.get_Scale());var dX=(endX-startX)/60;canvas.BeginPath();for(var i=0,j=renderPoints.length-1;ifirstPt.Value){y2+arrowSize>y1&&(y2=y1-arrowSize),canvas.BeginPath(),canvas.MoveTo(x2,y2);canvas.LineTo(x2-.5*arrowSize,y2+arrowSize);canvas.LineTo(x2+.5*arrowSize,y2+arrowSize),canvas.ClosePath(),canvas.Fill(),arrowOffset=arrowSize}else if(secondPt.Value!=firstPt.Value){y20){var dashX=x2,dashSize=3*this.get_Scale(),end=x1+dashSize;if((dashX-x1)/(2*dashSize)<1)canvas.MoveTo(dashX,y1),canvas.LineTo(x1,y1);else for(;dashX>end;)canvas.MoveTo(dashX,y1),canvas.LineTo(dashX-dashSize,y1),dashX-=2*dashSize;canvas.Stroke()}}else x2>x1?(canvas.MoveTo(x1,y1),canvas.BezierCurveTo((x1+x2)/2,y1,x2,y1,x2,y2+arrowOffset),canvas.Stroke()):(canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2),canvas.Stroke());if(null!=slurText&&0!=slurText.length&&firstPt.Offsety2){var h=Math.abs(y1-y2);y=h>1.3*canvas.get_Font().Size?y1-h/2:y1,x=(x1+x2-size)/2}else y=y1,x=x2-size;canvas.FillText(slurText,x,y)}if(0!=secondPt.Value&&firstPt.Value!=secondPt.Value){var dV=secondPt.Value,up=secondPt.Value>firstPt.Value,s="";if(4==(dV=Math.abs(dV)))s="full",dV-=4;else if(dV>=4||dV<=-4){var steps=dV/4|0;s+=Std.string(steps),dV-=4*steps}if(dV>0&&(s+=alphaTab.rendering.glyphs.TabBendGlyph.GetFractionSign(dV)),""!=s){var startY=y2=cy-bendValueHeight*secondPt.Value;if(!up){startY=y1+1*Math.abs(y2-y1)/3}canvas.set_Font(res.TablatureFont);var size1=canvas.MeasureText(s),y3=startY-.5*res.TablatureFont.Size-2*this.get_Scale(),x3=x2-size1/2;canvas.FillText(s,x3,y3)}}},__class__:alphaTab.rendering.glyphs.TabBendGlyph}),alphaTab.rendering.glyphs.TabBendRenderPoint=$hx_exports.alphaTab.rendering.glyphs.TabBendRenderPoint=function(offset,value){null==value&&(value=0),null==offset&&(offset=0),alphaTab.model.BendPoint.call(this,offset,value),this.LineValue=0,this.LineValue=value},alphaTab.rendering.glyphs.TabBendRenderPoint.__name__=["alphaTab","rendering","glyphs","TabBendRenderPoint"],alphaTab.rendering.glyphs.TabBendRenderPoint.__super__=alphaTab.model.BendPoint,alphaTab.rendering.glyphs.TabBendRenderPoint.prototype=$extend(alphaTab.model.BendPoint.prototype,{__class__:alphaTab.rendering.glyphs.TabBendRenderPoint}),alphaTab.rendering.glyphs.TabBrushGlyph=$hx_exports.alphaTab.rendering.glyphs.TabBrushGlyph=function(beat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._beat=null,this._beat=beat},alphaTab.rendering.glyphs.TabBrushGlyph.__name__=["alphaTab","rendering","glyphs","TabBrushGlyph"],alphaTab.rendering.glyphs.TabBrushGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabBrushGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=10*this.get_Scale()},Paint:function(cx,cy,canvas){var tabBarRenderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer),res=this.Renderer.get_Resources(),startY=cy+this.X+(tabBarRenderer.GetNoteY(this._beat.MaxNote,!1)-res.TablatureFont.Size/2),endY=cy+this.Y+tabBarRenderer.GetNoteY(this._beat.MinNote,!1)+res.TablatureFont.Size/2,arrowX=system.Convert.ToInt32_Single(cx+this.X+this.Width/2),arrowSize=8*this.get_Scale();if(0!=this._beat.BrushType){if(1==this._beat.BrushType||2==this._beat.BrushType){canvas.BeginPath();var this1=arrowX;canvas.MoveTo(this1,startY);var this2=arrowX;canvas.LineTo(this2,endY),canvas.Stroke()}else if(3==this._beat.BrushType){var lineStartY=startY-arrowSize,lineEndY=endY-arrowSize;canvas.BeginRotate(cx+this.X+2*this.get_Scale(),lineEndY,-90);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=Math.abs(lineEndY-lineStartY),glyph.Paint(0,0,canvas),canvas.EndRotate()}else if(4==this._beat.BrushType){var lineStartY1=startY+arrowSize,lineEndY1=endY+arrowSize;canvas.BeginRotate(cx+this.X+7*this.get_Scale(),lineStartY1,90);var glyph1=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph1.Renderer=this.Renderer,glyph1.DoLayout(),glyph1.Width=Math.abs(lineEndY1-lineStartY1),glyph1.Paint(0,0,canvas),canvas.EndRotate()}if(1==this._beat.BrushType||3==this._beat.BrushType){canvas.BeginPath();var this3=arrowX;canvas.MoveTo(this3,endY),canvas.LineTo(arrowX+arrowSize/2,endY-arrowSize),canvas.LineTo(arrowX-arrowSize/2,endY-arrowSize),canvas.ClosePath(),canvas.Fill()}else{canvas.BeginPath();var this4=arrowX;canvas.MoveTo(this4,startY),canvas.LineTo(arrowX+arrowSize/2,startY+arrowSize),canvas.LineTo(arrowX-arrowSize/2,startY+arrowSize),canvas.ClosePath(),canvas.Fill()}}},__class__:alphaTab.rendering.glyphs.TabBrushGlyph}),alphaTab.rendering.glyphs.TabClefGlyph=$hx_exports.alphaTab.rendering.glyphs.TabClefGlyph=function(x,y){alphaTab.rendering.glyphs.Glyph.call(this,x,y)},alphaTab.rendering.glyphs.TabClefGlyph.__name__=["alphaTab","rendering","glyphs","TabClefGlyph"],alphaTab.rendering.glyphs.TabClefGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabClefGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{DoLayout:function(){this.Width=28*this.get_Scale()},Paint:function(cx,cy,canvas){var scale,strings=this.Renderer.Bar.Staff.Tuning.length,correction=strings*this.get_Scale()*.5,symbol=strings<=4?57454:57453;if(strings<=4){scale=strings/4.5}else{scale=strings/6.5}canvas.FillMusicFontSymbol(cx+this.X+5*this.get_Scale(),cy+this.Y-correction,scale*this.get_Scale(),symbol)},__class__:alphaTab.rendering.glyphs.TabClefGlyph}),alphaTab.rendering.glyphs.TabNoteChordGlyph=$hx_exports.alphaTab.rendering.glyphs.TabNoteChordGlyph=function(x,y,isGrace){alphaTab.rendering.glyphs.Glyph.call(this,x,y),this._notes=null,this._isGrace=!1,this.Beat=null,this.BeamingHelper=null,this.MinStringNote=null,this.BeatEffects=null,this.NotesPerString=null,this.NoteStringWidth=0,this._isGrace=isGrace;this._notes=[];this.BeatEffects={};this.NotesPerString={}},alphaTab.rendering.glyphs.TabNoteChordGlyph.__name__=["alphaTab","rendering","glyphs","TabNoteChordGlyph"],alphaTab.rendering.glyphs.TabNoteChordGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabNoteChordGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{GetNoteX:function(note,onEnd){if(null==onEnd&&(onEnd=!0),this.NotesPerString.hasOwnProperty(note.String)){var n=this.NotesPerString[note.String],pos=this.X+n.X;return onEnd&&(pos+=n.Width),pos}return 0},GetNoteY:function(note,aboveNote){return null==aboveNote&&(aboveNote=!1),this.NotesPerString.hasOwnProperty(note.String)?this.Y+this.NotesPerString[note.String].Y+(aboveNote?-this.NotesPerString[note.String].Height/2:0):0},DoLayout:function(){for(var w=0,noteStringWidth=0,i=0,j=this._notes.length;iw&&(w=g.Width),g.NoteStringWidth>noteStringWidth&&(noteStringWidth=g.NoteStringWidth),++i}this.NoteStringWidth=noteStringWidth;for(var tabHeight=this.Renderer.get_Resources().TablatureFont.Size,effectY=this.GetNoteY(this.MinStringNote,!1)+tabHeight/2,effectSpacing=7*this.get_Scale(),this1=this.BeatEffects,beatEffectKey=$iterator(Object.keys(this1))();beatEffectKey.hasNext();){var beatEffectKey1=beatEffectKey.next(),g1=this.BeatEffects[beatEffectKey1];g1.Y=g1.Y+effectY,g1.X=g1.X+this.Width/2,g1.Renderer=this.Renderer,effectY+=effectSpacing,g1.DoLayout()}this.Width=w},AddNoteGlyph:function(noteGlyph,note){this._notes.push(noteGlyph),this.NotesPerString[note.String]=noteGlyph,(null==this.MinStringNote||note.Stringthis._startNote.Fret?(startOffsetY=sizeY,endOffsetY=-1*sizeY):(startOffsetY=-1*sizeY,endOffsetY=sizeY),startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,3),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+startOffsetY,null!=this._startNote.SlideTarget){var endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startNote.SlideTarget.Beat.Voice.Bar);null==endNoteRenderer||endNoteRenderer.Staff!=startNoteRenderer.Staff?(endX=cx+startNoteRenderer.X+this._parent.X,endY=startY):(endX=cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(this._startNote.SlideTarget.Beat,1),endY=cy+endNoteRenderer.Y+endNoteRenderer.GetNoteY(this._startNote.SlideTarget,!1)+endOffsetY)}else endX=cx+startNoteRenderer.X+this._parent.X,endY=startY;break;case 3:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+sizeY;break;case 4:endX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!1),endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),startX=endX-sizeX,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-sizeY;break;case 5:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-sizeY;break;case 6:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1),endX=startX+sizeX,endY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+sizeY;break;case 7:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)-2*sizeY,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=startY+3*sizeY,waves=!0;break;case 8:startX=cx+startNoteRenderer.X+startNoteRenderer.GetNoteX(this._startNote,!0),startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!1)+sizeY,endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._startNote.Beat,4),endY=startY-3*sizeY,waves=!0;break;default:return}if(waves){var b=endX-startX,a=endY-startY,this1=a,this2=b,this3=a/Math.sqrt(Math.pow(this1,2)+Math.pow(this2,2)),angle=js.Boot.__cast(57.29577951308238*Math.asin(this3),Float);canvas.BeginRotate(startX,startY,angle);var glyph=new alphaTab.rendering.glyphs.NoteVibratoGlyph(0,0,1,1.2);glyph.Renderer=this.Renderer,glyph.DoLayout(),glyph.Width=b,glyph.Paint(0,0,canvas),canvas.EndRotate()}else canvas.BeginPath(),canvas.MoveTo(startX,startY),canvas.LineTo(endX,endY),canvas.Stroke()},__class__:alphaTab.rendering.glyphs.TabSlideLineGlyph}),alphaTab.rendering.glyphs.TabSlurGlyph=$hx_exports.alphaTab.rendering.glyphs.TabSlurGlyph=function(startNote){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._startNote=null,this._startNote=startNote},alphaTab.rendering.glyphs.TabSlurGlyph.__name__=["alphaTab","rendering","glyphs","TabSlurGlyph"],alphaTab.rendering.glyphs.TabSlurGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabSlurGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{GetBeamDirection:function(note){return note.String>3||note.Beat.Notes.length>1&¬e.String==note.Beat.MaxStringNote.String?0:1},Paint:function(cx,cy,canvas){var slurId="tab.slur."+this._startNote.SlurOrigin.Beat.Id+"."+this._startNote.SlurOrigin.SlurDestination.Beat.Id,renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(!renderer.Staff.GetSharedLayoutData(slurId,!1)){renderer.Staff.SetSharedLayoutData(slurId,!0);var startNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),this._startNote.Beat.Voice.Bar),direction=this.GetBeamDirection(this._startNote),startX=cx+startNoteRenderer.X,startY=cy+startNoteRenderer.Y+startNoteRenderer.GetNoteY(this._startNote,!0);1==direction&&(startY+=renderer.GetTabY(1,0)),this._startNote.SlurOrigin.Id==this._startNote.Id&&(startX+=startNoteRenderer.GetBeatX(this._startNote.Beat,2));var endX,endNote=this._startNote.SlurOrigin.SlurDestination,endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endNote.Beat.Voice.Bar),endY=startY;endX=null==endNoteRenderer||startNoteRenderer.Staff!=endNoteRenderer.Staff?cx+(endNoteRenderer=startNoteRenderer.Staff.BarRenderers[startNoteRenderer.Staff.BarRenderers.length-1]).X+endNoteRenderer.Width:cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endNote.Beat,2),alphaTab.rendering.glyphs.TieGlyph.PaintTie(canvas,this.get_Scale(),startX,startY,endX,endY,1==direction,22,4),canvas.Fill()}},__class__:alphaTab.rendering.glyphs.TabSlurGlyph}),alphaTab.rendering.glyphs.TabTieGlyph=$hx_exports.alphaTab.rendering.glyphs.TabTieGlyph=function(startNote,endNote,forSlide,forEnd){null==forEnd&&(forEnd=!1),alphaTab.rendering.glyphs.TieGlyph.call(this,startNote.Beat,endNote.Beat,forEnd),this._startNote=null,this._endNote=null,this._forSlide=!1,this._startNote=startNote,this._endNote=endNote,this._forSlide=forSlide},alphaTab.rendering.glyphs.TabTieGlyph.__name__=["alphaTab","rendering","glyphs","TabTieGlyph"],alphaTab.rendering.glyphs.TabTieGlyph.__super__=alphaTab.rendering.glyphs.TieGlyph,alphaTab.rendering.glyphs.TabTieGlyph.prototype=$extend(alphaTab.rendering.glyphs.TieGlyph.prototype,{get_Offset:function(){return this._forSlide?5*this.get_Scale():0},GetBeamDirection:function(beat,noteRenderer){return this._startNote.String>3?0:1},GetStartY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this._startNote,!1)-this.get_Offset()},GetEndY:function(noteRenderer,direction){return noteRenderer.GetNoteY(this._endNote,!1)-this.get_Offset()},GetStartX:function(noteRenderer){return noteRenderer.GetNoteX(this._startNote,!0)},GetEndX:function(noteRenderer){return noteRenderer.GetNoteX(this._endNote,!1)},__class__:alphaTab.rendering.glyphs.TabTieGlyph}),alphaTab.rendering.glyphs.TabTimeSignatureGlyph=$hx_exports.alphaTab.rendering.glyphs.TabTimeSignatureGlyph=function(x,y,numerator,denominator,isCommon){alphaTab.rendering.glyphs.TimeSignatureGlyph.call(this,x,y,numerator,denominator,isCommon)},alphaTab.rendering.glyphs.TabTimeSignatureGlyph.__name__=["alphaTab","rendering","glyphs","TabTimeSignatureGlyph"],alphaTab.rendering.glyphs.TabTimeSignatureGlyph.__super__=alphaTab.rendering.glyphs.TimeSignatureGlyph,alphaTab.rendering.glyphs.TabTimeSignatureGlyph.prototype=$extend(alphaTab.rendering.glyphs.TimeSignatureGlyph.prototype,{get_CommonY:function(){return js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer).GetTabY(0,0)},get_NumeratorY:function(){var offset,renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(renderer.Bar.Staff.Tuning.length<=4){offset=.25}else{offset=1/3}return renderer.get_LineOffset()*renderer.Bar.Staff.Tuning.length*offset*this.get_Scale()},get_DenominatorY:function(){var offset,renderer=js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer);if(renderer.Bar.Staff.Tuning.length<=4){offset=.6}else{offset=.6}return renderer.get_LineOffset()*renderer.Bar.Staff.Tuning.length*offset*this.get_Scale()},get_CommonScale:function(){return 1},get_NumberScale:function(){return js.Boot.__cast(this.Renderer,alphaTab.rendering.TabBarRenderer).Bar.Staff.Tuning.length<=4?.75:1},__class__:alphaTab.rendering.glyphs.TabTimeSignatureGlyph}),alphaTab.rendering.glyphs.TabWhammyBarGlyph=$hx_exports.alphaTab.rendering.glyphs.TabWhammyBarGlyph=function(beat){alphaTab.rendering.glyphs.Glyph.call(this,0,0),this._beat=null,this._renderPoints=null,this._isSimpleDip=!1,this._beat=beat,this._renderPoints=this.CreateRenderingPoints(beat),this._isSimpleDip=!1},alphaTab.rendering.glyphs.TabWhammyBarGlyph.__name__=["alphaTab","rendering","glyphs","TabWhammyBarGlyph"],alphaTab.rendering.glyphs.TabWhammyBarGlyph.__super__=alphaTab.rendering.glyphs.Glyph,alphaTab.rendering.glyphs.TabWhammyBarGlyph.prototype=$extend(alphaTab.rendering.glyphs.Glyph.prototype,{CreateRenderingPoints:function(beat){if(1==beat.WhammyBarType)return beat.WhammyBarPoints;var renderingPoints=[];switch(beat.WhammyBarType){case 3:renderingPoints.push(new alphaTab.model.BendPoint(0,beat.WhammyBarPoints[0].Value)),renderingPoints.push(new alphaTab.model.BendPoint(30,beat.WhammyBarPoints[1].Value)),renderingPoints.push(new alphaTab.model.BendPoint(60,beat.WhammyBarPoints[beat.WhammyBarPoints.length-1].Value));break;case 2:case 4:case 5:case 6:renderingPoints.push(new alphaTab.model.BendPoint(0,beat.WhammyBarPoints[0].Value)),renderingPoints.push(new alphaTab.model.BendPoint(60,beat.WhammyBarPoints[1].Value))}return renderingPoints},DoLayout:function(){alphaTab.rendering.glyphs.Glyph.prototype.DoLayout.call(this),this._isSimpleDip=1==this.Renderer.get_Settings().DisplayMode&&3==this._beat.WhammyBarType;for(var minValue=null,maxValue=null,beat=this._beat;null!=beat&&beat.get_HasWhammyBar();)(null==minValue||minValue.Value>beat.MinWhammyPoint.Value)&&(minValue=beat.MinWhammyPoint),(null==maxValue||maxValue.Value0?Math.abs(this.GetOffset(maxValue.Value)):0;if(topOffset>0||0!=this._beat.WhammyBarPoints[0].Value||this.Renderer.get_Settings().ShowZeroOnDiveWhammy){topOffset+=2*this.Renderer.get_Resources().TablatureFont.Size}var bottomOffset=minValue.Value<0?Math.abs(this.GetOffset(minValue.Value)):0;this.Renderer.RegisterOverflowTop(topOffset+bottomOffset);topOffset>this.Renderer.Staff.GetSharedLayoutData("tab.whammy.topoffset",-1)&&this.Renderer.Staff.SetSharedLayoutData("tab.whammy.topoffset",topOffset)},GetOffset:function(value){if(0==value)return 0;var offset=6*this.get_Scale()+6*Math.log2(Math.abs(value)/2)*this.get_Scale();return value<0&&(offset=-offset),offset},Paint:function(cx,cy,canvas){var startNoteRenderer=this.Renderer,endBeat=this._beat.NextBeat,endNoteRenderer=null,endXPositionType=0;null!=endBeat&&(null==(endNoteRenderer=this.Renderer.ScoreRenderer.Layout.GetRendererForBar(this.Renderer.Staff.get_StaveId(),endBeat.Voice.Bar))||endNoteRenderer.Staff!=startNoteRenderer.Staff?(endBeat=null,endNoteRenderer=null):endNoteRenderer==startNoteRenderer||endBeat.get_HasWhammyBar()?endXPositionType=!endBeat.get_HasWhammyBar()||1==startNoteRenderer.get_Settings().DisplayMode&&3==endBeat.WhammyBarType?0:2:(endBeat=null,endNoteRenderer=null));var startX,endX;this._isSimpleDip?(startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,1)-2*this.get_Scale(),endX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,3)+2*this.get_Scale()):(startX=cx+startNoteRenderer.X+startNoteRenderer.GetBeatX(this._beat,2),endX=null==endNoteRenderer?cx+startNoteRenderer.X+startNoteRenderer.Width-2*this.get_Scale():cx+endNoteRenderer.X+endNoteRenderer.GetBeatX(endBeat,endXPositionType));var old=canvas.get_TextAlign();if(canvas.set_TextAlign(1),this._renderPoints.length>=2){var dx=(endX-startX)/60;canvas.BeginPath();for(var zeroY=cy+this.Renderer.Staff.GetSharedLayoutData("tab.whammy.topoffset",0),slurText=1==this._beat.WhammyStyle?"grad.":"",i=0,j=this._renderPoints.length-1;idashStartY;)canvas.MoveTo(x1,dashStartY),canvas.LineTo(x1,dashStartY+dashSize),dashStartY+=2*dashSize;canvas.Stroke()}else if(firstPt.Value==secondPt.Value){var dashSize1=3*this.get_Scale();if(Math.abs(x2-x1)/(2*dashSize1)<1)canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2);else for(var dashEndX=Math.max(x1,x2),dashStartX=Math.min(x1,x2);dashEndX>dashStartX;)canvas.MoveTo(dashEndX,y1),canvas.LineTo(dashEndX-dashSize1,y1),dashEndX-=2*dashSize1;canvas.Stroke()}else canvas.MoveTo(x1,y1),canvas.LineTo(x2,y2);var res=canvas.get_Resources();if(isFirst&&!this._beat.IsContinuedWhammy&&!this._isSimpleDip){var y=y1;y-=res.TablatureFont.Size+2*this.get_Scale(),this.Renderer.get_Settings().ShowZeroOnDiveWhammy&&canvas.FillText("0",x1,y),null!=slurText&&(y-=res.TablatureFont.Size+2*this.get_Scale(),canvas.FillText(slurText,x1,y))}var dV=Math.abs(secondPt.Value);if((0!=dV||this.Renderer.get_Settings().ShowZeroOnDiveWhammy&&!this._isSimpleDip)&&firstPt.Value!=secondPt.Value){var s="";if(secondPt.Value<0&&(s+="-"),dV>=4){var steps=dV/4|0;s+=Std.string(steps),dV-=4*steps}else 0==dV&&(s+="0");dV>0&&(s+=alphaTab.rendering.glyphs.TabBendGlyph.GetFractionSign(dV));var y3;this._isSimpleDip?y3=Math.min(y1,y2)-res.TablatureFont.Size-2*this.get_Scale():(y3=firstPt.Offset==secondPt.Offset?Math.min(y1,y2):y2,y3-=res.TablatureFont.Size+2*this.get_Scale(),null!=nextPt&&nextPt.Value>secondPt.Value&&(y3-=2*this.get_Scale()));var x=x2;canvas.FillText(s,x,y3)}},__class__:alphaTab.rendering.glyphs.TabWhammyBarGlyph}),alphaTab.rendering.glyphs.TempoGlyph=$hx_exports.alphaTab.rendering.glyphs.TempoGlyph=function(x,y,tempo){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y),this._tempo=0,this._tempo=tempo},alphaTab.rendering.glyphs.TempoGlyph.__name__=["alphaTab","rendering","glyphs","TempoGlyph"],alphaTab.rendering.glyphs.TempoGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.TempoGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=25*this.get_Scale()},Paint:function(cx,cy,canvas){var res=this.Renderer.get_Resources();canvas.set_Font(res.MarkerFont);canvas.FillMusicFontSymbol(cx+this.X,cy+this.Y+.8*this.Height,.75*this.get_Scale(),57813),canvas.FillText("= "+this._tempo,cx+this.X+this.Height/2,cy+this.Y+canvas.get_Font().Size/2)},__class__:alphaTab.rendering.glyphs.TempoGlyph}),alphaTab.rendering.glyphs.TextGlyph=$hx_exports.alphaTab.rendering.glyphs.TextGlyph=function(x,y,text,font,textAlign){null==textAlign&&(textAlign=0),alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y),this._lines=null,this.Font=null,this.TextAlign=0;var this2=system.Convert.ToUInt16(10);this._lines=system._CsString.CsString_Impl_.Split_CharArray(text,[this2]),this.Font=font,this.TextAlign=textAlign},alphaTab.rendering.glyphs.TextGlyph.__name__=["alphaTab","rendering","glyphs","TextGlyph"],alphaTab.rendering.glyphs.TextGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.TextGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=this.Font.Size*this._lines.length},Paint:function(cx,cy,canvas){canvas.set_Font(this.Font);for(var old=canvas.get_TextAlign(),y=cy+this.Y,line=HxOverrides.iter(this._lines);line.hasNext();){var line1=line.next();canvas.set_TextAlign(this.TextAlign),canvas.FillText(line1,cx+this.X,y),canvas.set_TextAlign(old),y+=this.Font.Size}},__class__:alphaTab.rendering.glyphs.TextGlyph}),alphaTab.rendering.glyphs.TremoloPickingGlyph=$hx_exports.alphaTab.rendering.glyphs.TremoloPickingGlyph=function(x,y,duration){alphaTab.rendering.glyphs.MusicFontGlyph.call(this,x,y,1,alphaTab.rendering.glyphs.TremoloPickingGlyph.GetSymbol(duration))},alphaTab.rendering.glyphs.TremoloPickingGlyph.__name__=["alphaTab","rendering","glyphs","TremoloPickingGlyph"],alphaTab.rendering.glyphs.TremoloPickingGlyph.GetSymbol=function(duration){switch(duration){case 8:return 57888;case 16:return 57889;case 32:return 57890;default:return-1}},alphaTab.rendering.glyphs.TremoloPickingGlyph.__super__=alphaTab.rendering.glyphs.MusicFontGlyph,alphaTab.rendering.glyphs.TremoloPickingGlyph.prototype=$extend(alphaTab.rendering.glyphs.MusicFontGlyph.prototype,{DoLayout:function(){this.Width=12*this.get_Scale()},__class__:alphaTab.rendering.glyphs.TremoloPickingGlyph}),alphaTab.rendering.glyphs.TrillGlyph=$hx_exports.alphaTab.rendering.glyphs.TrillGlyph=function(x,y){alphaTab.rendering.glyphs.EffectGlyph.call(this,x,y)},alphaTab.rendering.glyphs.TrillGlyph.__name__=["alphaTab","rendering","glyphs","TrillGlyph"],alphaTab.rendering.glyphs.TrillGlyph.__super__=alphaTab.rendering.glyphs.EffectGlyph,alphaTab.rendering.glyphs.TrillGlyph.prototype=$extend(alphaTab.rendering.glyphs.EffectGlyph.prototype,{DoLayout:function(){alphaTab.rendering.glyphs.EffectGlyph.prototype.DoLayout.call(this),this.Height=20*this.get_Scale()},Paint:function(cx,cy,canvas){var res=this.Renderer.get_Resources();canvas.set_Font(res.MarkerFont);var textw=canvas.MeasureText("tr");canvas.FillText("tr",cx+this.X,cy+this.Y+canvas.get_Font().Size/2);for(var startX=textw+3*this.get_Scale(),endX=this.Width-startX,step=11*this.get_Scale()*1.2,loops=Math.max(1,(endX-startX)/step),loopX=startX,loopY=cy+this.Y+this.Height,i=0;i0){var beatWidth=currentBeatGlyph.X-beatGlyphs[i-1].X;beatGlyphs[i-1].ScaleToWidth(beatWidth)}if(i==j-1){var beatWidth1=this.Width-beatGlyphs[beatGlyphs.length-1].X;currentBeatGlyph.ScaleToWidth(beatWidth1)}++i}},RegisterLayoutingInfo:function(info){info.UpdateVoiceSize(this.Width);for(var b=$iterator(this.BeatGlyphs)();b.hasNext();){b.next().RegisterLayoutingInfo(info)}},ApplyLayoutingInfo:function(info){for(var b=$iterator(this.BeatGlyphs)();b.hasNext();){b.next().ApplyLayoutingInfo(info)}this.ScaleToForce(Math.max(this.Renderer.get_Settings().StretchForce,info.MinStretchForce))},AddGlyph:function(g){g.X=0==this.BeatGlyphs.length?0:this.BeatGlyphs[this.BeatGlyphs.length-1].X+this.BeatGlyphs[this.BeatGlyphs.length-1].Width,g.Renderer=this.Renderer,g.DoLayout(),this.BeatGlyphs.push(js.Boot.__cast(g,alphaTab.rendering.glyphs.BeatContainerGlyph)),this.Width=g.X+g.Width},DoLayout:function(){this.MinWidth=this.Width},Paint:function(cx,cy,canvas){canvas.set_Color(0==this.Voice.Index?this.Renderer.ScoreRenderer.RenderingResources.MainGlyphColor:this.Renderer.ScoreRenderer.RenderingResources.SecondaryGlyphColor);for(var i=0,j=this.BeatGlyphs.length;ithis.VoiceSize&&(this.VoiceSize=size,this.Version++)},SetPreBeatSize:function(beat,size){(!this.PreBeatSizes.hasOwnProperty(beat.Index)||this.PreBeatSizes[beat.Index]spring.LongestDuration&&(spring.LongestDuration=duration),spring.AllDurations.push(duration);else{if((spring=new alphaTab.rendering.staves.Spring).TimePosition=start,spring.AllDurations.push(duration),this._timeSortedSprings.length>0)for(var smallestDuration=duration,previousSpring=this._timeSortedSprings[this._timeSortedSprings.length-1],prevDuration=$iterator(previousSpring.AllDurations)();prevDuration.hasNext();){var prevDuration1=prevDuration.next();previousSpring.TimePosition+prevDuration1>=start&&prevDuration10&&timeSorted[insertPos].TimePosition>start;)--insertPos;this._timeSortedSprings.splice(insertPos+1,0,spring)}return this._minTime>start&&(this._minTime=start),spring},AddBeatSpring:function(beat,preBeatSize,postBeatSize){var start=beat.get_AbsoluteDisplayStart();return this.AddSpring(start,beat.DisplayDuration,preBeatSize,postBeatSize)},Finish:function(){this.CalculateSpringConstants(),this.Version++},CalculateSpringConstants:function(){this._xMin=0;for(var springs=this.Springs,time=$iterator(Object.keys(springs))();time.hasNext();){var spring=springs[time.next()];spring.get_SpringWidth()m&&(m=r.TopOverflow),++i}return m},get_BottomOverflow:function(){for(var m=0,i=0,j=this.BarRenderers.length;im&&(m=r.BottomOverflow),++i}return m},FinalizeStaff:function(){var x=0;this.Height=0;for(var topOverflow=this.get_TopOverflow(),bottomOverflow=this.get_BottomOverflow(),i=0;i0&&(this.Height=this.Height+(this.TopSpacing+topOverflow+bottomOverflow+this.BottomSpacing))},Paint:function(cx,cy,canvas,startIndex,count){if(0!=this.Height&&0!=count)for(var i=startIndex,j=Math.min(startIndex+count,this.BarRenderers.length);i1){var toRemove=this.MasterBarsRenderers[this.MasterBarsRenderers.length-1],index=this.MasterBarsRenderers.length-1;-1!=index&&this.MasterBarsRenderers.splice(index,1);for(var w=0,i=0,j=this._allStaves.length;irealWidth&&(realWidth=s.BarRenderers[s.BarRenderers.length-1].Width),++i}return this.Width=this.Width+realWidth,realWidth},CalculateAccoladeSpacing:function(tracks){if(!this._accoladeSpacingCalculated&&0==this.Index)if(this._accoladeSpacingCalculated=!0,this.Layout.Renderer.Settings.Layout.Get("hideTrackNames",!1))this.AccoladeSpacing=0;else{var canvas=this.Layout.Renderer.Canvas,res=this.Layout.Renderer.RenderingResources.EffectFont;canvas.set_Font(res);for(var t=HxOverrides.iter(tracks);t.hasNext();){var t1=t.next(),this1=Math.max(this.AccoladeSpacing,canvas.MeasureText(t1.ShortName));this.AccoladeSpacing=js.Boot.__cast(Math.ceil(this1),Float)}this.AccoladeSpacing=this.AccoladeSpacing+20,this.Width=this.Width+this.AccoladeSpacing}},GetStaveTrackGroup:function(track){for(var i=0,j=this.Staves.length;i0&&0==startIndex){if(null!=this._firstStaffInAccolade&&null!=this._lastStaffInAccolade){var firstStart=cy+this._firstStaffInAccolade.Y+this._firstStaffInAccolade.StaveTop+this._firstStaffInAccolade.TopSpacing+this._firstStaffInAccolade.get_TopOverflow(),lastEnd=cy+this._lastStaffInAccolade.Y+this._lastStaffInAccolade.TopSpacing+this._lastStaffInAccolade.get_TopOverflow()+this._lastStaffInAccolade.StaveBottom,acooladeX=cx+this._firstStaffInAccolade.X;canvas.set_Color(res.BarSeperatorColor),canvas.BeginPath(),canvas.MoveTo(acooladeX,firstStart),canvas.LineTo(acooladeX,lastEnd),canvas.Stroke()}canvas.set_Font(res.EffectFont);for(var i1=0,j1=this.Staves.length;i10?this._firstStaffInAccolade.BarRenderers[0].TopPadding:0),visualHeight=visualBottom-visualTop,lineHeight=cy+this.Y+lastStaff.Y+lastStaff.Height-lastStaff.BottomSpacing-lastStaff.get_BottomOverflow()-(lastStaff.BarRenderers.length>0?lastStaff.BarRenderers[0].BottomPadding:0)-lineTop,realHeight=realBottom-realTop,x=this.X+this._firstStaffInAccolade.X,staveGroupBounds=new alphaTab.rendering.utils.StaveGroupBounds,_tmp=new alphaTab.rendering.utils.Bounds;_tmp.X=cx,_tmp.Y=cy+this.Y,_tmp.W=this.Width,_tmp.H=this.get_Height(),staveGroupBounds.VisualBounds=_tmp;var _tmp1=new alphaTab.rendering.utils.Bounds;_tmp1.X=cx,_tmp1.Y=cy+this.Y,_tmp1.W=this.Width,_tmp1.H=this.get_Height(),staveGroupBounds.RealBounds=_tmp1,this.Layout.Renderer.get_BoundsLookup().AddStaveGroup(staveGroupBounds);for(var masterBarBoundsLookup=[],i=0;ithis.MaxNoteValue)&&(this.MaxNoteValue=noteValue,this.MaxNoteValueBeat=note.Beat),this.GetAccidental(line,noteValue,quarterBend)},ApplyAccidentalForValue:function(relatedBeat,noteValue,quarterBend){var line=this.RegisterNoteValueLine(noteValue);return(-1==this.MinNoteValue||noteValuethis.MaxNoteValue)&&(this.MaxNoteValue=noteValue,this.MaxNoteValueBeat=relatedBeat),this.GetAccidental(line,noteValue,quarterBend)},GetAccidental:function(line,noteValue,quarterBend){var accidentalToSet=0;if(2!=this._bar.Staff.StaffKind){var ksi=this._bar.get_MasterBar().KeySignature+7,index=noteValue%12,keySignatureAccidental=ksi<7?3:2,hasNoteAccidentalForKeySignature=alphaTab.rendering.utils.AccidentalHelper.KeySignatureLookup[ksi][index],isAccidentalNote=alphaTab.rendering.utils.AccidentalHelper.AccidentalNotes[index];if(quarterBend)accidentalToSet=isAccidentalNote?keySignatureAccidental:1;else{var isAccidentalRegistered=this._registeredAccidentals.hasOwnProperty(line);if(hasNoteAccidentalForKeySignature==isAccidentalNote||isAccidentalRegistered){if(hasNoteAccidentalForKeySignature==isAccidentalNote&&isAccidentalRegistered){delete this._registeredAccidentals[line],accidentalToSet=isAccidentalNote?keySignatureAccidental:1}}else this._registeredAccidentals[line]=!0,accidentalToSet=isAccidentalNote?keySignatureAccidental:1}}if(quarterBend)switch(accidentalToSet){case 1:return 4;case 2:return 5;case 3:return 6}return accidentalToSet},RegisterNoteLine:function(n,noteValue){var steps=this.CalculateNoteLine(noteValue,n.AccidentalMode);return this._appliedScoreLines[n.Id]=steps,this._notesByValue[noteValue]=n,steps},RegisterNoteValueLine:function(noteValue){var steps=this.CalculateNoteLine(noteValue,0);return this._appliedScoreLinesByValue[noteValue]=steps,steps},CalculateNoteLine:function(noteValue,mode){var value=2==this._bar.Staff.StaffKind?alphaTab.rendering.utils.PercussionMapper.MapNoteForDisplay(noteValue):noteValue,ks=this._bar.get_MasterBar().KeySignature,clef=this._bar.Clef,index=value%12,octave=(value/12|0)-1,steps=alphaTab.rendering.utils.AccidentalHelper.OctaveSteps[clef];steps-=7*octave;var stepList=alphaTab.model.ModelUtils.KeySignatureIsSharp(ks)||alphaTab.model.ModelUtils.KeySignatureIsNatural(ks)?alphaTab.rendering.utils.AccidentalHelper.SharpNoteSteps:alphaTab.rendering.utils.AccidentalHelper.FlatNoteSteps;return stepList[index],steps-=stepList[index]},GetNoteLine:function(n){return this._appliedScoreLines[n.Id]},GetNoteLineForValue:function(rawValue,searchForNote){return null==searchForNote&&(searchForNote=!1),this._appliedScoreLinesByValue.hasOwnProperty(rawValue)?this._appliedScoreLinesByValue[rawValue]:searchForNote&&this._notesByValue.hasOwnProperty(rawValue)?this.GetNoteLine(this._notesByValue[rawValue]):0},__class__:alphaTab.rendering.utils.AccidentalHelper},alphaTab.rendering.utils.BarBounds=$hx_exports.alphaTab.rendering.utils.BarBounds=function(){this.MasterBarBounds=null,this.VisualBounds=null,this.RealBounds=null,this.Bar=null,this.Beats=null;this.Beats=[]},alphaTab.rendering.utils.BarBounds.__name__=["alphaTab","rendering","utils","BarBounds"],alphaTab.rendering.utils.BarBounds.prototype={AddBeat:function(bounds){bounds.BarBounds=this,this.Beats.push(bounds),this.MasterBarBounds.AddBeat(bounds)},FindBeatAtPos:function(x){for(var beat=null,i=0;ix)break;++i}return beat},__class__:alphaTab.rendering.utils.BarBounds},alphaTab.rendering.utils.BarHelpers=$hx_exports.alphaTab.rendering.utils.BarHelpers=function(bar){this.BeamHelpers=null,this.BeamHelperLookup=null,this.TupletHelpers=null;this.BeamHelpers=[];this.BeamHelperLookup=[];this.TupletHelpers=[];var currentBeamHelper=null,currentTupletHelper=null;if(null!=bar)for(var i=0,j=bar.Voices.length;i1):forceNewTupletHelper=!0,(currentBeamHelper=new alphaTab.rendering.utils.BeamingHelper(bar.Staff)).CheckBeat(b),this.BeamHelpers[v.Index].push(currentBeamHelper)),b.get_HasTuplet()){var previousBeat=b.PreviousBeat;null!=previousBeat&&previousBeat.Voice!=b.Voice&&(previousBeat=null),forceNewTupletHelper&&null!=currentTupletHelper&¤tTupletHelper.Finish(),null!=previousBeat&&null!=currentTupletHelper&¤tTupletHelper.Check(b)||((currentTupletHelper=new alphaTab.rendering.utils.TupletHelper(v.Index)).Check(b),this.TupletHelpers[v.Index].push(currentTupletHelper))}this.BeamHelperLookup[v.Index][b.Index]=currentBeamHelper,++k}null!=currentBeamHelper&¤tBeamHelper.Finish(),null!=currentTupletHelper&¤tTupletHelper.Finish(),currentBeamHelper=null,currentTupletHelper=null,++i}},alphaTab.rendering.utils.BarHelpers.__name__=["alphaTab","rendering","utils","BarHelpers"],alphaTab.rendering.utils.BarHelpers.prototype={GetBeamingHelperForBeat:function(beat){return this.BeamHelperLookup[beat.Voice.Index][beat.Index]},__class__:alphaTab.rendering.utils.BarHelpers},alphaTab.rendering.utils._BeamDirection={},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_=$hx_exports.alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_={},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.__name__=["alphaTab","rendering","utils","_BeamDirection","BeamDirection_Impl_"],alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.toString=function(this1){switch(this1){case 0:return"Up";case 1:return"Down"}return""},alphaTab.rendering.utils.BeamingHelper=$hx_exports.alphaTab.rendering.utils.BeamingHelper=function(staff){this._staff=null,this._beatLineXPositions=null,this.Voice=null,this.Beats=null,this.ShortestDuration=-4,this.FingeringCount=0,this.HasTuplet=!1,this.FirstMinNoteValue=0,this.FirstMaxNoteValue=0,this.LastMinNoteValue=0,this.LastMaxNoteValue=0,this.MinNoteValue=0,this.MinNoteBeat=null,this.MaxNoteValue=0,this.MaxNoteBeat=null,this.InvertBeamDirection=!1,this.IsGrace=!1,this.Direction=0,this._staff=staff;this.Beats=[];this._beatLineXPositions={},this.ShortestDuration=-4,this.MaxNoteValue=-2147483648,this.MinNoteValue=-2147483648,this.FirstMinNoteValue=-2147483648,this.FirstMaxNoteValue=-2147483648,this.LastMinNoteValue=-2147483648,this.LastMaxNoteValue=-2147483648},alphaTab.rendering.utils.BeamingHelper.__name__=["alphaTab","rendering","utils","BeamingHelper"],alphaTab.rendering.utils.BeamingHelper.CanJoin=function(b1,b2){if(null==b1||null==b2||b1.get_IsRest()||b2.get_IsRest()||b1.GraceType!=b2.GraceType||3==b1.GraceType||3==b2.GraceType)return!1;var m1=b1.Voice.Bar;if(m1!=b1.Voice.Bar)return!1;var start1=b1.PlaybackStart,start2=b2.PlaybackStart;if(!alphaTab.rendering.utils.BeamingHelper.CanJoinDuration(b1.Duration)||!alphaTab.rendering.utils.BeamingHelper.CanJoinDuration(b2.Duration))return start1==start2;var divisionLength=960;8==m1.get_MasterBar().TimeSignatureDenominator&&m1.get_MasterBar().TimeSignatureNumerator%3==0&&(divisionLength+=480);return(0|(divisionLength+start1)/divisionLength)==(0|(divisionLength+start2)/divisionLength)},alphaTab.rendering.utils.BeamingHelper.CanJoinDuration=function(d){switch(d){case 1:case 2:case 4:return!1;default:return!0}},alphaTab.rendering.utils.BeamingHelper.IsFullBarJoin=function(a,b,barIndex){return alphaTab.model.ModelUtils.GetIndex(a.Duration)-2-barIndex>0&&alphaTab.model.ModelUtils.GetIndex(b.Duration)-2-barIndex>0},alphaTab.rendering.utils.BeamingHelper.prototype={GetValue:function(n){return 2==this._staff.StaffKind?alphaTab.rendering.utils.PercussionMapper.MapNoteForDisplay(n.get_RealValue()):n.get_DisplayValue()},GetMaxValue:function(n){var value=this.GetValue(n);return 0!=n.HarmonicType&&1!=n.HarmonicType&&(value=n.get_RealValue()-this._staff.DisplayTranspositionPitch),value},GetMinValue:function(n){return this.GetValue(n)},GetBeatLineX:function(beat){if(this.HasBeatLineX(beat)){if(0==this.Direction){return system.Convert.ToInt32_Single(this._beatLineXPositions[beat.Index].Up)}return system.Convert.ToInt32_Single(this._beatLineXPositions[beat.Index].Down)}return 0},HasBeatLineX:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)},RegisterBeatLineX:function(staffId,beat,up,down){var positions=this.GetOrCreateBeatPositions(beat);positions.StaffId=staffId,positions.Up=up,positions.Down=down},GetOrCreateBeatPositions:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)?this._beatLineXPositions[beat.Index]:this._beatLineXPositions[beat.Index]=new alphaTab.rendering.utils.BeatLinePositions},Finish:function(){this.Direction=this.CalculateDirection()},CalculateDirection:function(){if(this.Voice.Index>0)return this.Invert(1);if(this.Voice.Bar.Voices.length>1)for(var v=1;vthis.FingeringCount&&(this.FingeringCount=fingeringCount),this.LastMinNoteValue=-2147483648,this.LastMaxNoteValue=-2147483648,this.CheckNote(beat.MinNote),this.CheckNote(beat.MaxNote),positions.MinNoteValue=this.LastMinNoteValue,positions.MaxNoteValue=this.LastMaxNoteValue,this.ShortestDurationthis.FirstMaxNoteValue)&&(this.FirstMaxNoteValue=value)),(-2147483648==this.LastMinNoteValue||valuethis.LastMaxNoteValue)&&(this.LastMaxNoteValue=value);var minValue=this.GetMinValue(note);(-2147483648==this.MinNoteValue||this.MinNoteValue>minValue)&&(this.MinNoteValue=minValue,this.MinNoteBeat=note.Beat);var maxValue=this.GetMaxValue(note);(-2147483648==this.MaxNoteValue||this.MaxNoteValueendY&&startY-endY>maxDistance&&(endY=startY-maxDistance),1==direction&&endY>startY&&endY-startY>maxDistance&&(startY=endY-maxDistance),0==direction&&startYmaxDistance&&(endY=startY+maxDistance),0==direction&&endYmaxDistance&&(startY=endY+maxDistance),startX==endX?startY:(endY-startY)/(endX-startX)*(xPosition-startX)+startY},IsPositionFrom:function(staffId,beat){return!this._beatLineXPositions.hasOwnProperty(beat.Index)||this._beatLineXPositions[beat.Index].StaffId==staffId},GetBeatMinValue:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)?this._beatLineXPositions[beat.Index].MinNoteValue:beat.MinNote.get_DisplayValue()},GetBeatMaxValue:function(beat){return this._beatLineXPositions.hasOwnProperty(beat.Index)?this._beatLineXPositions[beat.Index].MaxNoteValue:beat.MaxNote.get_DisplayValue()},__class__:alphaTab.rendering.utils.BeamingHelper},alphaTab.rendering.utils.BeatBounds=$hx_exports.alphaTab.rendering.utils.BeatBounds=function(){this.BarBounds=null,this.VisualBounds=null,this.RealBounds=null,this.Beat=null},alphaTab.rendering.utils.BeatBounds.__name__=["alphaTab","rendering","utils","BeatBounds"],alphaTab.rendering.utils.BeatBounds.prototype={__class__:alphaTab.rendering.utils.BeatBounds},alphaTab.rendering.utils.BeatLinePositions=$hx_exports.alphaTab.rendering.utils.BeatLinePositions=function(){this.StaffId=null,this.Up=0,this.Down=0,this.MinNoteValue=0,this.MaxNoteValue=0},alphaTab.rendering.utils.BeatLinePositions.__name__=["alphaTab","rendering","utils","BeatLinePositions"],alphaTab.rendering.utils.BeatLinePositions.prototype={__class__:alphaTab.rendering.utils.BeatLinePositions},alphaTab.rendering.utils.Bounds=$hx_exports.alphaTab.rendering.utils.Bounds=function(){this.X=0,this.Y=0,this.W=0,this.H=0},alphaTab.rendering.utils.Bounds.__name__=["alphaTab","rendering","utils","Bounds"],alphaTab.rendering.utils.Bounds.prototype={__class__:alphaTab.rendering.utils.Bounds},alphaTab.rendering.utils.BoundsLookup=$hx_exports.alphaTab.rendering.utils.BoundsLookup=function(){this._beatLookup=null,this._masterBarLookup=null,this._currentStaveGroup=null,this.StaveGroups=null,this.IsFinished=!1;this.StaveGroups=[];this._beatLookup={};this._masterBarLookup={}},alphaTab.rendering.utils.BoundsLookup.__name__=["alphaTab","rendering","utils","BoundsLookup"],alphaTab.rendering.utils.BoundsLookup.FromJson=function(json,score){for(var lookup=new alphaTab.rendering.utils.BoundsLookup,staveGroup=$iterator(json.StaveGroups)();staveGroup.hasNext();){var staveGroup1=staveGroup.next(),sg=new alphaTab.rendering.utils.StaveGroupBounds;sg.VisualBounds=staveGroup1.VisualBounds,sg.RealBounds=staveGroup1.RealBounds,lookup.AddStaveGroup(sg);for(var masterBar=$iterator(staveGroup1.Bars)();masterBar.hasNext();){var masterBar1=masterBar.next(),mb=new alphaTab.rendering.utils.MasterBarBounds;mb.Index=masterBar1.Index,mb.IsFirstOfLine=masterBar1.IsFirstOfLine,mb.LineAlignedBounds=masterBar1.LineAlignedBounds,mb.VisualBounds=masterBar1.VisualBounds,mb.RealBounds=masterBar1.RealBounds,sg.AddBar(mb);for(var bar=$iterator(masterBar1.Bars)();bar.hasNext();){var bar1=bar.next(),b=new alphaTab.rendering.utils.BarBounds;b.VisualBounds=bar1.VisualBounds,b.RealBounds=bar1.RealBounds,mb.AddBar(b);for(var beat=$iterator(bar1.Beats)();beat.hasNext();){var beat1=beat.next(),bb=new alphaTab.rendering.utils.BeatBounds;bb.VisualBounds=beat1.VisualBounds,bb.RealBounds=beat1.RealBounds,bb.Beat=score.Tracks[beat1.TrackIndex].Staves[beat1.StaffIndex].Bars[beat1.BarIndex].Voices[beat1.VoiceIndex].Beats[beat1.BeatIndex],b.AddBeat(bb)}}}}return lookup},alphaTab.rendering.utils.BoundsLookup.prototype={ToJson:function(){var json={},staveGroups=[];json.StaveGroups=staveGroups;for(var group=$iterator(this.StaveGroups)();group.hasNext();){var group1=group.next(),g={};g.VisualBounds=this.BoundsToJson(group1.VisualBounds),g.RealBounds=this.BoundsToJson(group1.RealBounds);g.Bars=[];for(var masterBar=$iterator(group1.Bars)();masterBar.hasNext();){var masterBar1=masterBar.next(),mb={};mb.LineAlignedBounds=this.BoundsToJson(masterBar1.LineAlignedBounds),mb.VisualBounds=this.BoundsToJson(masterBar1.VisualBounds),mb.RealBounds=this.BoundsToJson(masterBar1.RealBounds),mb.Index=masterBar1.Index;mb.Bars=[];for(var bar=$iterator(masterBar1.Bars)();bar.hasNext();){var bar1=bar.next(),b={};b.VisualBounds=this.BoundsToJson(bar1.VisualBounds),b.RealBounds=this.BoundsToJson(bar1.RealBounds);b.Beats=[];for(var beat=$iterator(bar1.Beats)();beat.hasNext();){var beat1=beat.next(),bb={};bb.VisualBounds=this.BoundsToJson(beat1.VisualBounds),bb.RealBounds=this.BoundsToJson(beat1.RealBounds),bb.BeatIndex=beat1.Beat.Index,bb.VoiceIndex=beat1.Beat.Voice.Index,bb.BarIndex=beat1.Beat.Voice.Bar.Index,bb.StaffIndex=beat1.Beat.Voice.Bar.Staff.Index,bb.TrackIndex=beat1.Beat.Voice.Bar.Staff.Track.Index,b.Beats.push(bb)}mb.Bars.push(b)}g.Bars.push(mb)}staveGroups.push(g)}return json},BoundsToJson:function(bounds){var json={};return json.X=bounds.X,json.Y=bounds.Y,json.W=bounds.W,json.H=bounds.H,json},Finish:function(){for(var i=0;i=group.RealBounds.Y&&y<=group.RealBounds.Y+group.RealBounds.H){staveGroupIndex=middle;break}yb.RealBounds.Y?1:a.RealBounds.Xb.RealBounds.X?1:0;var a,b})},AddBeat:function(bounds){this.StaveGroupBounds.BoundsLookup.AddBeat(bounds)},__class__:alphaTab.rendering.utils.MasterBarBounds},alphaTab.rendering.utils.PercussionMapper=$hx_exports.alphaTab.rendering.utils.PercussionMapper=function(){},alphaTab.rendering.utils.PercussionMapper.__name__=["alphaTab","rendering","utils","PercussionMapper"],alphaTab.rendering.utils.PercussionMapper.MidiFromElementVariation=function(note){return alphaTab.rendering.utils.PercussionMapper.ElementVariationToMidi[note.Element][note.Variation]},alphaTab.rendering.utils.PercussionMapper.MapNoteForDisplay=function(value){return 61==value||66==value?50:60==value||65==value?52:value>=35&&value<=36||44==value?53:41==value||64==value?55:43==value||62==value?57:45==value||63==value?59:47==value||54==value?62:48==value||56==value?64:50==value?65:42==value||46==value||value>=49&&value<=53||57==value||59==value?67:60},alphaTab.rendering.utils.PercussionMapper.prototype={__class__:alphaTab.rendering.utils.PercussionMapper},alphaTab.rendering.utils.StaveGroupBounds=$hx_exports.alphaTab.rendering.utils.StaveGroupBounds=function(){this.Index=0,this.VisualBounds=null,this.RealBounds=null,this.Bars=null,this.BoundsLookup=null;this.Bars=[],this.Index=0},alphaTab.rendering.utils.StaveGroupBounds.__name__=["alphaTab","rendering","utils","StaveGroupBounds"],alphaTab.rendering.utils.StaveGroupBounds.prototype={Finish:function(){for(var i=0;ithis.Bars[i].RealBounds.X+this.Bars[i].RealBounds.W)break;++i}return b},__class__:alphaTab.rendering.utils.StaveGroupBounds},alphaTab.rendering.utils.TupletHelper=$hx_exports.alphaTab.rendering.utils.TupletHelper=function(voice){this._isFinished=!1,this.Beats=null,this.VoiceIndex=0,this.Tuplet=0,this.VoiceIndex=voice;this.Beats=[]},alphaTab.rendering.utils.TupletHelper.__name__=["alphaTab","rendering","utils","TupletHelper"],alphaTab.rendering.utils.TupletHelper.prototype={get_IsFull:function(){return this.Beats.length==this.Tuplet},Finish:function(){this._isFinished=!0},Check:function(beat){if(0==this.Beats.length)this.Tuplet=beat.TupletNumerator;else if(beat.Voice.Index!=this.VoiceIndex||beat.TupletNumerator!=this.Tuplet||this.get_IsFull()||this._isFinished)return!1;return this.Beats.push(beat),!0},__class__:alphaTab.rendering.utils.TupletHelper},alphaTab.util.Lazy=$hx_exports.alphaTab.util.Lazy=function(factory){this._factory=null,this._created=!1,this._value=null,this._factory=factory},alphaTab.util.Lazy.__name__=["alphaTab","util","Lazy"],alphaTab.util.Lazy.prototype={get_Value:function(){return this._created||(this._value=this._factory(),this._created=!0),this._value},__class__:alphaTab.util.Lazy},alphaTab.util._LogLevel={},alphaTab.util._LogLevel.LogLevel_Impl_=$hx_exports.alphaTab.util._LogLevel.LogLevel_Impl_={},alphaTab.util._LogLevel.LogLevel_Impl_.__name__=["alphaTab","util","_LogLevel","LogLevel_Impl_"],alphaTab.util._LogLevel.LogLevel_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.util._LogLevel.LogLevel_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.util._LogLevel.LogLevel_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Debug";case 2:return"Info";case 3:return"Warning";case 4:return"Error"}return""},alphaTab.utils={},alphaTab.utils._UnionData={},alphaTab.utils._UnionData.UnionData_Impl_=$hx_exports.alphaTab.utils._UnionData.UnionData_Impl_={},alphaTab.utils._UnionData.UnionData_Impl_.__name__=["alphaTab","utils","_UnionData","UnionData_Impl_"],alphaTab.utils._UnionData.UnionData_Impl_._new=function(){return new DataView(new ArrayBuffer(8))},alphaTab.utils._UnionData.UnionData_Impl_.get_Double1=function(this1){return this1.getFloat64(0,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Float1=function(this1){return this1.getFloat32(0,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Float2=function(this1){return this1.getFloat32(4,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Int1=function(this1){return this1.getInt32(0,!0)},alphaTab.utils._UnionData.UnionData_Impl_.get_Int2=function(this1){return this1.getInt32(4,!0)},alphaTab.xml={},alphaTab.xml.XmlNode=$hx_exports.alphaTab.xml.XmlNode=function(){this.NodeType=0,this.LocalName=null,this.Value=null,this.ChildNodes=null,this.Attributes=null,this.FirstChild=null,this.FirstElement=null;this.Attributes={};this.ChildNodes=[]},alphaTab.xml.XmlNode.__name__=["alphaTab","xml","XmlNode"],alphaTab.xml.XmlNode.prototype={AddChild:function(node){this.ChildNodes.push(node),this.FirstChild=node,1==node.NodeType&&(this.FirstElement=node)},GetAttribute:function(name){return this.Attributes.hasOwnProperty(name)?this.Attributes[name]:""},GetElementsByTagName:function(name,recursive){null==recursive&&(recursive=!1);var tags=[];return this.SearchElementsByTagName(this.ChildNodes,tags,name,recursive),tags},SearchElementsByTagName:function(all,result,name,recursive){null==recursive&&(recursive=!1);for(var c=$iterator(all)();c.hasNext();){var c1=c.next();null!=c1&&1==c1.NodeType&&c1.LocalName==name&&result.push(c1),recursive&&this.SearchElementsByTagName(c1.ChildNodes,result,name,!0)}},FindChildElement:function(name){for(var c=$iterator(this.ChildNodes)();c.hasNext();){var c1=c.next();if(null!=c1&&1==c1.NodeType&&c1.LocalName==name)return c1}return null},get_InnerText:function(){if(1==this.NodeType||9==this.NodeType){for(var txt="",c=$iterator(this.ChildNodes)();c.hasNext();){var c1=c.next();txt+=Std.string(c1.get_InnerText())}return StringTools.trim(txt)}return this.Value},__class__:alphaTab.xml.XmlNode},alphaTab.xml.XmlDocument=$hx_exports.alphaTab.xml.XmlDocument=function(xml){alphaTab.xml.XmlNode.call(this),this.DocumentElement=null,this.NodeType=9,alphaTab.xml.XmlParser.Parse(xml,0,this);for(var child=$iterator(this.ChildNodes)();child.hasNext();){var child1=child.next();if(1==child1.NodeType){this.DocumentElement=child1;break}}},alphaTab.xml.XmlDocument.__name__=["alphaTab","xml","XmlDocument"],alphaTab.xml.XmlDocument.__super__=alphaTab.xml.XmlNode,alphaTab.xml.XmlDocument.prototype=$extend(alphaTab.xml.XmlNode.prototype,{__class__:alphaTab.xml.XmlDocument}),alphaTab.xml.XmlException=$hx_exports.alphaTab.xml.XmlException=function(){alphaTab.AlphaTabException.call(this),this.Xml=null,this.Pos=0},alphaTab.xml.XmlException.__name__=["alphaTab","xml","XmlException"],alphaTab.xml.XmlException.__super__=alphaTab.AlphaTabException,alphaTab.xml.XmlException.prototype=$extend(alphaTab.AlphaTabException.prototype,{XmlException:function(message,xml,pos){return this.AlphaTabException(message),this.Xml=null,this.Pos=0,this.Xml=xml,this.Pos=pos,this},__class__:alphaTab.xml.XmlException}),alphaTab.xml._XmlNodeType={},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_=$hx_exports.alphaTab.xml._XmlNodeType.XmlNodeType_Impl_={},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.__name__=["alphaTab","xml","_XmlNodeType","XmlNodeType_Impl_"],alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToBoolean_IFormatProvider=function(this1,provider){return 0!=this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToChar_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToSByte_IFormatProvider=function(this1,provider){return system.Convert.ToInt8(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToByte_IFormatProvider=function(this1,provider){return system.Convert.ToUInt8(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToInt16_IFormatProvider=function(this1,provider){return system.Convert.ToInt16(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToUInt16_IFormatProvider=function(this1,provider){return system.Convert.ToUInt16(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToInt32_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToUInt32_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToInt64_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToUInt64_IFormatProvider=function(this1,provider){return system.Convert.ToUInt32(this1)},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToSingle_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ToDouble_IFormatProvider=function(this1,provider){return this1},alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.toString=function(this1){switch(this1){case 0:return"None";case 1:return"Element";case 2:return"Attribute";case 3:return"Text";case 4:return"CDATA";case 5:return"EntityReference";case 6:return"Entity";case 7:return"ProcessingInstruction";case 8:return"Comment";case 9:return"Document";case 10:return"DocumentType";case 11:return"DocumentFragment";case 12:return"Notation";case 13:return"Whitespace";case 14:return"SignificantWhitespace";case 15:return"EndElement";case 16:return"EndEntity";case 17:return"XmlDeclaration"}return""},alphaTab.xml.XmlParser=$hx_exports.alphaTab.xml.XmlParser=function(){},alphaTab.xml.XmlParser.__name__=["alphaTab","xml","XmlParser"],alphaTab.xml.XmlParser.Parse=function(str,p,parent){for(var c=system.Convert.ToUInt16(HxOverrides.cca(str,p)),state=1,next=1,start=0,buf="",escapeNext=1,xml=null,aname=null,nbrackets=0,attrValQuote=0;p";throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException(tmp3,str,p))}state=0,next=12;continue}break;case 11:if(62!=c)throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException("Expected >",str,p));state=1;break;case 12:if(62==c)return p;throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException("Expected >",str,p));case 13:if(60==c){buf+=Std.string(HxOverrides.substr(str,start,p-start));var child=new alphaTab.xml.XmlNode;child.NodeType=3,child.Value=buf;buf="",parent.AddChild(child),state=0,next=2}else 38==c&&(buf+=Std.string(HxOverrides.substr(str,start,p-start)),state=18,escapeNext=13,start=p+1);break;case 14:var tmp4;if(63==c){tmp4=62==system.Convert.ToUInt16(HxOverrides.cca(str,p+1))}else tmp4=!1;tmp4&&(++p,state=1);break;case 15:var tmp5,tmp6;if(45==c){tmp6=45==system.Convert.ToUInt16(HxOverrides.cca(str,p+1))}else tmp6=!1;if(tmp6){tmp5=62==system.Convert.ToUInt16(HxOverrides.cca(str,p+2))}else tmp5=!1;tmp5&&(p+=2,state=1);break;case 16:if(91==c)++nbrackets;else if(93==c)--nbrackets;else if(62==c&&0==nbrackets){var node=new alphaTab.xml.XmlNode;node.NodeType=10,node.Value=HxOverrides.substr(str,start,p-start),parent.AddChild(node),state=1}break;case 17:var tmp7,tmp8;if(93==c){tmp8=93==system.Convert.ToUInt16(HxOverrides.cca(str,p+1))}else tmp8=!1;if(tmp8){tmp7=62==system.Convert.ToUInt16(HxOverrides.cca(str,p+2))}else tmp7=!1;if(tmp7){var child1=new alphaTab.xml.XmlNode;child1.NodeType=4,child1.Value=HxOverrides.substr(str,start,p-start),parent.AddChild(child1),p+=2,state=1}break;case 18:if(c==system.Convert.ToUInt16(59)){var s=HxOverrides.substr(str,start,p-start);if(35==system.Convert.ToUInt16(HxOverrides.cca(s,0))){var code;code=120==system.Convert.ToUInt16(HxOverrides.cca(s,1))?alphaTab.platform.Platform.ParseInt("0"+HxOverrides.substr(s,1,s.length-1)):alphaTab.platform.Platform.ParseInt(HxOverrides.substr(s,1,s.length-1)),buf+=String.fromCharCode(code)}else alphaTab.xml.XmlParser.Escapes.hasOwnProperty(s)?buf+=Std.string(alphaTab.xml.XmlParser.Escapes[s]):buf+=Std.string("&"+s+";");start=p+1,state=escapeNext}else alphaTab.xml.XmlParser.IsValidChar(c)||35==c||(buf+=Std.string("&"),buf+=Std.string(HxOverrides.substr(str,start,p-start)),start=--p+1,state=escapeNext)}++p}if(1==state&&(start=p,state=13),13==state){if(p!=start){buf+=Std.string(HxOverrides.substr(str,start,p-start));var node1=new alphaTab.xml.XmlNode;node1.NodeType=3,node1.Value=buf,parent.AddChild(node1)}return p}if(18==state&&13==escapeNext){buf+=Std.string("&"),buf+=Std.string(HxOverrides.substr(str,start,p-start));var node2=new alphaTab.xml.XmlNode;return node2.NodeType=3,node2.Value=buf,parent.AddChild(node2),p}throw new js._Boot.HaxeError((new alphaTab.xml.XmlException).XmlException("Unexpected end",str,p))},alphaTab.xml.XmlParser.IsValidChar=function(c){return c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||58==c||46==c||95==c||45==c},alphaTab.xml.XmlParser.prototype={__class__:alphaTab.xml.XmlParser},alphaTab.xml.XmlParser_XmlState=$hx_exports.alphaTab.xml.XmlParser_XmlState=function(){},alphaTab.xml.XmlParser_XmlState.__name__=["alphaTab","xml","XmlParser_XmlState"],alphaTab.xml.XmlParser_XmlState.prototype={__class__:alphaTab.xml.XmlParser_XmlState},haxe.IMap=function(){},haxe.IMap.__name__=["haxe","IMap"],haxe._Int64={},haxe._Int64.___Int64=function(high,low){this.high=high,this.low=low},haxe._Int64.___Int64.__name__=["haxe","_Int64","___Int64"],haxe._Int64.___Int64.prototype={__class__:haxe._Int64.___Int64},haxe.crypto={},haxe.crypto.Adler32=function(){this.a1=1,this.a2=0},haxe.crypto.Adler32.__name__=["haxe","crypto","Adler32"];haxe.crypto.Adler32.read=function(i){var a=new haxe.crypto.Adler32,a2a=i.readByte(),a2b=i.readByte(),a1a=i.readByte(),a1b=i.readByte();return a.a1=a1a<<8|a1b,a.a2=a2a<<8|a2b,a},haxe.crypto.Adler32.prototype={update:function(b,pos,len){for(var a1=this.a1,a2=this.a2,_g1=pos,_g=pos+len;_g1<_g;){var p=_g1++;a2=(a2+(a1=(a1+b.b[p])%65521))%65521}this.a1=a1,this.a2=a2},equals:function(a){return a.a1==this.a1&&a.a2==this.a2},__class__:haxe.crypto.Adler32},haxe.ds={},haxe.ds.IntMap=function(){this.h={}},haxe.ds.IntMap.__name__=["haxe","ds","IntMap"],haxe.ds.IntMap.__interfaces__=[haxe.IMap],haxe.ds.IntMap.prototype={__class__:haxe.ds.IntMap},haxe.io.Bytes=function(data){this.length=data.byteLength,this.b=new Uint8Array(data),this.b.bufferValue=data,data.hxBytes=this,data.bytes=this.b},haxe.io.Bytes.__name__=["haxe","io","Bytes"],haxe.io.Bytes.prototype={blit:function(pos,src,srcpos,len){if(pos<0||srcpos<0||len<0||pos+len>this.length||srcpos+len>src.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);0==srcpos&&len==src.b.byteLength?this.b.set(src.b,pos):this.b.set(src.b.subarray(srcpos,srcpos+len),pos)},getString:function(pos,len){if(pos<0||len<0||pos+len>this.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);for(var s="",b=this.b,fcc=String.fromCharCode,i=pos,max=pos+len;i>10)),s+=fcc(1023&u|56320)}}return s},toString:function(){return this.getString(0,this.length)},__class__:haxe.io.Bytes},haxe.io.BytesBuffer=function(){this.b=[]},haxe.io.BytesBuffer.__name__=["haxe","io","BytesBuffer"],haxe.io.BytesBuffer.prototype={getBytes:function(){var bytes=new haxe.io.Bytes(new Uint8Array(this.b).buffer);return this.b=null,bytes},__class__:haxe.io.BytesBuffer},haxe.io.Eof=function(){},haxe.io.Eof.__name__=["haxe","io","Eof"],haxe.io.Eof.prototype={toString:function(){return"Eof"},__class__:haxe.io.Eof},haxe.io.Error={__ename__:!0,__constructs__:["Blocked","Overflow","OutsideBounds","Custom"]},haxe.io.Error.Blocked=["Blocked",0],haxe.io.Error.Blocked.toString=$estr,haxe.io.Error.Blocked.__enum__=haxe.io.Error,haxe.io.Error.Overflow=["Overflow",1],haxe.io.Error.Overflow.toString=$estr,haxe.io.Error.Overflow.__enum__=haxe.io.Error,haxe.io.Error.OutsideBounds=["OutsideBounds",2],haxe.io.Error.OutsideBounds.toString=$estr,haxe.io.Error.OutsideBounds.__enum__=haxe.io.Error,haxe.io.Error.Custom=function(e){var $x=["Custom",3,e];return $x.__enum__=haxe.io.Error,$x.toString=$estr,$x},haxe.io.FPHelper=function(){},haxe.io.FPHelper.__name__=["haxe","io","FPHelper"],haxe.io.FPHelper.i32ToFloat=function(i){var exp=i>>>23&255,sig=8388607&i;return 0==sig&&0==exp?0:(1-(i>>>31<<1))*(1+Math.pow(2,-23)*sig)*Math.pow(2,exp-127)},haxe.io.FPHelper.floatToI32=function(f){if(0==f)return 0;var af=f<0?-f:f,exp=Math.floor(Math.log(af)/.6931471805599453);exp<-127?exp=-127:exp>128&&(exp=128);var sig=Math.round(8388608*(af/Math.pow(2,exp)-1));return 8388608==sig&&exp<128&&(sig=0,++exp),(f<0?-2147483648:0)|exp+127<<23|sig},haxe.io.FPHelper.i64ToDouble=function(low,high){var exp=(high>>20&2047)-1023,sig=4294967296*(1048575&high)+2147483648*(low>>>31)+(2147483647&low);return 0==sig&&-1023==exp?0:(1-(high>>>31<<1))*(1+Math.pow(2,-52)*sig)*Math.pow(2,exp)},haxe.io.FPHelper.doubleToI64=function(v){var i64=haxe.io.FPHelper.i64tmp;if(0==v)i64.low=0,i64.high=0;else if(isFinite(v)){var av=v<0?-v:v,exp=Math.floor(Math.log(av)/.6931471805599453),sig=Math.round(4503599627370496*(av/Math.pow(2,exp)-1)),sig_l=0|sig,sig_h=sig/4294967296|0;i64.low=sig_l,i64.high=(v<0?-2147483648:0)|exp+1023<<20|sig_h}else v>0?(i64.low=0,i64.high=2146435072):(i64.low=0,i64.high=-1048576);return i64},haxe.zip={},haxe.zip.ExtraField={__ename__:!0,__constructs__:["FUnknown","FInfoZipUnicodePath","FUtf8"]},haxe.zip.ExtraField.FUnknown=function(tag,bytes){var $x=["FUnknown",0,tag,bytes];return $x.__enum__=haxe.zip.ExtraField,$x.toString=$estr,$x},haxe.zip.ExtraField.FInfoZipUnicodePath=function(name,crc){var $x=["FInfoZipUnicodePath",1,name,crc];return $x.__enum__=haxe.zip.ExtraField,$x.toString=$estr,$x},haxe.zip.ExtraField.FUtf8=["FUtf8",2],haxe.zip.ExtraField.FUtf8.toString=$estr,haxe.zip.ExtraField.FUtf8.__enum__=haxe.zip.ExtraField,haxe.zip.Huffman={__ename__:!0,__constructs__:["Found","NeedBit","NeedBits"]},haxe.zip.Huffman.Found=function(i){var $x=["Found",0,i];return $x.__enum__=haxe.zip.Huffman,$x.toString=$estr,$x},haxe.zip.Huffman.NeedBit=function(left,right){var $x=["NeedBit",1,left,right];return $x.__enum__=haxe.zip.Huffman,$x.toString=$estr,$x},haxe.zip.Huffman.NeedBits=function(n,table){var $x=["NeedBits",2,n,table];return $x.__enum__=haxe.zip.Huffman,$x.toString=$estr,$x},haxe.zip.HuffTools=function(){},haxe.zip.HuffTools.__name__=["haxe","zip","HuffTools"],haxe.zip.HuffTools.prototype={treeDepth:function(t){switch(t[1]){case 0:return 0;case 1:var b=t[3],a=t[2],da=this.treeDepth(a),db=this.treeDepth(b);return 1+(da0?(this.treeWalk(table,p,cd+1,d-1,a),this.treeWalk(table,p|1<maxbits)throw new js._Boot.HaxeError("Invalid huffman");var idx=v<<5|len;return bits.h.hasOwnProperty(idx)?haxe.zip.Huffman.Found(bits.h[idx]):(v<<=1,++len,haxe.zip.Huffman.NeedBit(this.treeMake(bits,maxbits,v,len),this.treeMake(bits,maxbits,1|v,len)))},make:function(lengths,pos,nlengths,maxbits){var counts=[],tmp=[];if(maxbits>32)throw new js._Boot.HaxeError("Invalid huffman");for(var _g1=0,_g=maxbits;_g1<_g;){_g1++;counts.push(0),tmp.push(0)}for(var _g11=0,_g2=nlengths;_g11<_g2;){var p=lengths[_g11+++pos];if(p>=maxbits)throw new js._Boot.HaxeError("Invalid huffman");counts[p]++}for(var code=0,_g12=1,_g3=maxbits-1;_g12<_g3;){var i2=_g12++;code=code+counts[i2]<<1,tmp[i2]=code}for(var bits=new haxe.ds.IntMap,_g13=0,_g4=nlengths;_g13<_g4;){var i3=_g13++,l=lengths[i3+pos];if(0!=l){var n=tmp[l-1];tmp[l-1]=n+1,bits.h[n<<5|l]=i3}}return this.treeCompress(haxe.zip.Huffman.NeedBit(this.treeMake(bits,maxbits,0,1),this.treeMake(bits,maxbits,1,1)))},__class__:haxe.zip.HuffTools},haxe.zip._InflateImpl={},haxe.zip._InflateImpl.Window=function(hasCrc){this.buffer=new haxe.io.Bytes(new ArrayBuffer(65536)),this.pos=0,hasCrc&&(this.crc=new haxe.crypto.Adler32)},haxe.zip._InflateImpl.Window.__name__=["haxe","zip","_InflateImpl","Window"],haxe.zip._InflateImpl.Window.prototype={slide:function(){null!=this.crc&&this.crc.update(this.buffer,0,32768);var b=new haxe.io.Bytes(new ArrayBuffer(65536));this.pos-=32768,b.blit(0,this.buffer,32768,this.pos),this.buffer=b},addBytes:function(b,p,len){this.pos+len>65536&&this.slide(),this.buffer.blit(this.pos,b,p,len),this.pos+=len},addByte:function(c){65536==this.pos&&this.slide(),this.buffer.b[this.pos]=255&c,this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){return null!=this.crc&&this.crc.update(this.buffer,0,this.pos),this.crc},__class__:haxe.zip._InflateImpl.Window},haxe.zip._InflateImpl.State={__ename__:!0,__constructs__:["Head","Block","CData","Flat","Crc","Dist","DistOne","Done"]},haxe.zip._InflateImpl.State.Head=["Head",0],haxe.zip._InflateImpl.State.Head.toString=$estr,haxe.zip._InflateImpl.State.Head.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Block=["Block",1],haxe.zip._InflateImpl.State.Block.toString=$estr,haxe.zip._InflateImpl.State.Block.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.CData=["CData",2],haxe.zip._InflateImpl.State.CData.toString=$estr,haxe.zip._InflateImpl.State.CData.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Flat=["Flat",3],haxe.zip._InflateImpl.State.Flat.toString=$estr,haxe.zip._InflateImpl.State.Flat.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Crc=["Crc",4],haxe.zip._InflateImpl.State.Crc.toString=$estr,haxe.zip._InflateImpl.State.Crc.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Dist=["Dist",5],haxe.zip._InflateImpl.State.Dist.toString=$estr,haxe.zip._InflateImpl.State.Dist.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.DistOne=["DistOne",6],haxe.zip._InflateImpl.State.DistOne.toString=$estr,haxe.zip._InflateImpl.State.DistOne.__enum__=haxe.zip._InflateImpl.State,haxe.zip._InflateImpl.State.Done=["Done",7],haxe.zip._InflateImpl.State.Done.toString=$estr,haxe.zip._InflateImpl.State.Done.__enum__=haxe.zip._InflateImpl.State,haxe.zip.InflateImpl=function(i,header,crc){null==crc&&(crc=!0),null==header&&(header=!0),this.final=!1,this.htools=new haxe.zip.HuffTools,this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.len=0,this.dist=0,this.state=header?haxe.zip._InflateImpl.State.Head:haxe.zip._InflateImpl.State.Block,this.input=i,this.bits=0,this.nbits=0,this.needed=0,this.output=null,this.outpos=0,this.lengths=[];for(var _g=0;_g<19;){_g++;this.lengths.push(-1)}this.window=new haxe.zip._InflateImpl.Window(crc)},haxe.zip.InflateImpl.__name__=["haxe","zip","InflateImpl"],haxe.zip.InflateImpl.prototype={buildFixedHuffman:function(){if(null!=haxe.zip.InflateImpl.FIXED_HUFFMAN)return haxe.zip.InflateImpl.FIXED_HUFFMAN;for(var a=[],_g=0;_g<288;){var n=_g++;a.push(n<=143?8:n<=255?9:n<=279?7:8)}return haxe.zip.InflateImpl.FIXED_HUFFMAN=this.htools.make(a,0,288,10),haxe.zip.InflateImpl.FIXED_HUFFMAN},readBytes:function(b,pos,len){if(this.needed=len,this.outpos=pos,this.output=b,len>0)for(;this.inflateLoop(););return len-this.needed},getBits:function(n){for(;this.nbits>=n,b},getBit:function(){0==this.nbits&&(this.nbits=8,this.bits=this.input.readByte());var b=1==(1&this.bits);return this.nbits--,this.bits>>=1,b},getRevBits:function(n){return 0==n?0:this.getBit()?1<max)throw new js._Boot.HaxeError("Invalid data");for(;imax)throw new js._Boot.HaxeError("Invalid data");break;case 18:if((i+=11+this.getBits(7))>max)throw new js._Boot.HaxeError("Invalid data");break;default:throw new js._Boot.HaxeError("Invalid data")}}},inflateLoop:function(){switch(this.state[1]){case 0:var cmf=this.input.readByte();if(8!=(15&cmf))throw new js._Boot.HaxeError("Invalid data");var flg=this.input.readByte(),fdict=0!=(32&flg);if(((cmf<<8)+flg)%31!=0)throw new js._Boot.HaxeError("Invalid data");if(fdict)throw new js._Boot.HaxeError("Unsupported dictionary");return this.state=haxe.zip._InflateImpl.State.Block,!0;case 1:this.final=this.getBit();switch(this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw new js._Boot.HaxeError("Invalid data");this.state=haxe.zip._InflateImpl.State.Flat;var r=this.inflateLoop();return this.resetBits(),r;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=haxe.zip._InflateImpl.State.CData,!0;case 2:for(var hlit=this.getBits(5)+257,hdist=this.getBits(5)+1,hclen=this.getBits(4)+4,_g11=0,_g2=hclen;_g11<_g2;){var i=_g11++;this.lengths[haxe.zip.InflateImpl.CODE_LENGTHS_POS[i]]=this.getBits(3)}for(var _g3=hclen;_g3<19;){var i1=_g3++;this.lengths[haxe.zip.InflateImpl.CODE_LENGTHS_POS[i1]]=0}this.huffman=this.htools.make(this.lengths,0,19,8);for(var lengths=[],_g12=0,_g4=hlit+hdist;_g12<_g4;){_g12++;lengths.push(0)}return this.inflateLengths(lengths,hlit+hdist),this.huffdist=this.htools.make(lengths,hlit,hdist,16),this.huffman=this.htools.make(lengths,0,hlit,16),this.state=haxe.zip._InflateImpl.State.CData,!0;default:throw new js._Boot.HaxeError("Invalid data")}break;case 2:var n=this.applyHuffman(this.huffman);if(n<256)return this.addByte(n),this.needed>0;if(256==n)return this.state=this.final?haxe.zip._InflateImpl.State.Crc:haxe.zip._InflateImpl.State.Block,!0;n-=257;var extra_bits=haxe.zip.InflateImpl.LEN_EXTRA_BITS_TBL[n];if(-1==extra_bits)throw new js._Boot.HaxeError("Invalid data");this.len=haxe.zip.InflateImpl.LEN_BASE_VAL_TBL[n]+this.getBits(extra_bits);var dist_code=null==this.huffdist?this.getRevBits(5):this.applyHuffman(this.huffdist);if(-1==(extra_bits=haxe.zip.InflateImpl.DIST_EXTRA_BITS_TBL[dist_code]))throw new js._Boot.HaxeError("Invalid data");if(this.dist=haxe.zip.InflateImpl.DIST_BASE_VAL_TBL[dist_code]+this.getBits(extra_bits),this.dist>this.window.available())throw new js._Boot.HaxeError("Invalid data");return this.state=1==this.dist?haxe.zip._InflateImpl.State.DistOne:haxe.zip._InflateImpl.State.Dist,!0;case 3:var rlen=this.len0;case 4:var calc=this.window.checksum();if(null==calc)return this.state=haxe.zip._InflateImpl.State.Done,!0;var crc=haxe.crypto.Adler32.read(this.input);if(!calc.equals(crc))throw new js._Boot.HaxeError("Invalid CRC");return this.state=haxe.zip._InflateImpl.State.Done,!0;case 5:for(;this.len>0&&this.needed>0;){var rdist=this.len0;case 6:var rlen2=this.len0;case 7:return!1}},__class__:haxe.zip.InflateImpl},haxe.zip.Reader=function(i){this.i=i},haxe.zip.Reader.__name__=["haxe","zip","Reader"],haxe.zip.Reader.prototype={readZipDate:function(){var t=this.i.readUInt16(),hour=t>>11&31,min=t>>5&63,sec=31&t,d=this.i.readUInt16();return new Date((d>>9)+1980,(d>>5&15)-1,31&d,hour,min,sec<<1)},readExtraFields:function(length){for(var fields=new List;length>0;){if(length<4)throw new js._Boot.HaxeError("Invalid extra fields data");var tag=this.i.readUInt16(),len=this.i.readUInt16();if(lengthtmp.length)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);out.b;for(var b2=tmp.b,_g1=0,_g=n;_g1<_g;){var i=_g1++;out.b.push(b2[i])}if(n<65536)break}e.data=out.getBytes()}else e.data=this.i.read(e.dataSize);e.crc32=this.i.readInt32(),134695760==e.crc32&&(e.crc32=this.i.readInt32()),e.dataSize=this.i.readInt32(),e.fileSize=this.i.readInt32(),e.dataSize=e.fileSize,e.compressed=!1}else e.data=this.i.read(e.dataSize);l.add(e)}return l},__class__:haxe.zip.Reader},js._Boot={},js._Boot.HaxeError=function(val){Error.call(this),this.val=val,this.message=String(val),Error.captureStackTrace&&Error.captureStackTrace(this,js._Boot.HaxeError)},js._Boot.HaxeError.__name__=["js","_Boot","HaxeError"],js._Boot.HaxeError.wrap=function(val){return val instanceof Error?val:new js._Boot.HaxeError(val)},js._Boot.HaxeError.__super__=Error,js._Boot.HaxeError.prototype=$extend(Error.prototype,{__class__:js._Boot.HaxeError}),js.html={},js.html.compat={},js.html.compat.ArrayBuffer=function(a){if(a instanceof Array&&null==a.__enum__)this.a=a,this.byteLength=a.length;else{var len=a;this.a=[];for(var _g1=0,_g=len;_g1<_g;){var i=_g1++;this.a[i]=0}this.byteLength=len}},js.html.compat.ArrayBuffer.__name__=["js","html","compat","ArrayBuffer"],js.html.compat.ArrayBuffer.sliceImpl=function(begin,end){var u=new Uint8Array(this,begin,null==end?null:end-begin),result=new ArrayBuffer(u.byteLength);return new Uint8Array(result).set(u),result},js.html.compat.ArrayBuffer.prototype={slice:function(begin,end){return new js.html.compat.ArrayBuffer(this.a.slice(begin,end))},__class__:js.html.compat.ArrayBuffer},js.html.compat.DataView=function(buffer,byteOffset,byteLength){if(this.buf=buffer,this.offset=null==byteOffset?0:byteOffset,this.length=null==byteLength?buffer.byteLength-this.offset:byteLength,this.offset<0||this.length<0||this.offset+this.length>buffer.byteLength)throw new js._Boot.HaxeError(haxe.io.Error.OutsideBounds);this.byteLength=this.length,this.byteOffset=this.offset,this.buffer=this.buf},js.html.compat.DataView.__name__=["js","html","compat","DataView"],js.html.compat.DataView.prototype={getInt8:function(byteOffset){var v=this.buf.a[this.offset+byteOffset];return v>=128?v-256:v},getUint8:function(byteOffset){return this.buf.a[this.offset+byteOffset]},getInt16:function(byteOffset,littleEndian){var v=this.getUint16(byteOffset,littleEndian);return v>=32768?v-65536:v},getUint16:function(byteOffset,littleEndian){return littleEndian?this.buf.a[this.offset+byteOffset]|this.buf.a[this.offset+byteOffset+1]<<8:this.buf.a[this.offset+byteOffset]<<8|this.buf.a[this.offset+byteOffset+1]},getInt32:function(byteOffset,littleEndian){var p=this.offset+byteOffset,a=this.buf.a[p++],b=this.buf.a[p++],c=this.buf.a[p++],d=this.buf.a[p++];return littleEndian?a|b<<8|c<<16|d<<24:d|c<<8|b<<16|a<<24},getUint32:function(byteOffset,littleEndian){var v=this.getInt32(byteOffset,littleEndian);return v<0?v+4294967296:v},getFloat32:function(byteOffset,littleEndian){return haxe.io.FPHelper.i32ToFloat(this.getInt32(byteOffset,littleEndian))},getFloat64:function(byteOffset,littleEndian){var a=this.getInt32(byteOffset,littleEndian),b=this.getInt32(byteOffset+4,littleEndian);return haxe.io.FPHelper.i64ToDouble(littleEndian?a:b,littleEndian?b:a)},setInt8:function(byteOffset,value){this.buf.a[byteOffset+this.offset]=value<0?value+128&255:255&value},setUint8:function(byteOffset,value){this.buf.a[byteOffset+this.offset]=255&value},setInt16:function(byteOffset,value,littleEndian){this.setUint16(byteOffset,value<0?value+65536:value,littleEndian)},setUint16:function(byteOffset,value,littleEndian){var p=byteOffset+this.offset;littleEndian?(this.buf.a[p]=255&value,this.buf.a[p++]=value>>8&255):(this.buf.a[p++]=value>>8&255,this.buf.a[p]=255&value)},setInt32:function(byteOffset,value,littleEndian){this.setUint32(byteOffset,value,littleEndian)},setUint32:function(byteOffset,value,littleEndian){var p=byteOffset+this.offset;littleEndian?(this.buf.a[p++]=255&value,this.buf.a[p++]=value>>8&255,this.buf.a[p++]=value>>16&255,this.buf.a[p++]=value>>>24):(this.buf.a[p++]=value>>>24,this.buf.a[p++]=value>>16&255,this.buf.a[p++]=value>>8&255,this.buf.a[p++]=255&value)},setFloat32:function(byteOffset,value,littleEndian){this.setUint32(byteOffset,haxe.io.FPHelper.floatToI32(value),littleEndian)},setFloat64:function(byteOffset,value,littleEndian){var i64=haxe.io.FPHelper.doubleToI64(value);littleEndian?(this.setUint32(byteOffset,i64.low),this.setUint32(byteOffset,i64.high)):(this.setUint32(byteOffset,i64.high),this.setUint32(byteOffset,i64.low))},__class__:js.html.compat.DataView},js.html.compat.Float32Array=function(){},js.html.compat.Float32Array.__name__=["js","html","compat","Float32Array"],js.html.compat.Float32Array._new=function(arg1,offset,length){var arr;if("number"==typeof arg1){arr=[];for(var _g1=0,_g=arg1;_g1<_g;){arr[_g1++]=0}arr.byteLength=arr.length<<2,arr.byteOffset=0;for(var _g2=[],_g21=0,_g11=arr.length<<2;_g21<_g11;){_g21++;_g2.push(0)}arr.buffer=new js.html.compat.ArrayBuffer(_g2)}else if(js.Boot.__instanceof(arg1,js.html.compat.ArrayBuffer)){var buffer=arg1;null==offset&&(offset=0),null==length&&(length=buffer.byteLength-offset>>2),arr=[];for(var _g12=0,_g3=length;_g12<_g3;){_g12++;var val=buffer.a[offset++]|buffer.a[offset++]<<8|buffer.a[offset++]<<16|buffer.a[offset++]<<24;arr.push(haxe.io.FPHelper.i32ToFloat(val))}arr.byteLength=arr.length<<2,arr.byteOffset=offset,arr.buffer=buffer}else{if(!(arg1 instanceof Array&&null==arg1.__enum__))throw new js._Boot.HaxeError("TODO "+Std.string(arg1));arr=arg1.slice();for(var buffer1=[],_g4=0;_g4>8&255),buffer1.push(i3>>16&255),buffer1.push(i3>>>24)}arr.byteLength=arr.length<<2,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(buffer1)}return arr.subarray=js.html.compat.Float32Array._subarray,arr.set=js.html.compat.Float32Array._set,arr},js.html.compat.Float32Array._set=function(arg,offset){if(js.Boot.__instanceof(arg.buffer,js.html.compat.ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g1=0,_g=arg.byteLength;_g1<_g;){var i=_g1++;this[i+offset]=a[i]}}else{if(!(arg instanceof Array&&null==arg.__enum__))throw new js._Boot.HaxeError("TODO");var a1=arg;if(a1.length+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g11=0,_g2=a1.length;_g11<_g2;){var i1=_g11++;this[i1+offset]=a1[i1]}}},js.html.compat.Float32Array._subarray=function(start,end){var a=js.html.compat.Float32Array._new(this.slice(start,end));return a.byteOffset=4*start,a},js.html.compat.Float64Array=function(){},js.html.compat.Float64Array.__name__=["js","html","compat","Float64Array"],js.html.compat.Float64Array._new=function(arg1,offset,length){var arr;if("number"==typeof arg1){arr=[];for(var _g1=0,_g=arg1;_g1<_g;){arr[_g1++]=0}arr.byteLength=arr.length<<3,arr.byteOffset=0;for(var _g2=[],_g21=0,_g11=arr.length<<3;_g21<_g11;){_g21++;_g2.push(0)}arr.buffer=new js.html.compat.ArrayBuffer(_g2)}else if(js.Boot.__instanceof(arg1,js.html.compat.ArrayBuffer)){var buffer=arg1;null==offset&&(offset=0),null==length&&(length=buffer.byteLength-offset>>3),arr=[];for(var _g12=0,_g3=length;_g12<_g3;){_g12++;var val1=buffer.a[offset++]|buffer.a[offset++]<<8|buffer.a[offset++]<<16|buffer.a[offset++]<<24,val2=buffer.a[offset++]|buffer.a[offset++]<<8|buffer.a[offset++]<<16|buffer.a[offset++]<<24;arr.push(haxe.io.FPHelper.i64ToDouble(val1,val2))}arr.byteLength=arr.length<<3,arr.byteOffset=offset,arr.buffer=buffer}else{if(!(arg1 instanceof Array&&null==arg1.__enum__))throw new js._Boot.HaxeError("TODO "+Std.string(arg1));arr=arg1.slice();for(var buffer1=[],_g4=0;_g4>8&255),buffer1.push(i3>>16&255),buffer1.push(i3>>>24);var i4=v.high;buffer1.push(255&i4),buffer1.push(i4>>8&255),buffer1.push(i4>>16&255),buffer1.push(i4>>>24)}arr.byteLength=arr.length<<3,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(buffer1)}return arr.subarray=js.html.compat.Float64Array._subarray,arr.set=js.html.compat.Float64Array._set,arr},js.html.compat.Float64Array._set=function(arg,offset){if(js.Boot.__instanceof(arg.buffer,js.html.compat.ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g1=0,_g=arg.byteLength;_g1<_g;){var i=_g1++;this[i+offset]=a[i]}}else{if(!(arg instanceof Array&&null==arg.__enum__))throw new js._Boot.HaxeError("TODO");var a1=arg;if(a1.length+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g11=0,_g2=a1.length;_g11<_g2;){var i1=_g11++;this[i1+offset]=a1[i1]}}},js.html.compat.Float64Array._subarray=function(start,end){var a=js.html.compat.Float64Array._new(this.slice(start,end));return a.byteOffset=8*start,a},js.html.compat.Uint8Array=function(){},js.html.compat.Uint8Array.__name__=["js","html","compat","Uint8Array"],js.html.compat.Uint8Array._new=function(arg1,offset,length){var arr;if("number"==typeof arg1){arr=[];for(var _g1=0,_g=arg1;_g1<_g;){arr[_g1++]=0}arr.byteLength=arr.length,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(arr)}else if(js.Boot.__instanceof(arg1,js.html.compat.ArrayBuffer)){var buffer=arg1;null==offset&&(offset=0),null==length&&(length=buffer.byteLength-offset),(arr=0==offset?buffer.a:buffer.a.slice(offset,offset+length)).byteLength=arr.length,arr.byteOffset=offset,arr.buffer=buffer}else{if(!(arg1 instanceof Array&&null==arg1.__enum__))throw new js._Boot.HaxeError("TODO "+Std.string(arg1));(arr=arg1.slice()).byteLength=arr.length,arr.byteOffset=0,arr.buffer=new js.html.compat.ArrayBuffer(arr)}return arr.subarray=js.html.compat.Uint8Array._subarray,arr.set=js.html.compat.Uint8Array._set,arr},js.html.compat.Uint8Array._set=function(arg,offset){if(js.Boot.__instanceof(arg.buffer,js.html.compat.ArrayBuffer)){var a=arg;if(arg.byteLength+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g1=0,_g=arg.byteLength;_g1<_g;){var i=_g1++;this[i+offset]=a[i]}}else{if(!(arg instanceof Array&&null==arg.__enum__))throw new js._Boot.HaxeError("TODO");var a1=arg;if(a1.length+offset>this.byteLength)throw new js._Boot.HaxeError("set() outside of range");for(var _g11=0,_g2=a1.length;_g11<_g2;){var i1=_g11++;this[i1+offset]=a1[i1]}}},js.html.compat.Uint8Array._subarray=function(start,end){var a=js.html.compat.Uint8Array._new(this.slice(start,end));return a.byteOffset=start,a},system.collections={},system.collections.generic={},system.collections.generic.IEnumerable=function(){},system.collections.generic.IEnumerable.__name__=["system","collections","generic","IEnumerable"],system._CsString={},system._CsString.CsString_Impl_={},system._CsString.CsString_Impl_.__name__=["system","_CsString","CsString_Impl_"],system._CsString.CsString_Impl_.Split_CharArray=function(this1,chars){for(var strings=[],startPos=0,_g1=0,_g=this1.length;_g1<_g;){var i=_g1++,cc=HxOverrides.cca(this1,i);if(chars.indexOf(cc)>=0){var endPos=i;endPosother?1:0},system.Int32ArrayIterator=function(array){this._array=array,this._i=0},system.Int32ArrayIterator.__name__=["system","Int32ArrayIterator"],system.Int32ArrayIterator.prototype={hasNext:function(){return this._i",alphaTab.xml.XmlParser.Escapes.amp="&",alphaTab.xml.XmlParser.Escapes.quot='"',alphaTab.xml.XmlParser.Escapes.apos="'";var ArrayBuffer=$global.ArrayBuffer||js.html.compat.ArrayBuffer;null==ArrayBuffer.prototype.slice&&(ArrayBuffer.prototype.slice=js.html.compat.ArrayBuffer.sliceImpl);var DataView=$global.DataView||js.html.compat.DataView,Float32Array=$global.Float32Array||js.html.compat.Float32Array._new,Float64Array=$global.Float64Array||($global.Float32Array?"notsupported":null)||js.html.compat.Float64Array._new,Uint8Array=$global.Uint8Array||js.html.compat.Uint8Array._new;alphaTab._DisplayMode.DisplayMode_Impl_.GuitarPro=0,alphaTab._DisplayMode.DisplayMode_Impl_.SongBook=1,alphaTab.platform.svg.SvgCanvas.BlurCorrection=0,alphaTab.platform.model.Color.BlackRgb="#000000",system.Convert._conversionBuffer=new ArrayBuffer(8),system.Convert._int8Buffer=new Int8Array(system.Convert._conversionBuffer),system.Convert._uint8Buffer=new Uint8Array(system.Convert._conversionBuffer),system.Convert._int16Buffer=new Int16Array(system.Convert._conversionBuffer),system.Convert._uint16Buffer=new Uint16Array(system.Convert._conversionBuffer),system.Convert._int32Buffer=new Int32Array(system.Convert._conversionBuffer),system.Convert._uint32Buffer=new Uint32Array(system.Convert._conversionBuffer),alphaTab.platform.javaScript.Html5Canvas.BlurCorrection=0,js.Boot.__toStr={}.toString,alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPrefix="alphaSynth.",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdInitialize="alphaSynth.initialize",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetLogLevel="alphaSynth.setLogLevel",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetMasterVolume="alphaSynth.setMasterVolume",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetMetronomeVolume="alphaSynth.setMetronomeVolume",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetPlaybackSpeed="alphaSynth.setPlaybackSpeed",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetTickPosition="alphaSynth.setTickPosition",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetTimePosition="alphaSynth.setTimePosition",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetPlaybackRange="alphaSynth.setPlaybackRange",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetIsLooping="alphaSynth.setIsLooping",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPlay="alphaSynth.play",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPause="alphaSynth.pause",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPlayPause="alphaSynth.playPause",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdStop="alphaSynth.stop",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdLoadSoundFontBytes="alphaSynth.loadSoundFontBytes",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdLoadMidi="alphaSynth.loadMidi",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelMute="alphaSynth.setChannelMute",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelSolo="alphaSynth.setChannelSolo",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelVolume="alphaSynth.setChannelVolume",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSetChannelProgram="alphaSynth.setChannelProgram",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdResetChannelStates="alphaSynth.resetChannelStates",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdReady="alphaSynth.ready",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdReadyForPlayback="alphaSynth.readyForPlayback",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPositionChanged="alphaSynth.positionChanged",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdPlayerStateChanged="alphaSynth.playerStateChanged",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdFinished="alphaSynth.finished",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSoundFontLoaded="alphaSynth.soundFontLoaded",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdSoundFontLoadFailed="alphaSynth.soundFontLoadFailed",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdMidiLoaded="alphaSynth.midiLoaded",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdMidiLoadFailed="alphaSynth.midiLoadFailed",alphaTab.platform.javaScript.AlphaSynthWebWorker.CmdLog="alphaSynth.log",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputPrefix="alphaSynth.output.",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputSequencerFinished="alphaSynth.output.sequencerFinished",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputAddSamples="alphaSynth.output.addSamples",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputPlay="alphaSynth.output.play",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputPause="alphaSynth.output.pause",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputResetSamples="alphaSynth.output.resetSamples",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputSampleRequest="alphaSynth.output.sampleRequest",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputFinished="alphaSynth.output.finished",alphaTab.platform.javaScript.AlphaSynthWorkerSynthOutput.CmdOutputSamplesPlayed="alphaSynth.output.samplesPlayed",alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSine=new alphaTab.audio.synth.bank.components.generators.SineGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSaw=new alphaTab.audio.synth.bank.components.generators.SawGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultSquare=new alphaTab.audio.synth.bank.components.generators.SquareGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.audio.synth.bank.components.generators.DefaultGenerators.DefaultTriangle=new alphaTab.audio.synth.bank.components.generators.TriangleGenerator(new alphaTab.audio.synth.bank.descriptors.GeneratorDescriptor),alphaTab.rendering.layout.PageViewLayout.PagePadding=new Float32Array([40,40,40,40]),alphaTab.rendering.layout.PageViewLayout.GroupSpacing=20,alphaTab.rendering.layout.HorizontalScreenLayout.PagePadding=new Float32Array([20,20,20,20]),alphaTab.rendering.layout.HorizontalScreenLayout.GroupSpacing=20,alphaTab.Environment.StaveProfileScoreTab="score-tab",alphaTab.Environment.StaveProfileTab="tab",alphaTab.Environment.StaveProfileTabMixed="tab-mixed",alphaTab.Environment.StaveProfileScore="score",alphaTab._FingeringMode.FingeringMode_Impl_.Score=0,alphaTab._FingeringMode.FingeringMode_Impl_.SingleNoteEffectBand=1,alphaTab.audio.MidiUtils.QuarterTime=960,alphaTab.audio.MidiUtils.MinVelocity=15,alphaTab.audio.MidiUtils.VelocityIncrement=16,alphaTab.audio.generator.MidiFileGenerator.DefaultDurationDead=30,alphaTab.audio.generator.MidiFileGenerator.DefaultDurationPalmMute=80,alphaTab.audio.generator.MidiFileGenerator.DefaultBend=64,alphaTab.audio.generator.MidiFileGenerator.DefaultBendSemitone=2.75,alphaTab.audio.synth._PlayerState.PlayerState_Impl_.Paused=0,alphaTab.audio.synth._PlayerState.PlayerState_Impl_.Playing=1,alphaTab.audio.synth.bank.PatchBank.DrumBank=128,alphaTab.audio.synth.bank.PatchBank.BankSize=128,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Delay=0,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Attack=1,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Hold=2,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Decay=3,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Sustain=4,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.Release=5,alphaTab.audio.synth.bank.components._EnvelopeState.EnvelopeState_Impl_.None=6,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.None=0,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.BiquadLowpass=1,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.BiquadHighpass=2,alphaTab.audio.synth.bank.components._FilterType.FilterType_Impl_.OnePoleLowpass=3,alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.Delay=0,alphaTab.audio.synth.bank.components._LfoState.LfoState_Impl_.Sustain=1,alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.Neg3dBCenter=0,alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.Neg6dBCenter=1,alphaTab.audio.synth.bank.components._PanFormulaEnum.PanFormulaEnum_Impl_.ZeroCenter=2,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.PreLoop=0,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.Loop=1,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.PostLoop=2,alphaTab.audio.synth.bank.components.generators._GeneratorState.GeneratorState_Impl_.Finished=3,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.NoLoop=0,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.OneShot=1,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.Continuous=2,alphaTab.audio.synth.bank.components.generators._LoopMode.LoopMode_Impl_.LoopUntilNoteOff=3,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Sine=0,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Square=1,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Saw=2,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.Triangle=3,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.SampleData=4,alphaTab.audio.synth.bank.descriptors._Waveform.Waveform_Impl_.WhiteNoise=5,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.ChannelKeyVelocity=0,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.ChannelKey=1,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.KeyVelocity=2,alphaTab.audio.synth.bank.patch._IntervalType.IntervalType_Impl_.Key=3,alphaTab.audio.synth.midi.MidiHelper.MicroSecondsPerMinute=6e7,alphaTab.audio.synth.midi.MidiHelper.MinChannel=0,alphaTab.audio.synth.midi.MidiHelper.MaxChannel=15,alphaTab.audio.synth.midi.MidiHelper.DrumChannel=9,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.BankSelectCoarse=0,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ModulationCoarse=1,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.DataEntryCoarse=6,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.VolumeCoarse=7,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.PanCoarse=10,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ExpressionControllerCoarse=11,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ModulationFine=33,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.DataEntryFine=38,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.VolumeFine=39,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.PanFine=42,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ExpressionControllerFine=43,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.HoldPedal=64,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.LegatoPedal=68,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.NonRegisteredParameterFine=98,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.NonRegisteredParameterCourse=99,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.RegisteredParameterFine=100,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.RegisteredParameterCourse=101,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.ResetControllers=121,alphaTab.audio.synth.midi.event._ControllerType.ControllerType_Impl_.AllNotesOff=123,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SequenceNumber=0,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.TextEvent=1,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.CopyrightNotice=2,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SequenceOrTrackName=3,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.InstrumentName=4,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.LyricText=5,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.MarkerText=6,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.CuePoint=7,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.PatchName=8,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.PortName=9,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.MidiChannel=32,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.MidiPort=33,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.EndOfTrack=47,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.Tempo=81,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SmpteOffset=84,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.TimeSignature=88,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.KeySignature=89,alphaTab.audio.synth.midi.event._MetaEventTypeEnum.MetaEventTypeEnum_Impl_.SequencerSpecific=127,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.NoteOff=128,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.NoteOn=144,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.NoteAftertouch=160,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.Controller=176,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ProgramChange=192,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.ChannelAftertouch=208,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.PitchBend=224,alphaTab.audio.synth.midi.event._MidiEventType.MidiEventType_Impl_.Meta=255,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SystemExclusive=240,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.MtcQuarterFrame=241,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SongPosition=242,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SongSelect=243,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.TuneRequest=246,alphaTab.audio.synth.midi.event._SystemCommonTypeEnum.SystemCommonTypeEnum_Impl_.SystemExclusive2=247,alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.MinToMax=0,alphaTab.audio.synth.sf2._DirectionEnum.DirectionEnum_Impl_.MaxToMin=1,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartAddressOffset=0,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndAddressOffset=1,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartLoopAddressOffset=2,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndLoopAddressOffset=3,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartAddressCoarseOffset=4,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationLFOToPitch=5,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.VibratoLFOToPitch=6,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationEnvelopeToPitch=7,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.InitialFilterCutoffFrequency=8,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.InitialFilterQ=9,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationLFOToFilterCutoffFrequency=10,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationEnvelopeToFilterCutoffFrequency=11,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndAddressCoarseOffset=12,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ModulationLFOToVolume=13,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused1=14,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ChorusEffectsSend=15,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ReverbEffectsSend=16,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Pan=17,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused2=18,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused3=19,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused4=20,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayModulationLFO=21,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.FrequencyModulationLFO=22,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayVibratoLFO=23,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.FrequencyVibratoLFO=24,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayModulationEnvelope=25,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.AttackModulationEnvelope=26,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.HoldModulationEnvelope=27,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DecayModulationEnvelope=28,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SustainModulationEnvelope=29,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ReleaseModulationEnvelope=30,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToModulationEnvelopeHold=31,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToModulationEnvelopeDecay=32,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DelayVolumeEnvelope=33,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.AttackVolumeEnvelope=34,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.HoldVolumeEnvelope=35,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.DecayVolumeEnvelope=36,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SustainVolumeEnvelope=37,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ReleaseVolumeEnvelope=38,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToVolumeEnvelopeHold=39,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumberToVolumeEnvelopeDecay=40,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Instrument=41,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Reserved1=42,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyRange=43,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.VelocityRange=44,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.StartLoopAddressCoarseOffset=45,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.KeyNumber=46,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Velocity=47,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.InitialAttenuation=48,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Reserved2=49,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.EndLoopAddressCoarseOffset=50,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.CoarseTune=51,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.FineTune=52,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SampleID=53,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.SampleModes=54,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Reserved3=55,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ScaleTuning=56,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.ExclusiveClass=57,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.OverridingRootKey=58,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.Unused5=59,alphaTab.audio.synth.sf2._GeneratorEnum.GeneratorEnum_Impl_.UnusedEnd=60,alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.Unipolar=0,alphaTab.audio.synth.sf2._PolarityEnum.PolarityEnum_Impl_.Bipolar=1,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.MonoSample=1,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RightSample=2,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.LeftSample=4,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.LinkedSample=8,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.OggVobis=16,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomMonoSample=32769,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomRightSample=32770,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomLeftSample=32772,alphaTab.audio.synth.sf2._SFSampleLink.SFSampleLink_Impl_.RomLinkedSample=32776,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Linear=0,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Concave=1,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Convex=2,alphaTab.audio.synth.sf2._SourceTypeEnum.SourceTypeEnum_Impl_.Switch=3,alphaTab.audio.synth.sf2._TransformEnum.TransformEnum_Impl_.Linear=0,alphaTab.audio.synth.sf2._TransformEnum.TransformEnum_Impl_.AbsoluteValue=2,alphaTab.audio.synth.synthesis._VoiceStateEnum.VoiceStateEnum_Impl_.Stopped=0,alphaTab.audio.synth.synthesis._VoiceStateEnum.VoiceStateEnum_Impl_.Stopping=1,alphaTab.audio.synth.synthesis._VoiceStateEnum.VoiceStateEnum_Impl_.Playing=2,alphaTab.audio.synth.util.SynthConstants.AudioChannels=2,alphaTab.audio.synth.util.SynthConstants.Pi=3.14159265358979,alphaTab.audio.synth.util.SynthConstants.TwoPi=6.28318530717958,alphaTab.audio.synth.util.SynthConstants.HalfPi=1.570796326794895,alphaTab.audio.synth.util.SynthConstants.InverseSqrtOfTwo=.707106781186,alphaTab.audio.synth.util.SynthConstants.DefaultLfoFrequency=8,alphaTab.audio.synth.util.SynthConstants.DefaultModDepth=100,alphaTab.audio.synth.util.SynthConstants.DefaultPolyphony=40,alphaTab.audio.synth.util.SynthConstants.MinPolyphony=5,alphaTab.audio.synth.util.SynthConstants.MaxPolyphony=250,alphaTab.audio.synth.util.SynthConstants.DefaultBlockSize=64,alphaTab.audio.synth.util.SynthConstants.MaxBufferSize=.05,alphaTab.audio.synth.util.SynthConstants.MinBufferSize=.001,alphaTab.audio.synth.util.SynthConstants.DenormLimit=1e-38,alphaTab.audio.synth.util.SynthConstants.NonAudible=1e-5,alphaTab.audio.synth.util.SynthConstants.SincWidth=16,alphaTab.audio.synth.util.SynthConstants.SincResolution=64,alphaTab.audio.synth.util.SynthConstants.MaxVoiceComponents=4,alphaTab.audio.synth.util.SynthConstants.DefaultChannelCount=17,alphaTab.audio.synth.util.SynthConstants.DefaultKeyCount=128,alphaTab.audio.synth.util.SynthConstants.DefaultMixGain=.35,alphaTab.audio.synth.util.SynthConstants.MinVolume=0,alphaTab.audio.synth.util.SynthConstants.MaxVolume=10,alphaTab.audio.synth.util.SynthConstants.MinProgram=0,alphaTab.audio.synth.util.SynthConstants.MaxProgram=127,alphaTab.audio.synth.util.SynthConstants.MinPlaybackSpeed=.125,alphaTab.audio.synth.util.SynthConstants.MaxPlaybackSpeed=8,alphaTab.importer.AlphaTexImporter.Eof=0,alphaTab.importer.AlphaTexImporter.TrackChannels=new Int32Array([0,1]),alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.No=0,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Eof=1,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Number=2,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.DoubleDot=3,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Dot=4,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.String=5,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Tuning=6,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.LParensis=7,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.RParensis=8,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.LBrace=9,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.RBrace=10,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Pipe=11,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.MetaCommand=12,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.Multiply=13,alphaTab.importer._AlphaTexSymbols.AlphaTexSymbols_Impl_.LowerThan=14,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Boolean=0,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Integer=1,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Float=2,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.String=3,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Point=4,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Size=5,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Rectangle=6,alphaTab.importer._BinaryStylesheetParser_DataType.BinaryStylesheetParser_DataType_Impl_.Color=7,alphaTab.importer.Gp3To5Importer.VersionString="FICHIER GUITAR PRO ",alphaTab.importer.Gp3To5Importer.BendStep=25,alphaTab.importer.GpifParser.InvalidId="-1",alphaTab.importer.GpifParser.BendPointPositionFactor=.6,alphaTab.importer.GpifParser.BendPointValueFactor=.04,alphaTab.importer.GpxFileSystem.HeaderBcFs="BCFS",alphaTab.importer.GpxFileSystem.HeaderBcFz="BCFZ",alphaTab.importer.GpxFileSystem.ScoreGpif="score.gpif",alphaTab.importer.GpxFileSystem.BinaryStylesheet="BinaryStylesheet",alphaTab.importer.MusicXmlImporter.MergePartGroupsSetting="musicXMLMergePartGroups",alphaTab.io.BitReader.ByteSize=8,alphaTab.model._AccentuationType.AccentuationType_Impl_.None=0,alphaTab.model._AccentuationType.AccentuationType_Impl_.Normal=1,alphaTab.model._AccentuationType.AccentuationType_Impl_.Heavy=2,alphaTab.model._AccidentalType.AccidentalType_Impl_.None=0,alphaTab.model._AccidentalType.AccidentalType_Impl_.Natural=1,alphaTab.model._AccidentalType.AccidentalType_Impl_.Sharp=2,alphaTab.model._AccidentalType.AccidentalType_Impl_.Flat=3,alphaTab.model._AccidentalType.AccidentalType_Impl_.NaturalQuarterNoteUp=4,alphaTab.model._AccidentalType.AccidentalType_Impl_.SharpQuarterNoteUp=5,alphaTab.model._AccidentalType.AccidentalType_Impl_.FlatQuarterNoteUp=6,alphaTab.model._AutomationType.AutomationType_Impl_.Tempo=0,alphaTab.model._AutomationType.AutomationType_Impl_.Volume=1,alphaTab.model._AutomationType.AutomationType_Impl_.Instrument=2,alphaTab.model._AutomationType.AutomationType_Impl_.Balance=3,alphaTab.model.Bar.GlobalBarId=0,alphaTab.model.Beat.GlobalBeatId=0,alphaTab.model.BendPoint.MaxPosition=60,alphaTab.model.BendPoint.MaxValue=12,alphaTab.model._BendStyle.BendStyle_Impl_.Default=0,alphaTab.model._BendStyle.BendStyle_Impl_.Gradual=1,alphaTab.model._BendStyle.BendStyle_Impl_.Fast=2,alphaTab.model._BendType.BendType_Impl_.None=0,alphaTab.model._BendType.BendType_Impl_.Custom=1,alphaTab.model._BendType.BendType_Impl_.Bend=2,alphaTab.model._BendType.BendType_Impl_.Release=3,alphaTab.model._BendType.BendType_Impl_.BendRelease=4,alphaTab.model._BendType.BendType_Impl_.Hold=5,alphaTab.model._BendType.BendType_Impl_.Prebend=6,alphaTab.model._BendType.BendType_Impl_.PrebendBend=7,alphaTab.model._BendType.BendType_Impl_.PrebendRelease=8,alphaTab.model._BrushType.BrushType_Impl_.None=0,alphaTab.model._BrushType.BrushType_Impl_.BrushUp=1,alphaTab.model._BrushType.BrushType_Impl_.BrushDown=2,alphaTab.model._BrushType.BrushType_Impl_.ArpeggioUp=3,alphaTab.model._BrushType.BrushType_Impl_.ArpeggioDown=4,alphaTab.model._Clef.Clef_Impl_.Neutral=0,alphaTab.model._Clef.Clef_Impl_.C3=1,alphaTab.model._Clef.Clef_Impl_.C4=2,alphaTab.model._Clef.Clef_Impl_.F4=3,alphaTab.model._Clef.Clef_Impl_.G2=4,alphaTab.model._CrescendoType.CrescendoType_Impl_.None=0,alphaTab.model._CrescendoType.CrescendoType_Impl_.Crescendo=1,alphaTab.model._CrescendoType.CrescendoType_Impl_.Decrescendo=2,alphaTab.model._Duration.Duration_Impl_.QuadrupleWhole=-4,alphaTab.model._Duration.Duration_Impl_.DoubleWhole=-2,alphaTab.model._Duration.Duration_Impl_.Whole=1,alphaTab.model._Duration.Duration_Impl_.Half=2,alphaTab.model._Duration.Duration_Impl_.Quarter=4,alphaTab.model._Duration.Duration_Impl_.Eighth=8,alphaTab.model._Duration.Duration_Impl_.Sixteenth=16,alphaTab.model._Duration.Duration_Impl_.ThirtySecond=32,alphaTab.model._Duration.Duration_Impl_.SixtyFourth=64,alphaTab.model._Duration.Duration_Impl_.OneHundredTwentyEighth=128,alphaTab.model._Duration.Duration_Impl_.TwoHundredFiftySixth=256,alphaTab.model._DynamicValue.DynamicValue_Impl_.PPP=0,alphaTab.model._DynamicValue.DynamicValue_Impl_.PP=1,alphaTab.model._DynamicValue.DynamicValue_Impl_.P=2,alphaTab.model._DynamicValue.DynamicValue_Impl_.MP=3,alphaTab.model._DynamicValue.DynamicValue_Impl_.MF=4,alphaTab.model._DynamicValue.DynamicValue_Impl_.F=5,alphaTab.model._DynamicValue.DynamicValue_Impl_.FF=6,alphaTab.model._DynamicValue.DynamicValue_Impl_.FFF=7,alphaTab.model._FermataType.FermataType_Impl_.Short=0,alphaTab.model._FermataType.FermataType_Impl_.Medium=1,alphaTab.model._FermataType.FermataType_Impl_.Long=2,alphaTab.model._Fingers.Fingers_Impl_.Unknown=-2,alphaTab.model._Fingers.Fingers_Impl_.NoOrDead=-1,alphaTab.model._Fingers.Fingers_Impl_.Thumb=0,alphaTab.model._Fingers.Fingers_Impl_.IndexFinger=1,alphaTab.model._Fingers.Fingers_Impl_.MiddleFinger=2,alphaTab.model._Fingers.Fingers_Impl_.AnnularFinger=3,alphaTab.model._Fingers.Fingers_Impl_.LittleFinger=4,alphaTab.model._GraceType.GraceType_Impl_.None=0,alphaTab.model._GraceType.GraceType_Impl_.OnBeat=1,alphaTab.model._GraceType.GraceType_Impl_.BeforeBeat=2,alphaTab.model._GraceType.GraceType_Impl_.BendGrace=3,alphaTab.model._HarmonicType.HarmonicType_Impl_.None=0,alphaTab.model._HarmonicType.HarmonicType_Impl_.Natural=1,alphaTab.model._HarmonicType.HarmonicType_Impl_.Artificial=2,alphaTab.model._HarmonicType.HarmonicType_Impl_.Pinch=3,alphaTab.model._HarmonicType.HarmonicType_Impl_.Tap=4,alphaTab.model._HarmonicType.HarmonicType_Impl_.Semi=5,alphaTab.model._HarmonicType.HarmonicType_Impl_.Feedback=6,alphaTab.model._KeySignature.KeySignature_Impl_.Cb=-7,alphaTab.model._KeySignature.KeySignature_Impl_.Gb=-6,alphaTab.model._KeySignature.KeySignature_Impl_.Db=-5,alphaTab.model._KeySignature.KeySignature_Impl_.Ab=-4,alphaTab.model._KeySignature.KeySignature_Impl_.Eb=-3,alphaTab.model._KeySignature.KeySignature_Impl_.Bb=-2,alphaTab.model._KeySignature.KeySignature_Impl_.F=-1,alphaTab.model._KeySignature.KeySignature_Impl_.C=0,alphaTab.model._KeySignature.KeySignature_Impl_.G=1,alphaTab.model._KeySignature.KeySignature_Impl_.D=2,alphaTab.model._KeySignature.KeySignature_Impl_.A=3,alphaTab.model._KeySignature.KeySignature_Impl_.E=4,alphaTab.model._KeySignature.KeySignature_Impl_.B=5,alphaTab.model._KeySignature.KeySignature_Impl_.FSharp=6,alphaTab.model._KeySignature.KeySignature_Impl_.CSharp=7,alphaTab.model._KeySignatureType.KeySignatureType_Impl_.Major=0,alphaTab.model._KeySignatureType.KeySignatureType_Impl_.Minor=1,alphaTab.model.Lyrics.CharCodeLF=10,alphaTab.model.Lyrics.CharCodeTab=9,alphaTab.model.Lyrics.CharCodeCR=13,alphaTab.model.Lyrics.CharCodeSpace=32,alphaTab.model.Lyrics.CharCodeBrackedClose=93,alphaTab.model.Lyrics.CharCodeBrackedOpen=91,alphaTab.model.Lyrics.CharCodeDash=45,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.IgnoreSpaces=0,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Begin=1,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Text=2,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Comment=3,alphaTab.model._Lyrics_LyricsState.Lyrics_LyricsState_Impl_.Dash=4,alphaTab.model.MasterBar.MaxAlternateEndings=8,alphaTab.model.Note.GlobalNoteId=0,alphaTab.model.Note.MaxOffsetForSameLineSearch=3,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.Default=0,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.SwapAccidentals=1,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.ForceNatural=2,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.ForceSharp=3,alphaTab.model._NoteAccidentalMode.NoteAccidentalMode_Impl_.ForceFlat=4,alphaTab.model._Ottavia.Ottavia_Impl_._15ma=0,alphaTab.model._Ottavia.Ottavia_Impl_._8va=1,alphaTab.model._Ottavia.Ottavia_Impl_.Regular=2,alphaTab.model._Ottavia.Ottavia_Impl_._8vb=3,alphaTab.model._Ottavia.Ottavia_Impl_._15mb=4,alphaTab.model._PickStroke.PickStroke_Impl_.None=0,alphaTab.model._PickStroke.PickStroke_Impl_.Up=1,alphaTab.model._PickStroke.PickStroke_Impl_.Down=2,alphaTab.model._SimileMark.SimileMark_Impl_.None=0,alphaTab.model._SimileMark.SimileMark_Impl_.Simple=1,alphaTab.model._SimileMark.SimileMark_Impl_.FirstOfDouble=2,alphaTab.model._SimileMark.SimileMark_Impl_.SecondOfDouble=3,alphaTab.model._SlideType.SlideType_Impl_.None=0,alphaTab.model._SlideType.SlideType_Impl_.Shift=1,alphaTab.model._SlideType.SlideType_Impl_.Legato=2,alphaTab.model._SlideType.SlideType_Impl_.IntoFromBelow=3,alphaTab.model._SlideType.SlideType_Impl_.IntoFromAbove=4,alphaTab.model._SlideType.SlideType_Impl_.OutUp=5,alphaTab.model._SlideType.SlideType_Impl_.OutDown=6,alphaTab.model._SlideType.SlideType_Impl_.PickSlideDown=7,alphaTab.model._SlideType.SlideType_Impl_.PickSlideUp=8,alphaTab.model._StaffKind.StaffKind_Impl_.Tablature=0,alphaTab.model._StaffKind.StaffKind_Impl_.Score=1,alphaTab.model._StaffKind.StaffKind_Impl_.Percussion=2,alphaTab.model._StaffKind.StaffKind_Impl_.Mixed=3,alphaTab.model.Track.ShortNameMaxLength=10,alphaTab.model._TripletFeel.TripletFeel_Impl_.NoTripletFeel=0,alphaTab.model._TripletFeel.TripletFeel_Impl_.Triplet16th=1,alphaTab.model._TripletFeel.TripletFeel_Impl_.Triplet8th=2,alphaTab.model._TripletFeel.TripletFeel_Impl_.Dotted16th=3,alphaTab.model._TripletFeel.TripletFeel_Impl_.Dotted8th=4,alphaTab.model._TripletFeel.TripletFeel_Impl_.Scottish16th=5,alphaTab.model._TripletFeel.TripletFeel_Impl_.Scottish8th=6,alphaTab.model._VibratoType.VibratoType_Impl_.None=0,alphaTab.model._VibratoType.VibratoType_Impl_.Slight=1,alphaTab.model._VibratoType.VibratoType_Impl_.Wide=2,alphaTab.model._WhammyType.WhammyType_Impl_.None=0,alphaTab.model._WhammyType.WhammyType_Impl_.Custom=1,alphaTab.model._WhammyType.WhammyType_Impl_.Dive=2,alphaTab.model._WhammyType.WhammyType_Impl_.Dip=3,alphaTab.model._WhammyType.WhammyType_Impl_.Hold=4,alphaTab.model._WhammyType.WhammyType_Impl_.Predive=5,alphaTab.model._WhammyType.WhammyType_Impl_.PrediveDive=6,alphaTab.platform.javaScript.AlphaSynthFlashOutput.PreferredSampleRate=44100,alphaTab.platform.javaScript.AlphaSynthFlashOutput.Id="alphaSynthFlashPlayer",alphaTab.platform.javaScript.AlphaSynthWebAudioOutput.BufferSize=4096,alphaTab.platform.javaScript.AlphaSynthWebAudioOutput.BufferCount=10,alphaTab.platform.model._FontStyle.FontStyle_Impl_.Plain=0,alphaTab.platform.model._FontStyle.FontStyle_Impl_.Bold=1,alphaTab.platform.model._FontStyle.FontStyle_Impl_.Italic=2,alphaTab.platform.model._TextAlign.TextAlign_Impl_.Left=0,alphaTab.platform.model._TextAlign.TextAlign_Impl_.Center=1,alphaTab.platform.model._TextAlign.TextAlign_Impl_.Right=2,alphaTab.platform.model._TextBaseline.TextBaseline_Impl_.Top=0,alphaTab.platform.model._TextBaseline.TextBaseline_Impl_.Middle=1,alphaTab.platform.model._TextBaseline.TextBaseline_Impl_.Bottom=2,alphaTab.platform.svg.FontSizes.TimesNewRoman=new Uint8Array([3,4,5,6,6,9,9,2,4,4,6,6,3,4,3,3,6,6,6,6,6,6,6,6,6,6,3,3,6,6,6,5,10,8,7,7,8,7,6,7,8,4,4,8,7,10,8,8,7,8,7,5,8,8,7,11,8,8,7,4,3,4,5,6,4,5,5,5,5,5,4,5,6,3,3,6,3,9,6,6,6,5,4,4,4,5,6,7,6,6,5,5,2,5,6,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,0,3,4,6,6,6,6,2,5,4,8,4,6,6,0,8,6,4,6,3,3,4,5,5,4,4,3,3,6,8,8,8,5,8,8,8,8,8,8,11,7,7,7,7,7,4,4,4,4,8,8,8,8,8,8,8,6,8,8,8,8,8,8,6,5,5,5,5,5,5,5,8,5,5,5,5,5,3,3,3,3,6,6,6,6,6,6,6,6,6,5,5,5,5,6,6]),alphaTab.platform.svg.FontSizes.Arial11Pt=new Uint8Array([3,3,4,6,6,10,7,2,4,4,4,6,3,4,3,3,6,6,6,6,6,6,6,6,6,6,3,3,6,6,6,6,11,7,7,8,8,7,7,9,8,3,6,7,6,9,8,9,7,9,8,7,7,8,7,10,7,7,7,3,3,3,5,6,4,6,6,6,6,6,3,6,6,2,2,6,2,9,6,6,6,6,4,6,3,6,6,8,6,6,6,4,3,4,6,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,0,3,4,6,6,6,6,3,6,4,8,4,6,6,0,8,6,4,6,4,4,4,6,6,4,4,4,4,6,9,9,9,7,7,7,7,7,7,7,11,8,7,7,7,7,3,3,3,3,8,8,9,9,9,9,9,6,9,8,8,8,8,7,7,7,6,6,6,6,6,6,10,6,6,6,6,6,3,3,3,3,6,6,6,6,6,6,6,6,7,6,6,6,6,6,6]),alphaTab.platform.svg.FontSizes.ControlChars=32,alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.TimesNewRoman=0,alphaTab.platform.svg._SupportedFonts.SupportedFonts_Impl_.Arial=1,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.PreNotes=0,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.OnNotes=1,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.MiddleNotes=2,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.PostNotes=3,alphaTab.rendering._BeatXPosition.BeatXPosition_Impl_.EndBeat=4,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.SinglePreBeat=0,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.SingleOnBeat=1,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.SingleOnBeatToEnd=2,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.GroupedBeforeBeat=3,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.GroupedOnBeat=4,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.GroupedOnBeatToEnd=5,alphaTab.rendering._EffectBarGlyphSizing.EffectBarGlyphSizing_Impl_.FullBar=6,alphaTab.rendering.ScoreBarRenderer.StaffId="score",alphaTab.rendering.ScoreBarRenderer.SharpKsSteps=new Int32Array([1,4,0,3,6,2,5]),alphaTab.rendering.ScoreBarRenderer.FlatKsSteps=new Int32Array([5,2,6,3,7,4,8]),alphaTab.rendering.ScoreBarRenderer.LineSpacing=8,alphaTab.rendering.ScoreBarRenderer.StemWidth=1.3,alphaTab.rendering.TabBarRenderer.StaffId="tab",alphaTab.rendering.TabBarRenderer.LineSpacing=10,alphaTab.rendering.glyphs.AccidentalGroupGlyph.NonReserved=-3e3,alphaTab.rendering.glyphs.AlternateEndingsGlyph.Padding=3,alphaTab.rendering.glyphs.BendNoteHeadGroupGlyph.ElementPadding=2,alphaTab.rendering.glyphs.CrescendoGlyph.Padding=4,alphaTab.rendering.glyphs.GhostParenthesisGlyph.Size=6,alphaTab.rendering.glyphs.LineRangedGlyph.LineSpacing=3,alphaTab.rendering.glyphs.LineRangedGlyph.LineTopPadding=4,alphaTab.rendering.glyphs.LineRangedGlyph.LineTopOffset=5,alphaTab.rendering.glyphs.LineRangedGlyph.LineSize=8,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.None=-1,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefG=57424,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefC=57436,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefF=57442,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefNeutral=57449,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefTab=57453,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.ClefTabSmall=57454,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestQuadrupleWhole=58593,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestDoubleWhole=58594,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestWhole=58595,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestHalf=58596,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestQuarter=58597,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestEighth=58598,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestSixteenth=58599,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestThirtySecond=58600,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestSixtyFourth=58601,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestOneHundredTwentyEighth=58602,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.RestTwoHundredFiftySixth=58603,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Trill=58726,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num0=57472,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num1=57473,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num2=57474,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num3=57475,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num4=57476,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num5=57477,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num6=57478,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num7=57479,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num8=57480,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Num9=57481,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TimeSignatureCommon=57482,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TimeSignatureCutCommon=57483,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteQuadrupleWhole=57505,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteDoubleWhole=57504,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteWhole=57506,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHalf=57507,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteQuarter=57508,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteDead=57514,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHarmonic=57564,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHarmonicWhole=57566,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHiHat=57523,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteSideStick=57513,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteHiHatHalf=57591,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteChineseCymbal=57593,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpEighth=57920,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownEighth=57921,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpSixteenth=57922,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownSixteenth=57923,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpThirtySecond=57924,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownThirtySecond=57925,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpSixtyFourth=57926,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownSixtyFourth=57927,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpOneHundredTwentyEighth=57928,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownOneHundredTwentyEighth=57929,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterUpTwoHundredFiftySixth=57930,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FooterDownTwoHundredFiftySixth=57931,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicPPP=58666,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicPP=58667,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicP=58656,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicMP=58668,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicMF=58669,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicF=58658,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicFF=58671,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.DynamicFFF=58672,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Accentuation=58528,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.HeavyAccentuation=58540,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.WaveHorizontalSlight=60068,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.WaveHorizontalWide=60126,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.PickStrokeDown=58896,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.PickStrokeUp=58898,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TremoloPickingThirtySecond=57890,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TremoloPickingSixteenth=57889,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.TremoloPickingEighth=57888,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Tempo=57813,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.NoteEighth=57815,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalFlat=57952,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalNatural=57953,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalSharp=57954,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalQuarterToneFlatArrowUp=57968,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalQuarterToneSharpArrowUp=57972,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.AccidentalQuarterToneNaturalArrowUp=57970,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava8=58640,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava8va=58641,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava8vb=58652,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava15=58644,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.Ottava15ma=58645,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.OttavaMBaseline=60565,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.OttavaBBaseline=60563,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.SimileMarkSimple=58624,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.SimileMarkDouble=58625,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FermataMedium=58560,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FermataShort=58564,alphaTab.rendering.glyphs._MusicFontSymbol.MusicFontSymbol_Impl_.FermataLong=58566,alphaTab.rendering.glyphs.NoteHeadGlyph.GraceScale=.75,alphaTab.rendering.glyphs.NoteHeadGlyph.NoteHeadHeight=9,alphaTab.rendering.glyphs.NoteHeadGlyph.QuarterNoteHeadWidth=8,alphaTab.rendering.glyphs.NoteVibratoGlyph.SlightWaveOffset=10,alphaTab.rendering.glyphs.NoteVibratoGlyph.SlightWaveSize=8.5,alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.SlurHeight=11,alphaTab.rendering.glyphs.ScoreHelperNotesBaseGlyph.EndPadding=7,alphaTab.rendering.glyphs.ScoreWhammyBarGlyph.SimpleDipHeight=12,alphaTab.rendering.glyphs.ScoreWhammyBarGlyph.SimpleDipPadding=2,alphaTab.rendering.glyphs.TabBendGlyph.ArrowSize=6,alphaTab.rendering.glyphs.TabBendGlyph.DashSize=3,alphaTab.rendering.glyphs.TabBendGlyph.BendValueHeight=6,alphaTab.rendering.glyphs.TabWhammyBarGlyph.TopOffsetSharedDataKey="tab.whammy.topoffset",alphaTab.rendering.glyphs.TabWhammyBarGlyph.PerHalfSize=6,alphaTab.rendering.glyphs.TabWhammyBarGlyph.DashSize=3,alphaTab.rendering.glyphs.TripletFeelGlyph.NoteScale=.4,alphaTab.rendering.glyphs.TripletFeelGlyph.NoteHeight=12,alphaTab.rendering.glyphs.TripletFeelGlyph.NoteSeparation=12,alphaTab.rendering.glyphs.TripletFeelGlyph.BarHeight=2,alphaTab.rendering.glyphs.TripletFeelGlyph.BarSeparation=3,alphaTab.rendering.glyphs._TripletFeelGlyph_BarType.TripletFeelGlyph_BarType_Impl_.Full=0,alphaTab.rendering.glyphs._TripletFeelGlyph_BarType.TripletFeelGlyph_BarType_Impl_.PartialLeft=1,alphaTab.rendering.glyphs._TripletFeelGlyph_BarType.TripletFeelGlyph_BarType_Impl_.PartialRight=2,alphaTab.rendering.glyphs.VoiceContainerGlyph.KeySizeBeat="Beat",alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.None=0,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Title=1,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.SubTitle=2,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Artist=4,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Album=8,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Words=16,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Music=32,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.WordsAndMusic=64,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.Copyright=128,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.PageNumber=256,alphaTab.rendering.layout._HeaderFooterElements.HeaderFooterElements_Impl_.All=511,alphaTab.rendering.staves.BarLayoutingInfo.MinDuration=30,alphaTab.rendering.staves.BarLayoutingInfo.MinDurationWidth=10,alphaTab.rendering.staves.StaveGroup.AccoladeLabelSpacing=10,alphaTab.rendering.utils.AccidentalHelper.KeySignatureLookup=[[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],[!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0],[!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0],[!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!0,!0],[!1,!1,!1,!0,!0,!1,!1,!1,!0,!0,!0,!0],[!1,!1,!1,!0,!0,!1,!1,!1,!1,!1,!0,!0],[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!0],[!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1],[!1,!1,!1,!1,!1,!0,!0,!1,!1,!1,!1,!1],[!0,!0,!1,!1,!1,!0,!0,!1,!1,!1,!1,!1],[!0,!0,!1,!1,!1,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!0,!1,!0,!0,!0,!0,!1,!1,!1],[!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1],[!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0]],alphaTab.rendering.utils.AccidentalHelper.AccidentalNotes=[!1,!0,!1,!0,!1,!1,!0,!1,!0,!1,!0,!1],alphaTab.rendering.utils.AccidentalHelper.StepsPerOctave=7,alphaTab.rendering.utils.AccidentalHelper.OctaveSteps=new Int32Array([40,34,32,28,40]),alphaTab.rendering.utils.AccidentalHelper.SharpNoteSteps=new Int32Array([0,0,1,1,2,3,3,4,4,5,5,6]),alphaTab.rendering.utils.AccidentalHelper.FlatNoteSteps=new Int32Array([0,1,1,2,2,3,4,4,5,5,6,6]),alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.Up=0,alphaTab.rendering.utils._BeamDirection.BeamDirection_Impl_.Down=1,alphaTab.rendering.utils.BeamingHelper.ScoreMiddleKeys=new Int32Array([60,60,57,50,71]),alphaTab.rendering.utils.PercussionMapper.ElementVariationToMidi=[new Int32Array([35,35,35]),new Int32Array([38,38,37]),new Int32Array([56,56,56]),new Int32Array([56,56,56]),new Int32Array([56,56,56]),new Int32Array([41,41,41]),new Int32Array([43,43,43]),new Int32Array([45,45,45]),new Int32Array([47,47,47]),new Int32Array([48,48,48]),new Int32Array([42,46,46]),new Int32Array([44,44,44]),new Int32Array([49,49,49]),new Int32Array([57,57,57]),new Int32Array([55,55,55]),new Int32Array([51,59,53]),new Int32Array([52,52,52])],alphaTab.util._LogLevel.LogLevel_Impl_.None=0,alphaTab.util._LogLevel.LogLevel_Impl_.Debug=1,alphaTab.util._LogLevel.LogLevel_Impl_.Info=2,alphaTab.util._LogLevel.LogLevel_Impl_.Warning=3,alphaTab.util._LogLevel.LogLevel_Impl_.Error=4,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.None=0,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Element=1,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Attribute=2,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Text=3,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.CDATA=4,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.EntityReference=5,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Entity=6,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.ProcessingInstruction=7,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Comment=8,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Document=9,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.DocumentType=10,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.DocumentFragment=11,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Notation=12,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.Whitespace=13,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.SignificantWhitespace=14,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.EndElement=15,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.EndEntity=16,alphaTab.xml._XmlNodeType.XmlNodeType_Impl_.XmlDeclaration=17,alphaTab.xml.XmlParser.CharCodeLF=10,alphaTab.xml.XmlParser.CharCodeTab=9,alphaTab.xml.XmlParser.CharCodeCR=13,alphaTab.xml.XmlParser.CharCodeSpace=32,alphaTab.xml.XmlParser.CharCodeLowerThan=60,alphaTab.xml.XmlParser.CharCodeAmp=38,alphaTab.xml.XmlParser.CharCodeBrackedClose=93,alphaTab.xml.XmlParser.CharCodeBrackedOpen=91,alphaTab.xml.XmlParser.CharCodeGreaterThan=62,alphaTab.xml.XmlParser.CharCodeExclamation=33,alphaTab.xml.XmlParser.CharCodeUpperD=68,alphaTab.xml.XmlParser.CharCodeLowerD=100,alphaTab.xml.XmlParser.CharCodeMinus=45,alphaTab.xml.XmlParser.CharCodeQuestion=63,alphaTab.xml.XmlParser.CharCodeSlash=47,alphaTab.xml.XmlParser.CharCodeEquals=61,alphaTab.xml.XmlParser.CharCodeDoubleQuote=34,alphaTab.xml.XmlParser.CharCodeSingleQuote=39,alphaTab.xml.XmlParser.CharCodeSharp=35,alphaTab.xml.XmlParser.CharCodeLowerX=120,alphaTab.xml.XmlParser.CharCodeLowerA=97,alphaTab.xml.XmlParser.CharCodeLowerZ=122,alphaTab.xml.XmlParser.CharCodeUpperA=65,alphaTab.xml.XmlParser.CharCodeUpperZ=90,alphaTab.xml.XmlParser.CharCode0=48,alphaTab.xml.XmlParser.CharCode9=57,alphaTab.xml.XmlParser.CharCodeColon=58,alphaTab.xml.XmlParser.CharCodeDot=46,alphaTab.xml.XmlParser.CharCodeUnderscore=95,alphaTab.xml.XmlParser_XmlState.IGNORE_SPACES=0,alphaTab.xml.XmlParser_XmlState.BEGIN=1,alphaTab.xml.XmlParser_XmlState.BEGIN_NODE=2,alphaTab.xml.XmlParser_XmlState.TAG_NAME=3,alphaTab.xml.XmlParser_XmlState.BODY=4,alphaTab.xml.XmlParser_XmlState.ATTRIB_NAME=5,alphaTab.xml.XmlParser_XmlState.EQUALS=6,alphaTab.xml.XmlParser_XmlState.ATTVAL_BEGIN=7,alphaTab.xml.XmlParser_XmlState.ATTRIB_VAL=8,alphaTab.xml.XmlParser_XmlState.CHILDS=9,alphaTab.xml.XmlParser_XmlState.CLOSE=10,alphaTab.xml.XmlParser_XmlState.WAIT_END=11,alphaTab.xml.XmlParser_XmlState.WAIT_END_RET=12,alphaTab.xml.XmlParser_XmlState.PCDATA=13,alphaTab.xml.XmlParser_XmlState.HEADER=14,alphaTab.xml.XmlParser_XmlState.COMMENT=15,alphaTab.xml.XmlParser_XmlState.DOCTYPE=16,alphaTab.xml.XmlParser_XmlState.CDATA=17,alphaTab.xml.XmlParser_XmlState.ESCAPE=18,haxe.io.FPHelper.i64tmp=new haxe._Int64.___Int64(0,0),haxe.zip.InflateImpl.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1],haxe.zip.InflateImpl.LEN_BASE_VAL_TBL=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],haxe.zip.InflateImpl.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1],haxe.zip.InflateImpl.DIST_BASE_VAL_TBL=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],haxe.zip.InflateImpl.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],js.html.compat.Float32Array.BYTES_PER_ELEMENT=4,js.html.compat.Float64Array.BYTES_PER_ELEMENT=8,js.html.compat.Uint8Array.BYTES_PER_ELEMENT=1,alphaTab.Main.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/Source/AlphaTab.CSharp/AlphaTab.xml b/Source/AlphaTab.CSharp/AlphaTab.xml index 8713d0244..708babf2a 100644 --- a/Source/AlphaTab.CSharp/AlphaTab.xml +++ b/Source/AlphaTab.CSharp/AlphaTab.xml @@ -5305,5 +5305,35 @@ faster than enum + + + GeneratedInternalTypeHelper + + + + + CreateInstance + + + + + GetPropertyValue + + + + + SetPropertyValue + + + + + CreateDelegate + + + + + AddEventHandler + + diff --git a/Source/AlphaTab.JavaScript/Haxe/JSON.cs b/Source/AlphaTab.JavaScript/Haxe/JSON.cs index ec7dd0e84..e82ec1bd5 100644 --- a/Source/AlphaTab.JavaScript/Haxe/JSON.cs +++ b/Source/AlphaTab.JavaScript/Haxe/JSON.cs @@ -15,6 +15,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ + +using System; using Haxe; using Phase.Attributes; @@ -28,5 +30,7 @@ public class Json public static extern dynamic Parse(HaxeString text); [Name("stringify")] public static extern HaxeString Stringify(object value); + [Name("stringify")] + public static extern HaxeString Stringify(object value, Func replacer); } } diff --git a/Source/AlphaTab.JavaScript/Importer/Model/JsonConverter.cs b/Source/AlphaTab.JavaScript/Importer/Model/JsonConverter.cs index 8d040907b..02b5fd796 100644 --- a/Source/AlphaTab.JavaScript/Importer/Model/JsonConverter.cs +++ b/Source/AlphaTab.JavaScript/Importer/Model/JsonConverter.cs @@ -20,7 +20,8 @@ using AlphaTab.Audio.Synth.Midi.Event; using AlphaTab.Collections; using AlphaTab.Haxe; -using AlphaTab.Platform; +using Haxe.Js.Html; +using Phase; namespace AlphaTab.Model { @@ -30,7 +31,41 @@ namespace AlphaTab.Model /// class JsonConverter { - public static Score ScoreToJsObject(Score score) + /// + /// Converts the given score into a JSON encoded string. + /// + /// The score to serialize. + /// A JSON encoded string that can be used togehter with for conversion. + public static string ScoreToJson(Score score) + { + var obj = ScoreToJsObject(score); + return Json.Stringify(obj, (k, v) => + { + if (ArrayBuffer.IsView(v)) + { + return Script.Write("untyped __js__(\"Array.apply([], {0})\", v)"); + } + return v; + }); + } + + /// + /// Converts the given JSON string back to a object. + /// + /// The JSON string that was created via + /// The settings to use during conversion. + /// The converted score object. + public static Score JsonToScore(string json, Settings settings = null) + { + return JsObjectToScore(JsObjectToScore(Json.Parse(json), settings)); + } + + /// + /// Converts the score into a JavaScript object without circular dependencies. + /// + /// The score object to serialize + /// A serialized score object without ciruclar dependencies that can be used for further serializations. + public static object ScoreToJsObject(Score score) { Score score2 = Platform.Platform.NewObject(); Score.CopyTo(score, score2); @@ -194,8 +229,15 @@ public static Score ScoreToJsObject(Score score) return score2; } - public static Score JsObjectToScore(Score score, Settings settings = null) + /// + /// Converts the given JavaScript object into a score object. + /// + /// The javascript object created via + /// The settings to use during conversion. + /// The converted score object. + public static Score JsObjectToScore(object jsObject, Settings settings = null) { + Score score = jsObject.As(); var score2 = new Score(); Score.CopyTo(score, score2); RenderStylesheet.CopyTo(score.Stylesheet, score2.Stylesheet); diff --git a/Source/AlphaTab.JavaScript/Platform/JavaScript/AlphaTabWorkerScoreRenderer.cs b/Source/AlphaTab.JavaScript/Platform/JavaScript/AlphaTabWorkerScoreRenderer.cs index 121309420..25ec8d515 100644 --- a/Source/AlphaTab.JavaScript/Platform/JavaScript/AlphaTabWorkerScoreRenderer.cs +++ b/Source/AlphaTab.JavaScript/Platform/JavaScript/AlphaTabWorkerScoreRenderer.cs @@ -106,8 +106,8 @@ private void HandleWorkerMessage(Event e) public void Render(Score score, int[] trackIndexes) { - score = JsonConverter.ScoreToJsObject(score); - _worker.PostMessage(new { cmd = "alphaTab.render", score = score, trackIndexes = trackIndexes }); + var jsObject = JsonConverter.ScoreToJsObject(score); + _worker.PostMessage(new { cmd = "alphaTab.render", score = jsObject, trackIndexes = trackIndexes }); } public event Action PreRender;