!function(t){"function"!=typeofdefine&&"function"!=typeoft.Tone&&(t.define=function(){vare=arguments[arguments.length-1],i=arguments[0];"Tone/core/Tone"===i?t.Tone=e():"function"==typeofe&&e(t.Tone)})}(this),define("Tone/core/Tone",[],function(){functiont(t){returnvoid0===t}vare;if(t(window.AudioContext)&&(window.AudioContext=window.webkitAudioContext),t(window.OfflineAudioContext)&&(window.OfflineAudioContext=window.webkitOfflineAudioContext),t(AudioContext))thrownewError("Web Audio is not supported in this browser");e=newAudioContext,"function"!=typeofAudioContext.prototype.createGain&&(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),"function"!=typeofAudioContext.prototype.createDelay&&(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),"function"!=typeofAudioContext.prototype.createPeriodicWave&&(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),"function"!=typeofAudioBufferSourceNode.prototype.start&&(AudioBufferSourceNode.prototype.start=AudioBufferSourceNode.prototype.noteGrainOn),"function"!=typeofAudioBufferSourceNode.prototype.stop&&(AudioBufferSourceNode.prototype.stop=AudioBufferSourceNode.prototype.noteOff),"function"!=typeofOscillatorNode.prototype.start&&(OscillatorNode.prototype.start=OscillatorNode.prototype.noteOn),"function"!=typeofOscillatorNode.prototype.stop&&(OscillatorNode.prototype.stop=OscillatorNode.prototype.noteOff),"function"!=typeofOscillatorNode.prototype.setPeriodicWave&&(OscillatorNode.prototype.setPeriodicWave=OscillatorNode.prototype.setWaveTable),AudioNode.prototype._nativeConnect=AudioNode.prototype.connect,AudioNode.prototype.connect=function(e,i,n){if(e.input)Array.isArray(e.input)?(t(n)&&(n=0),this.connect(e.input[n])):this.connect(e.input);elsetry{einstanceofAudioNode?this._nativeConnect(e,i,n):this._nativeConnect(e,i)}catch(o){thrownewError("error connecting to node: "+e)}};vari=function(){this.input=this.context.createGain(),this.output=this.context.createGain()};i.context=e,i.prototype.context=i.context,i.prototype.bufferSize=2048,i.prototype.connect=function(t,e,i){Array.isArray(this.output)?(e=this.defaultArg(e,0),this.output[e].connect(t,0,i)):this.output.connect(t,e,i)},i.prototype.disconnect=function(){this.output.disconnect()},i.prototype.chain=function(){if(arguments.length>1)for(vart=arguments[0],e=1;e<arguments.length;e++){vari=arguments[e];t.connect(i),t=i}},i.prototype.fan=function(){vart=arguments[0];if(arguments.length>1)for(vare=1;e<arguments.length;e++){vari=arguments[e];t.connect(i)}},i.prototype.defaultArg=function(e,i){if("object"==typeofe&&"object"==typeofi){varn={};for(varoine)n[o]=this.defaultArg(e[o],e[o]);for(varsini)n[s]=this.defaultArg(e[s],i[s]);returnn}returnt(e)?i:e},i.prototype.optionsObject=function(t,e,i){varn={};if(1===t.length&&"object"==typeoft[0])n=t[0];elsefor(varo=0;o<e.length;o++)n[e[o]]=t[o];returnthis.isUndef(i)?n:this.defaultArg(n,i)},i.prototype.isUndef=t,i.prototype.equalPowerScale=function(t){vare=.5*Math.PI;returnMath.sin(t*e)},i.prototype.logScale=function(t){returnMath.max(this.normalize(this.gainToDb(t),-100,0),0)},i.prototype.expScale=function(t){returnthis.dbToGain(this.interpolate(t,-100,0))},i.prototype.dbToGain=function(t){returnMath.pow(2,t/6)},i.prototype.gainToDb=function(t){return20*(Math.log(t)/Math.LN10)},i.prototype.interpolate=function(t,e,i){returnt*(i-e)+e},i.prototype.normalize=function(t,e,i){if(e>i){varn=i;i=e,e=n}elseif(e==i)return0;return(t-e)/(i-e)},i.prototype.dispose=function(){this.isUndef(this.input)||(this.inputinstanceofAudioNode&&this.input.disconnect(),this.input=null),this.isUndef(this.output)||(this.outputinstanceofAudioNode&&this.output.disconnect(),this.output=null)};varn=null;i.prototype.noGC=function(){this.output.connect(n)},AudioNode.prototype.noGC=function(){this.connect(n)},i.prototype.now=function(){returnthis.context.currentTime},i.prototype.samplesToSeconds=function(t){returnt/this.context.sampleRate},i.prototype.toSamples=function(t){vare=this.