{"version":3,"sources":["webpack://Tone/webpack/universalModuleDefinition","webpack://Tone/webpack/bootstrap","webpack://Tone/./Tone/core/Tone.js","webpack://Tone/./Tone/shim/AudioNode.js","webpack://Tone/./Tone/core/AudioNode.js","webpack://Tone/./Tone/shim/ConstantSourceNode.js","webpack://Tone/./Tone/signal/Signal.js","webpack://Tone/./Tone/core/Gain.js","webpack://Tone/./Tone/type/Type.js","webpack://Tone/./Tone/signal/Multiply.js","webpack://Tone/./Tone/source/Source.js","webpack://Tone/./Tone/shim/WaveShaperNode.js","webpack://Tone/./Tone/signal/WaveShaper.js","webpack://Tone/./Tone/effect/Effect.js","webpack://Tone/./Tone/component/Filter.js","webpack://Tone/./Tone/component/Merge.js","webpack://Tone/./Tone/shim/AudioBuffer.js","webpack://Tone/./Tone/core/Buffer.js","webpack://Tone/./Tone/component/LFO.js","webpack://Tone/./Tone/signal/Subtract.js","webpack://Tone/./Tone/core/Param.js","webpack://Tone/./Tone/effect/StereoEffect.js","webpack://Tone/./Tone/core/Transport.js","webpack://Tone/./Tone/source/Oscillator.js","webpack://Tone/./Tone/core/Delay.js","webpack://Tone/./Tone/component/Split.js","webpack://Tone/./Tone/core/Context.js","webpack://Tone/./Tone/instrument/Instrument.js","webpack://Tone/./Tone/signal/AudioToGain.js","webpack://Tone/./Tone/component/CrossFade.js","webpack://Tone/./Tone/core/Timeline.js","webpack://Tone/./Tone/instrument/Monophonic.js","webpack://Tone/./Tone/signal/Scale.js","webpack://Tone/./Tone/component/Volume.js","webpack://Tone/./Tone/signal/Zero.js","webpack://Tone/./Tone/signal/Add.js","webpack://Tone/./Tone/signal/SignalBase.js","webpack://Tone/./Tone/component/AmplitudeEnvelope.js","webpack://Tone/./Tone/source/BufferSource.js","webpack://Tone/./Tone/effect/FeedbackEffect.js","webpack://Tone/./Tone/core/TimelineState.js","webpack://Tone/./Tone/core/Emitter.js","webpack://Tone/./Tone/shim/AnalyserNode.js","webpack://Tone/./Tone/component/Analyser.js","webpack://Tone/./Tone/source/OmniOscillator.js","webpack://Tone/./Tone/instrument/Synth.js","webpack://Tone/./Tone/source/Noise.js","webpack://Tone/./Tone/core/Master.js","webpack://Tone/./Tone/component/FrequencyEnvelope.js","webpack://Tone/./Tone/signal/ScaleExp.js","webpack://Tone/./Tone/component/Compressor.js","webpack://Tone/./Tone/shim/AudioContext.js","webpack://Tone/./Tone/type/TransportTime.js","webpack://Tone/./Tone/type/Frequency.js","webpack://Tone/./Tone/component/Envelope.js","webpack://Tone/./Tone/shim/StereoPannerNode.js","webpack://Tone/./Tone/component/Panner.js","webpack://Tone/./Tone/source/FMOscillator.js","webpack://Tone/./Tone/source/PulseOscillator.js","webpack://Tone/./Tone/event/Event.js","webpack://Tone/./Tone/component/MidSideMerge.js","webpack://Tone/./Tone/component/MidSideSplit.js","webpack://Tone/./Tone/component/LowpassCombFilter.js","webpack://Tone/./Tone/type/Ticks.js","webpack://Tone/./Tone/core/TransportEvent.js","webpack://Tone/./Tone/source/TickSource.js","webpack://Tone/./Tone/component/Follower.js","webpack://Tone/./Tone/component/FeedbackCombFilter.js","webpack://Tone/./Tone/component/MultibandSplit.js","webpack://Tone/./Tone/signal/Pow.js","webpack://Tone/./Tone/type/TimeBase.js","webpack://Tone/./Tone/type/Time.js","webpack://Tone/./Tone/shim/OscillatorNode.js","webpack://Tone/./Tone/source/OscillatorNode.js","webpack://Tone/./Tone/source/Player.js","webpack://Tone/./Tone/instrument/MonoSynth.js","webpack://Tone/./Tone/source/FatOscillator.js","webpack://Tone/./Tone/source/AMOscillator.js","webpack://Tone/./Tone/source/PWMOscillator.js","webpack://Tone/./Tone/event/Part.js","webpack://Tone/./Tone/event/Loop.js","webpack://Tone/./Tone/effect/StereoXFeedbackEffect.js","webpack://Tone/./Tone/effect/MidSideEffect.js","webpack://Tone/./Tone/effect/Convolver.js","webpack://Tone/./Tone/signal/Modulo.js","webpack://Tone/./Tone/core/OfflineContext.js","webpack://Tone/./Tone/core/Offline.js","webpack://Tone/./Tone/core/Buffers.js","webpack://Tone/./Tone/control/CtrlPattern.js","webpack://Tone/./Tone/core/TransportRepeatEvent.js","webpack://Tone/./Tone/core/IntervalTimeline.js","webpack://Tone/./Tone/signal/TickSignal.js","webpack://Tone/./Tone/core/Clock.js","webpack://Tone/./Tone/signal/GreaterThanZero.js","webpack://Tone/./Tone/signal/GreaterThan.js","webpack://Tone/./Tone/component/ScaledEnvelope.js","webpack://Tone/./Tone/signal/Abs.js","webpack://Tone/./Tone/component/Solo.js","webpack://Tone/./Tone/signal/EqualPowerGain.js","webpack://Tone/./Tone/signal/Negate.js","webpack://Tone/./Tone/component/PanVol.js","webpack://Tone/./Tone/shim/OfflineAudioContext.js","webpack://Tone/./Tone/version.js","webpack://Tone/./Tone/type/Midi.js","webpack://Tone/./Tone/source/UserMedia.js","webpack://Tone/./Tone/source/Players.js","webpack://Tone/./Tone/source/GrainPlayer.js","webpack://Tone/./Tone/signal/TransportTimelineSignal.js","webpack://Tone/./Tone/signal/Normalize.js","webpack://Tone/./Tone/signal/GainToAudio.js","webpack://Tone/./Tone/instrument/Sampler.js","webpack://Tone/./Tone/instrument/PolySynth.js","webpack://Tone/./Tone/instrument/PluckSynth.js","webpack://Tone/./Tone/instrument/NoiseSynth.js","webpack://Tone/./Tone/instrument/MetalSynth.js","webpack://Tone/./Tone/instrument/MembraneSynth.js","webpack://Tone/./Tone/instrument/FMSynth.js","webpack://Tone/./Tone/instrument/DuoSynth.js","webpack://Tone/./Tone/instrument/AMSynth.js","webpack://Tone/./Tone/event/Sequence.js","webpack://Tone/./Tone/event/Pattern.js","webpack://Tone/./Tone/effect/Vibrato.js","webpack://Tone/./Tone/effect/Tremolo.js","webpack://Tone/./Tone/effect/StereoWidener.js","webpack://Tone/./Tone/effect/StereoFeedbackEffect.js","webpack://Tone/./Tone/effect/Reverb.js","webpack://Tone/./Tone/effect/PitchShift.js","webpack://Tone/./Tone/effect/PingPongDelay.js","webpack://Tone/./Tone/effect/Phaser.js","webpack://Tone/./Tone/effect/JCReverb.js","webpack://Tone/./Tone/effect/Freeverb.js","webpack://Tone/./Tone/effect/FeedbackDelay.js","webpack://Tone/./Tone/effect/Distortion.js","webpack://Tone/./Tone/effect/Chorus.js","webpack://Tone/./Tone/effect/Chebyshev.js","webpack://Tone/./Tone/effect/BitCrusher.js","webpack://Tone/./Tone/effect/AutoWah.js","webpack://Tone/./Tone/effect/AutoPanner.js","webpack://Tone/./Tone/effect/AutoFilter.js","webpack://Tone/./Tone/core/Listener.js","webpack://Tone/./Tone/core/Draw.js","webpack://Tone/./Tone/core/Bus.js","webpack://Tone/./Tone/control/CtrlRandom.js","webpack://Tone/./Tone/control/CtrlMarkov.js","webpack://Tone/./Tone/control/CtrlInterpolate.js","webpack://Tone/./Tone/component/Waveform.js","webpack://Tone/./Tone/component/Panner3D.js","webpack://Tone/./Tone/component/MultibandCompressor.js","webpack://Tone/./Tone/component/Mono.js","webpack://Tone/./Tone/component/MidSideCompressor.js","webpack://Tone/./Tone/component/Meter.js","webpack://Tone/./Tone/component/Limiter.js","webpack://Tone/./Tone/component/Gate.js","webpack://Tone/./Tone/component/FFT.js","webpack://Tone/./Tone/component/EQ3.js","webpack://Tone/./Tone/component/Channel.js","webpack://Tone/(webpack)/buildin/global.js","webpack://Tone/./Tone/index.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_version__WEBPACK_IMPORTED_MODULE_0__","Tone","Error","toString","className","isLetter","match","sameConstructor","constructor","isFunction","dispose","set","params","isString","tmpObj","paramLoop","attr","parent","indexOf","attrSplit","split","length","splice","innerParam","join","param","isUndef","Signal","Param","AudioParam","TimeBase","_collectDefaults","ret","subRet","j","subAttr","isObject","isDefined","constr","defaults","keys","_super","superDefs","push","values","options","defaultArg","given","fallback","givenProp","fallbackProp","log","debug","global","TONE_DEBUG_CLASS","args","Array","from","arguments","unshift","console","apply","undefined","assert","statement","error","connectSeries","currentUnit","toUnit","connect","srcNode","dstNode","outputNumber","inputNumber","input","isArray","AudioNode","disconnect","bDone","forEach","e","val","isNumber","arg","isBoolean","isNote","test","noOp","_readOnly","writable","_writable","State","Started","Stopped","Paused","window","equalPowerScale","percent","piFactor","Math","PI","sin","dbToGain","db","pow","gainToDb","gain","LN10","intervalToFrequencyRatio","interval","now","context","immediate","currentTime","extend","child","TempConstructor","_audioContext","start","resume","isContext","Context","emit","setContext","ctx","sampleRate","hasAudioContext","hasPromises","Boolean","getContext","resolve","initialized","resCallback","off","on","version","__webpack_exports__","supported","testContext","OfflineAudioContext","testSrcNode","createGain","testDstNode","nativeConnect","_context","createInsOuts","inputs","outputs","output","channelCount","channelCountMode","channelInterpretation","unit","outputNum","inputNum","destination","chain","fan","AudioContext","createConstantSource","ConstantSourceNode","buffer","createBuffer","arr","getChannelData","_bufferSource","createBufferSource","loop","gainNode","_output","offset","time","stop","_constantSource","_param","units","Type","Default","convert","SignalBase","getValueAtTime","_core_Tone__WEBPACK_IMPORTED_MODULE_0__","Gain","_gainNode","Time","Frequency","TransportTime","Ticks","NormalRange","AudioRange","Decibels","Interval","BPM","Positive","Cents","Degrees","MIDI","BarsBeatsSixteenths","Samples","Hertz","Note","Milliseconds","Seconds","Notation","toSeconds","toFrequency","freq","valueOf","toTicks","Transport","ticks","Multiply","_mult","Source","_volume","Volume","volume","_state","TimelineState","memory","_synced","_scheduled","mute","state","seconds","_start","restart","_stop","duration","max","cancel","setStateAtTime","event","sched","schedule","t","bind","_syncedStart","sync","stateEvent","startOffset","_syncedStop","getSecondsAtTime","sampleTime","unsync","id","clear","_native_createWaveShaper","ua","navigator","userAgent","toLowerCase","includes","WaveShaperNode","prop","_internalNode","_curve","_defineProperty","curve","array","Float32Array","createWaveShaper","WaveShaper","mapping","bufferLen","_shaper","isFinite","setMap","len","normalized","oversample","oversampling","RangeError","Effect","_dryWet","CrossFade","wet","fade","effectSend","effectReturn","a","b","connectEffect","effect","Filter","_filters","frequency","detune","type","Q","_type","_rolloff","rolloff","TypeError","parseInt","cascadingCount","count","filter","createBiquadFilter","connectionChain","concat","getFrequencyResponse","totalResponse","map","freqValues","magValues","phaseValues","filterClone","Merge","channels","_merger","createChannelMerger","left","right","AudioBuffer","copyToChannel","src","chanNum","channel","copyFromChannel","dest","Buffer","_buffer","_reversed","reverse","_xhr","onload","url","loaded","load","then","catch","onerror","_reverse","Promise","buff","err","_removeFromDownloadQueue","abort","numberOfChannels","fromArray","isMultidimensional","toMono","toArray","outputArray","numChannels","channelArray","sample","slice","end","startSamples","floor","endSamples","replacement","rev","Emitter","mixin","_downloadQueue","baseUrl","fromUrl","request","index","matches","extensions","extension","supportsType","replace","onError","onProgress","totalProgress","progress","XMLHttpRequest","open","responseType","addEventListener","status","decodeAudioData","response","lengthComputable","total","send","cancelDownloads","document","createElement","canPlayType","removeEvents","success","fail","LFO","_oscillator","Oscillator","amplitude","_stoppedSignal","_zeros","Zero","_stoppedValue","_a2g","AudioToGain","_scaler","Scale","min","_units","phase","setValueAtTime","syncFrequency","unsyncFrequency","_toUnits","_fromUnits","_getInitialValue","currentMin","currentMax","node","Subtract","_sum","_neg","Negate","overridden","_events","Timeline","_initialValue","cancelScheduledValues","Infinity","minValue","maxValue","_minOutput","AutomationType","Linear","Exponential","Target","SetValue","Cancel","add","after","getAfter","before","initialValue","defaultValue","previousVal","previous","getBefore","_exponentialApproach","constant","_linearInterpolate","_exponentialInterpolate","setRampPoint","currentVal","cancelAndHoldAtTime","linearRampToValueAtTime","endTime","exponentialRampToValueAtTime","exponentialRampTo","rampTime","startTime","linearRampTo","targetRampTo","exponentialApproachValueAtTime","timeConstant","setTargetAtTime","setValueCurveAtTime","scaling","segTime","valueAtTime","rampTo","t0","v0","v1","exp","t1","StereoEffect","_split","Split","effectSendL","effectSendR","_merge","effectReturnL","effectReturnR","_loopStart","_loopEnd","_ppq","TransportConstructor","PPQ","_clock","Clock","callback","_processTick","_bindClockEvents","bpm","_timeSignature","timeSignature","_scheduledEvents","_timeline","_repeatedEvents","IntervalTimeline","_syncedSignals","_swingTicks","_swingAmount","transport","swing","swingSubdivision","loopStart","loopEnd","isTransport","tickTime","amount","setTicksAtTime","forEachAtTime","invoke","TransportEvent","_addEvent","scheduleRepeat","TransportRepeatEvent","scheduleOnce","once","eventId","item","timeline","remove","forEachFrom","getStateAtTime","pause","toggle","timeSig","startPosition","endPosition","setLoopPoints","toNotation","subdivision","getTicksAtTime","toBarsBeatsSixteenths","timeToTicks","round","ppq","nextSubdivision","remainingTicks","nextTickTime","syncSignal","signal","ratio","ratioSignal","initial","unsyncSignal","syncedSignal","_wave","_partials","partials","_partialCount","partialCount","_phase","Custom","baseType","Sine","Triangle","Sawtooth","Square","oscillator","OscillatorNode","setPeriodicWave","cancelStop","isBasicType","coefs","_getRealImaginary","periodicWave","createPeriodicWave","partial","exec","periodicWaveSize","fftSize","real","imag","cos","_inverseFFT","sum","twoPi","Delay","_maxDelay","maxDelay","delayTime","_delayNode","createDelay","_splitter","createChannelSplitter","AudioContextProperties","AudioContextMethods","rawContext","method","_defineMethod","_latencyHint","latencyHint","_constants","lookAhead","_computedUpdateInterval","_ticker","Ticker","clockSource","updateInterval","_timeouts","_timeoutIds","_timeoutLoop","onstatechange","master","close","closePromise","TONE_AUDIO_CONTEXT","getConstant","peek","shift","setTimeout","fn","timeout","clearTimeout","hint","con","_updateInterval","_callback","_createClock","Worker","Timeout","Offline","_createWorker","URL","webkitURL","blob","Blob","toFixed","blobUrl","createObjectURL","worker","onmessage","_worker","_createTimeout","_timeout","postMessage","_disposeClock","terminate","TONE_SILENCE_LOGGING","prefix","printString","warn","Instrument","triggerAttack","triggerRelease","_syncMethod","timePosition","originalMethod","_original_triggerAttack","_original_triggerRelease","triggerAttackRelease","note","velocity","_norm","x","initialFade","_equalPowerA","EqualPowerGain","_equalPowerB","_one","_invert","_search","diff","comparator","cancelBefore","previousEvent","beginning","midPoint","nextEvent","_iterate","lowerBound","upperBound","forEachBefore","forEachAfter","forEachBetween","Monophonic","portamento","_triggerEnvelopeAttack","setNote","_triggerEnvelopeRelease","getLevelAtTime","envelope","portTime","outputMin","outputMax","_outputMin","_outputMax","_scale","_add","Add","_setRange","_unmutedVolume","_gain","AmplitudeEnvelope","Envelope","_sig","BufferSource","onended","_startTime","_sourceStarted","_sourceStopped","_stopTime","_source","_onended","playbackRate","fadeIn","fadeOut","_onendedTimeout","fadeInTime","computedDur","fadeOutTime","additionalTail","_wasDisposed","FeedbackEffect","_feedbackGain","feedback","_initial","getLastState","getNextState","events","eventName","boundCallback","ev","eventList","functions","func","emitterFunc","AnalyserNode","getFloatTimeDomainData","uint8","Uint8Array","getByteTimeDomainData","Analyser","_analyser","createAnalyser","size","smoothing","Waveform","FFT","getValue","getFloatFrequencyData","frequencyBinCount","smoothingTimeConstant","OmniOscillator","_sourceType","OmniOscType","substr","_createNewOscillator","oscType","OscillatorConstructor","oldOsc","blockTime","SourceTypeNames","PulseOscillator","PWMOscillator","FMOscillator","AMOscillator","FatOscillator","sType","sourceType","width","spread","modulationType","mType","modulationIndex","harmonicity","modulationFrequency","Synth","attack","decay","sustain","release","Noise","_playbackRate","_noiseBuffers","rate","random","_noiseCache","pink","channelNum","b0","b1","b2","b3","b4","b5","b6","white","brown","lastOut","Master","isMaster","toMaster","MasterConstructor","FrequencyEnvelope","ScaledEnvelope","_octaves","octaves","baseFrequency","exponent","_exp","ScaleExp","Pow","Compressor","_compressor","createDynamicsCompressor","threshold","knee","webkitAudioContext","suspend","source","createGainNode","createDelayNode","decodeAudioDataPromise","offlineContext","audioData","Uint32Array","_native_decodeAudioData","_now","_expressions","assign","midi","regexp","_defaultUnits","mtof","pitch","octave","noteNumber","noteToScaleIndex","tr","q","_beatsToUnits","_getTimeSignature","parseFloat","transpose","harmonize","intervals","toMidi","ftom","toNote","log2","A4","scaleIndexToNote","quarterTime","quarters","_noArg","_frequencyToUnits","_ticksToUnits","beats","_secondsToUnits","cbb","cb","c#","cx","dbb","d#","dx","ebb","eb","e#","ex","fbb","fb","f","f#","fx","gbb","gb","g","g#","gx","abb","ab","a#","ax","bbb","bb","b#","bx","_attackCurve","_releaseCurve","attackCurve","releaseCurve","decayCurve","_getCurve","direction","_setCurve","curveDef","_decayCurve","currentValue","decayValue","decayStart","k","cosineCurve","rippleCurve","curveLen","sineWave","stairsCurve","ceil","sineCurve","bounceCurve","abs","invertCurve","out","linear","exponential","bounce","In","Out","cosine","step","ripple","sine","createStereoPanner","StereoPannerNode","pan","rightWaveShaper","leftWaveShaper","leftGain","rightGain","merge","Panner","_panner","_carrier","_modulator","_modulationNode","_widthGate","_sawtooth","_thresh","Event","_loop","_startOffset","_probability","probability","_humanize","humanize","_rescheduleEvents","startTick","_getLoopDuration","_tick","prob","variation","reschedulTime","lastEvent","loopDuration","MidSideMerge","mid","_left","_timesTwoLeft","SQRT1_2","side","_right","_timesTwoRight","MidSideSplit","_midAdd","_sideSubtract","LowpassCombFilter","_combFilter","FeedbackCombFilter","resonance","_lowpass","dampening","_getPPQ","_getBpm","_eventId","_once","TickSource","TickSignal","_tickOffset","stopEvent","tmpEvent","lastState","elapsedTicks","periodStartTime","offsetEvent","elapsedSeconds","getDurationOfTicks","getTimeOfTick","tick","absoluteTicks","forEachTickBetween","lastStateEvent","startTicks","Follower","_abs","Abs","_filter","_sub","_delay","_smoothing","_feedback","MultibandSplit","low","_lowMidFilter","high","lowFrequency","highFrequency","_expScaler","_expFunc","_val","charAt","dot","scalar","hz","samples","default","trim","typeName","quantity","expr","matching","toSamples","toMilliseconds","quantize","capture","quantTo","subdiv","testNotations","power","closest","closestSeconds","notation","notationSeconds","measures","sixteenths","setWaveTable","createWaveTable","createOscillator","Player","autostart","_onload","_activeSources","_onSourceEnd","computedDuration","seek","MonoSynth","filterEnvelope","_oscillators","_spread","_forEach","osc","iterator","_modulationScale","_pulse","Part","_startNote","at","_restartEvent","removeAll","_setAll","_testLoopBoundries","Loop","_event","iterations","iters","StereoXFeedbackEffect","_feedbackLR","_feedbackRL","MidSideEffect","_midSideSplit","_midSideMerge","midSend","sideSend","midReturn","sideReturn","Convolver","_convolver","createConvolver","normalize","norm","Modulo","modulus","_multiply","_subtract","_modSignal","_setWaveShaper","mod","OfflineContext","_duration","_currentTime","render","startRendering","originalContext","Buffers","urls","key","_buffers","_loadingCount","_bufferLoaded","has","isLoaded","buffName","CtrlPattern","_shuffled","_direction","Up","Down","UpDown","DownUp","AlternateUp","AlternateDown","Random","RandomWalk","RandomOnce","_shuffleValues","next","copy","randVal","_interval","_currentId","_nextId","_nextTick","_boundRestart","_restart","_createEvents","_boundCreateEvents","_root","_length","IntervalNode","insert","updateHeight","updateMax","_rebalance","results","search","_removeNode","_setRoot","_replaceNodeInParent","isLeftChild","temp","getBalance","_rotateLeft","pivotNode","_rotateRight","balance","allNodes","traverse","searchAfter","height","point","_wrapScheduleMethods","ticksUntilTime","_getTicksUntilEvent","prevEvent","segments","rampVal","segmentDur","val0","val1","currentTick","delta","sqrt","sol1","ticksToTime","when","endTicks","_tickSource","_lastUpdate","_boundLoop","GreaterThanZero","GreaterThan","_gtz","Solo","_soloBind","_soloed","solo","_isSoloed","_addSolo","_removeSolo","_currentSolo","_noSolos","_eqPower","PanVol","webkitOfflineAudioContext","_native_startRendering","done","oncomplete","renderedBuffer","Midi","UserMedia","_mediaStream","_stream","_device","labelOrId","enumerateDevices","devices","device","find","label","deviceId","constraints","audio","echoCancellation","noiseSuppression","mozNoiseSuppression","mediaDevices","getUserMedia","stream","createMediaStreamSource","getAudioTracks","track","kind","active","groupId","Players","_players","_fadeIn","_fadeOut","player","playing","playerName","stopAll","GrainPlayer","grainSize","_grainSize","_overlap","overlap","_onstop","_offset","TransportTimelineSignal","_outputSig","_lastVal","_onTick","_bindAnchorValue","_anchorValue","_syncedCallback","Normalize","inputMin","inputMax","_inputMin","_inputMax","_div","GainToAudio","Sampler","urlMap","isNaN","_findClosest","notes","difference","closestNote","releaseAll","sources","PolySynth","polyphony","MAX_POLYPHONY","voices","v","voice","_getClosestVoice","sameNote","sort","aLevel","bLevel","PluckSynth","_noise","attackNoise","_lfcf","delayAmount","NoiseSynth","noise","inharmRatios","MetalSynth","_freqMultipliers","_amplitue","_highpass","_filterFreqScaler","mult","vel","octs","MembraneSynth","pitchDecay","maxNote","FMSynth","carrier","modulator","modulation","modulationEnvelope","DuoSynth","voice0","voice1","_vibrato","vibratoRate","_vibratoGain","vibratoAmount","AMSynth","Sequence","_subdivision","_indexTime","subSubdivision","Pattern","_pattern","pattern","vals","Vibrato","_lfo","depth","Tremolo","_lfoL","_lfoR","_amplitudeL","_amplitudeR","delay","StereoWidener","_twoTimesWidthMid","_twoTimesWidthSide","_midMult","_oneMinusWidth","_sideMult","StereoFeedbackEffect","_feedbackL","_feedbackR","Reverb","preDelay","generate","noiseL","noiseR","PitchShift","_frequency","_delayA","_lfoA","_delayB","_lfoB","_crossFade","_crossFadeLFO","_feedbackDelay","_pitch","_windowSize","windowSize","factor","PingPongDelay","_leftDelay","maxDelayTime","_rightDelay","_rightPreDelay","Phaser","_baseFrequency","_filtersL","_makeFilters","stages","_filtersR","connectToFreq","filters","combFilterDelayTimes","combFilterResonances","allpassFilterFreqs","JCReverb","roomSize","_scaleRoomSize","_allpassFilters","_feedbackCombFilters","af","allpass","cf","fbcf","apf","combFilterTunings","allpassFilterFrequencies","Freeverb","_combFilters","_allpassFiltersL","_allpassFiltersR","allpassL","allpassR","lfpf","al","ar","FeedbackDelay","Distortion","_distortion","distortion","deg","Chorus","_depth","_delayTime","_delayNodeL","_delayNodeR","deviation","Chebyshev","_order","order","_getCoefficient","degree","memo","BitCrusher","invStepSize","bits","_modulo","_bits","AutoWah","follower","_sweepRange","_inputBoost","_bandpass","_peaking","_setSweepRange","sensitivity","baseFreq","sensitivy","AutoPanner","AutoFilter","oct","Listener","_orientation","_position","ListenerConstructor","positionX","positionY","positionZ","forwardX","forwardY","forwardZ","upX","upY","upZ","isListener","_rampTimeConstant","setPosition","y","z","listener","setOrientation","pos","Draw","expiration","anticipation","_boundDrawLoop","_drawLoop","requestAnimationFrame","Buses","channelName","sendKnob","receive","buses","CtrlRandom","integer","rand","CtrlMarkov","distribution","_getProbDistribution","dist","chosen","needsNormalizing","option","CtrlInterpolate","lowerPosition","lower","upper","_interpolate","retArray","retObj","_toNumber","Panner3D","createPanner","panningModel","maxDistance","distanceModel","coneOuterGain","coneOuterAngle","coneInnerAngle","refDistance","rolloffFactor","orientationX","orientationY","orientationZ","_aliasProperty","MultibandCompressor","Mono","MidSideCompressor","Meter","_rms","getLevel","totalSquared","rms","Limiter","Gate","_follower","_gt","thresh","smoothingTime","EQ3","_multibandSplit","_lowGain","_midGain","_highGain","Channel","_solo","_panVol","muted","Function","eval"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,KAAAD,IAEAD,EAAA,KAAAC,IARA,CASC,oBAAAK,UAAAC,KAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAR,QAGA,IAAAC,EAAAK,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAV,YAUA,OANAW,EAAAH,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAS,GAAA,EAGAT,EAAAD,QA2CA,OAtCAO,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAf,EAAAgB,EAAAC,GACAV,EAAAW,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAxB,GACAmB,OAAAC,eAAApB,EAAA,cAAiDyB,OAAA,KAIjDlB,EAAAmB,EAAA,SAAAzB,GACA,IAAAgB,EAAAhB,KAAA0B,WACA,WAA2B,OAAA1B,EAAA,SAC3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,EAAA,KACAA,EAAA,IACAA,EAAA,KACAA,EAAA,KACAA,EAAA,IACAA,EAAA,KACAA,EAAA,KACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,KACAA,EAAA,KACAA,EAAA,KACAA,EAAA,KACAA,EAAA,KACAA,EAAA,IACAA,EAAA,KACAA,EAAA,KACAA,EAAA,IACAA,EAAA,IACAA,EAAA,KACAA,EAAA,KACAA,EAAA,KACAA,EAAA,KACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,KACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,GACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,GACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,GACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,GACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,IACAA,EAAA,GACAN,EAAAD,QAAAO,EAAA,GAAAogC","file":"Tone.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Tone\"] = factory();\n\telse\n\t\troot[\"Tone\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 148);\n","/**\n * Tone.js\n * @author Yotam Mann\n * @license http://opensource.org/licenses/MIT MIT License\n * @copyright 2014-2019 Yotam Mann\n */\nimport version from \"../version\";\n\n///////////////////////////////////////////////////////////////////////////\n//\tTONE\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * @class Tone is the base class of all other classes.\n * @constructor\n */\nvar Tone = function(){\n\tif (!(this instanceof Tone)){\n\t\tthrow new Error(\"constructor needs to be called with the 'new' keyword\");\n\t}\n};\n\n/**\n * @memberOf Tone#\n * @returns {String} returns the name of the class as a string\n */\nTone.prototype.toString = function(){\n\tfor (var className in Tone){\n\t\tvar isLetter = className[0].match(/^[A-Z]$/);\n\t\tvar sameConstructor = Tone[className] === this.constructor;\n\t\tif (Tone.isFunction(Tone[className]) && isLetter && sameConstructor){\n\t\t\treturn className;\n\t\t}\n\t}\n\treturn \"Tone\";\n};\n\n/**\n * @memberOf Tone#\n * disconnect and dispose\n * @returns {Tone} this\n */\nTone.prototype.dispose = function(){\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tGET/SET\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Set the parameters at once. Either pass in an\n * object mapping parameters to values, or to set a\n * single parameter, by passing in a string and value.\n * The last argument is an optional ramp time which\n * will ramp any signal values to their destination value\n * over the duration of the rampTime.\n * @param {Object|String} params\n * @param {Number=} value\n * @returns {Tone} this\n * @memberOf Tone#\n * @example\n * //set values using an object\n * filter.set({\n * \t\"frequency\" : 300,\n * \t\"type\" : highpass\n * });\n * @example\n * filter.set(\"type\", \"highpass\");\n * @example\n * //ramp to the value 220 over 3 seconds.\n * oscillator.set({\n * \t\"frequency\" : 220\n * }, 3);\n */\nTone.prototype.set = function(params, value){\n\tif (Tone.isString(params)){\n\t\tvar tmpObj = {};\n\t\ttmpObj[params] = value;\n\t\tparams = tmpObj;\n\t}\n\n\tparamLoop:\n\tfor (var attr in params){\n\t\tvalue = params[attr];\n\t\tvar parent = this;\n\t\tif (attr.indexOf(\".\") !== -1){\n\t\t\tvar attrSplit = attr.split(\".\");\n\t\t\tfor (var i = 0; i < attrSplit.length - 1; i++){\n\t\t\t\tparent = parent[attrSplit[i]];\n\t\t\t\tif (parent instanceof Tone){\n\t\t\t\t\tattrSplit.splice(0, i+1);\n\t\t\t\t\tvar innerParam = attrSplit.join(\".\");\n\t\t\t\t\tparent.set(innerParam, value);\n\t\t\t\t\tcontinue paramLoop;\n\t\t\t\t}\n\t\t\t}\n\t\t\tattr = attrSplit[attrSplit.length - 1];\n\t\t}\n\t\tvar param = parent[attr];\n\t\tif (Tone.isUndef(param)){\n\t\t\tcontinue;\n\t\t}\n\t\tif ((Tone.Signal && param instanceof Tone.Signal) ||\n\t\t\t(Tone.Param && param instanceof Tone.Param)){\n\t\t\tif (param.value !== value){\n\t\t\t\tparam.value = value;\n\t\t\t}\n\t\t} else if (param instanceof AudioParam){\n\t\t\tif (param.value !== value){\n\t\t\t\tparam.value = value;\n\t\t\t}\n\t\t} else if (Tone.TimeBase && param instanceof Tone.TimeBase){\n\t\t\tparent[attr] = value;\n\t\t} else if (param instanceof Tone){\n\t\t\tparam.set(value);\n\t\t} else if (param !== value){\n\t\t\tparent[attr] = value;\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Get the object's attributes. Given no arguments get\n * will return all available object properties and their corresponding\n * values. Pass in a single attribute to retrieve or an array\n * of attributes. The attribute strings can also include a \".\"\n * to access deeper properties.\n * @memberOf Tone#\n * @example\n * osc.get();\n * //returns {\"type\" : \"sine\", \"frequency\" : 440, ...etc}\n * @example\n * osc.get(\"type\");\n * //returns { \"type\" : \"sine\"}\n * @example\n * //use dot notation to access deep properties\n * synth.get([\"envelope.attack\", \"envelope.release\"]);\n * //returns {\"envelope\" : {\"attack\" : 0.2, \"release\" : 0.4}}\n * @param {Array=|string|undefined} params the parameters to get, otherwise will return\n * \t\t\t\t\t all available.\n * @returns {Object}\n */\nTone.prototype.get = function(params){\n\tif (Tone.isUndef(params)){\n\t\tparams = this._collectDefaults(this.constructor);\n\t} else if (Tone.isString(params)){\n\t\tparams = [params];\n\t}\n\tvar ret = {};\n\tfor (var i = 0; i < params.length; i++){\n\t\tvar attr = params[i];\n\t\tvar parent = this;\n\t\tvar subRet = ret;\n\t\tif (attr.indexOf(\".\") !== -1){\n\t\t\tvar attrSplit = attr.split(\".\");\n\t\t\tfor (var j = 0; j < attrSplit.length - 1; j++){\n\t\t\t\tvar subAttr = attrSplit[j];\n\t\t\t\tsubRet[subAttr] = subRet[subAttr] || {};\n\t\t\t\tsubRet = subRet[subAttr];\n\t\t\t\tparent = parent[subAttr];\n\t\t\t}\n\t\t\tattr = attrSplit[attrSplit.length - 1];\n\t\t}\n\t\tvar param = parent[attr];\n\t\tif (Tone.isObject(params[attr])){\n\t\t\tsubRet[attr] = param.get();\n\t\t} else if (Tone.Signal && param instanceof Tone.Signal){\n\t\t\tsubRet[attr] = param.value;\n\t\t} else if (Tone.Param && param instanceof Tone.Param){\n\t\t\tsubRet[attr] = param.value;\n\t\t} else if (param instanceof AudioParam){\n\t\t\tsubRet[attr] = param.value;\n\t\t} else if (param instanceof Tone){\n\t\t\tsubRet[attr] = param.get();\n\t\t} else if (!Tone.isFunction(param) && Tone.isDefined(param)){\n\t\t\tsubRet[attr] = param;\n\t\t}\n\t}\n\treturn ret;\n};\n\n/**\n * collect all of the default attributes in one\n * @private\n * @param {Function} constr the constructor to find the defaults from\n * @return {Array} all of the attributes which belong to the class\n */\nTone.prototype._collectDefaults = function(constr){\n\tvar ret = [];\n\tif (Tone.isDefined(constr.defaults)){\n\t\tret = Object.keys(constr.defaults);\n\t}\n\tif (Tone.isDefined(constr._super)){\n\t\tvar superDefs = this._collectDefaults(constr._super);\n\t\t//filter out repeats\n\t\tfor (var i = 0; i < superDefs.length; i++){\n\t\t\tif (ret.indexOf(superDefs[i]) === -1){\n\t\t\t\tret.push(superDefs[i]);\n\t\t\t}\n\t\t}\n\t}\n\treturn ret;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tDEFAULTS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * @memberOf Tone\n * @param {Array} values The arguments array\n * @param {Array} keys The names of the arguments\n * @param {Function|Object} constr The class constructor\n * @return {Object} An object composed of the defaults between the class' defaults\n * and the passed in arguments.\n */\nTone.defaults = function(values, keys, constr){\n\tvar options = {};\n\tif (values.length === 1 && Tone.isObject(values[0])){\n\t\toptions = values[0];\n\t} else {\n\t\tfor (var i = 0; i < keys.length; i++){\n\t\t\toptions[keys[i]] = values[i];\n\t\t}\n\t}\n\tif (Tone.isDefined(constr.defaults)){\n\t\treturn Tone.defaultArg(options, constr.defaults);\n\t} else if (Tone.isObject(constr)){\n\t\treturn Tone.defaultArg(options, constr);\n\t} else {\n\t\treturn options;\n\t}\n};\n\n/**\n * If the `given` parameter is undefined, use the `fallback`.\n * If both `given` and `fallback` are object literals, it will\n * return a deep copy which includes all of the parameters from both\n * objects. If a parameter is undefined in given, it will return\n * the fallback property.\n *
\n * WARNING: if object is self referential, it will go into an an\n * infinite recursive loop.\n * @memberOf Tone\n * @param {*} given\n * @param {*} fallback\n * @return {*}\n */\nTone.defaultArg = function(given, fallback){\n\tif (Tone.isObject(given) && Tone.isObject(fallback)){\n\t\tvar ret = {};\n\t\t//make a deep copy of the given object\n\t\tfor (var givenProp in given){\n\t\t\tret[givenProp] = Tone.defaultArg(fallback[givenProp], given[givenProp]);\n\t\t}\n\t\tfor (var fallbackProp in fallback){\n\t\t\tret[fallbackProp] = Tone.defaultArg(given[fallbackProp], fallback[fallbackProp]);\n\t\t}\n\t\treturn ret;\n\t} else {\n\t\treturn Tone.isUndef(given) ? fallback : given;\n\t}\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tDEBUGGING\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Print the outputs to the console log for debugging purposes. \n * Prints the contents only if either the object has a property\n * called `debug` set to true, or a variable called TONE_DEBUG_CLASS\n * is set to the name of the class. \n * @example\n * //prints all logs originating from Tone.OscillatorNode\n * Tone.global.TONE_DEBUG_CLASS = \"OscillatorNode\"\n * @param {*} args Any arguments to print to the console.\n * @private\n */\nTone.prototype.log = function(){\n\t//if the object is either set to debug = true\n\t//or if there is a string on the Tone.global.with the class name\n\tif (this.debug || this.toString() === Tone.global.TONE_DEBUG_CLASS){\n\t\tvar args = Array.from(arguments);\n\t\targs.unshift(this.toString()+\":\");\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.log.apply(undefined, args);\n\t}\n};\n\n/**\n * Assert that the statement is true, otherwise invoke the error. \n * @param {Boolean} statement\n * @param {String} error The message which is passed into an Error\n * @private\n */\nTone.prototype.assert = function(statement, error){\n\tif (!statement){\n\t\tthrow new Error(error);\n\t}\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tCONNECTIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * connect together all of the arguments in series\n * @param {...(AudioParam|Tone|AudioNode)} nodes\n * @returns {Tone}\n * @memberOf Tone\n * @static\n */\nTone.connectSeries = function(){\n\tvar currentUnit = arguments[0];\n\tfor (var i = 1; i < arguments.length; i++){\n\t\tvar toUnit = arguments[i];\n\t\tTone.connect(currentUnit, toUnit);\n\t\tcurrentUnit = toUnit;\n\t}\n\treturn Tone;\n};\n\n/**\n * Connect two nodes together so that signal flows from the \n * first node to the second. The second node can be an AudioParam. \n * Optionally specific the input and output channels. \n * @param {(AudioNode|Tone.AudioNode)} srcNode The source node\n * @param {(AudioNode|Tone.AudioNode|AudioParam|Tone.AudioParam)} dstNode The destination node\n * @param {number} [outputNumber=0] The output channel of the srcNode\n * @param {number} [inputNumber=0] The input channel of the dstNode\n */\nTone.connect = function(srcNode, dstNode, outputNumber, inputNumber){\n\t\n\t//resolve the input of the dstNode\n\twhile (Tone.isDefined(dstNode.input)){\n\t\tif (Tone.isArray(dstNode.input)){\n\t\t\tinputNumber = Tone.defaultArg(inputNumber, 0);\n\t\t\tdstNode = dstNode.input[inputNumber];\n\t\t\tinputNumber = 0;\n\t\t} else if (dstNode.input){\n\t\t\tdstNode = dstNode.input;\n\t\t}\n\t}\n\n\t//make the connection\n\tif (dstNode instanceof AudioParam){\n\t\tsrcNode.connect(dstNode, outputNumber);\n\t} else if (dstNode instanceof AudioNode){\n\t\tsrcNode.connect(dstNode, outputNumber, inputNumber);\n\t}\n\n\treturn Tone;\n};\n\n/**\n * Disconnect a node from all nodes or optionally include a destination node and input/output channels.\n * @param {(AudioNode|Tone.AudioNode)} srcNode The source node\n * @param {?(AudioNode|Tone.AudioNode|AudioParam|Tone.AudioParam)} dstNode The destination node\n * @param {?number} [outputNumber=0] The output channel of the srcNode\n * @param {?number} [inputNumber=0] The input channel of the dstNode\n */\nTone.disconnect = function(srcNode, dstNode, outputNumber, inputNumber){\n\tif (dstNode){\n\t\t//resolve the input of the dstNode\n\t\tvar bDone = false;\n\t\twhile (!bDone){\n\t\t\tif (Tone.isArray(dstNode.input)){\n\t\t\t\tif (Tone.isDefined(inputNumber)){\n\t\t\t\t\tTone.disconnect(srcNode, dstNode.input[inputNumber], outputNumber);\n\t\t\t\t} else {\n\t\t\t\t\tdstNode.input.forEach(function(dstNode){\n\t\t\t\t\t\t//ignore errors from connections that aren't there\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTone.disconnect(srcNode, dstNode, outputNumber);\n\t\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbDone = true;\n\t\t\t} else if (dstNode.input){\n\t\t\t\tdstNode = dstNode.input;\n\t\t\t} else {\n\t\t\t\tbDone = true;\n\t\t\t}\n\t\t}\n\t\n\t\t//make the connection\n\t\tif (dstNode instanceof AudioParam){\n\t\t\tsrcNode.disconnect(dstNode, outputNumber);\n\t\t} else if (dstNode instanceof AudioNode){\n\t\t\tsrcNode.disconnect(dstNode, outputNumber, inputNumber);\n\t\t}\n\t} else {\n\t\tsrcNode.disconnect();\n\t}\n\n\treturn Tone;\n};\n\n///////////////////////////////////////////////////////////////////////////\n// TYPE CHECKING\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Test if the arg is undefined\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is undefined\n * @static\n * @memberOf Tone\n */\nTone.isUndef = function(val){\n\treturn typeof val === \"undefined\";\n};\n\n/**\n * Test if the arg is not undefined\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is undefined\n * @static\n * @memberOf Tone\n */\nTone.isDefined = function(val){\n\treturn !Tone.isUndef(val);\n};\n\n/**\n * Test if the arg is a function\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is a function\n * @static\n * @memberOf Tone\n */\nTone.isFunction = function(val){\n\treturn typeof val === \"function\";\n};\n\n/**\n * Test if the argument is a number.\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is a number\n * @static\n * @memberOf Tone\n */\nTone.isNumber = function(arg){\n\treturn (typeof arg === \"number\");\n};\n\n/**\n * Test if the given argument is an object literal (i.e. `{}`);\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is an object literal.\n * @static\n * @memberOf Tone\n */\nTone.isObject = function(arg){\n\treturn (Object.prototype.toString.call(arg) === \"[object Object]\" && arg.constructor === Object);\n};\n\n/**\n * Test if the argument is a boolean.\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is a boolean\n * @static\n * @memberOf Tone\n */\nTone.isBoolean = function(arg){\n\treturn (typeof arg === \"boolean\");\n};\n\n/**\n * Test if the argument is an Array\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is an array\n * @static\n * @memberOf Tone\n */\nTone.isArray = function(arg){\n\treturn (Array.isArray(arg));\n};\n\n/**\n * Test if the argument is a string.\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is a string\n * @static\n * @memberOf Tone\n */\nTone.isString = function(arg){\n\treturn (typeof arg === \"string\");\n};\n\n/**\n * Test if the argument is in the form of a note in scientific pitch notation.\n * e.g. \"C4\"\n * @param {*} arg the argument to test\n * @returns {Boolean} true if the arg is a string\n * @static\n * @memberOf Tone\n */\nTone.isNote = function(arg){\n\treturn Tone.isString(arg) && /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(arg);\n};\n\n/**\n * An empty function.\n * @static\n */\nTone.noOp = function(){};\n\n/**\n * Make the property not writable. Internal use only.\n * @private\n * @param {String} property the property to make not writable\n */\nTone.prototype._readOnly = function(property){\n\tif (Array.isArray(property)){\n\t\tfor (var i = 0; i < property.length; i++){\n\t\t\tthis._readOnly(property[i]);\n\t\t}\n\t} else {\n\t\tObject.defineProperty(this, property, {\n\t\t\t\"writable\" : false,\n\t\t\t\"enumerable\" : true,\n\t\t});\n\t}\n};\n\n/**\n * Make an attribute writeable. Interal use only.\n * @private\n * @param {String} property the property to make writable\n */\nTone.prototype._writable = function(property){\n\tif (Array.isArray(property)){\n\t\tfor (var i = 0; i < property.length; i++){\n\t\t\tthis._writable(property[i]);\n\t\t}\n\t} else {\n\t\tObject.defineProperty(this, property, {\n\t\t\t\"writable\" : true,\n\t\t});\n\t}\n};\n\n/**\n * Possible play states.\n * @enum {String}\n */\nTone.State = {\n\t\"Started\" : \"started\",\n\t\"Stopped\" : \"stopped\",\n\t\"Paused\" : \"paused\",\n};\n\n/**\n * A reference to the global context, `global` or `Tone.global.\n */\nTone.global = Tone.isUndef(global) ? window : global;\n\n///////////////////////////////////////////////////////////////////////////\n// CONVERSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Equal power gain scale. Good for cross-fading.\n * @param {NormalRange} percent (0-1)\n * @return {Number} output gain (0-1)\n * @static\n * @memberOf Tone\n */\nTone.equalPowerScale = function(percent){\n\tvar piFactor = 0.5 * Math.PI;\n\treturn Math.sin(percent * piFactor);\n};\n\n/**\n * Convert decibels into gain.\n * @param {Decibels} db\n * @return {Number}\n * @static\n * @memberOf Tone\n */\nTone.dbToGain = function(db){\n\treturn Math.pow(10, db / 20);\n};\n\n/**\n * Convert gain to decibels.\n * @param {Number} gain (0-1)\n * @return {Decibels}\n * @static\n * @memberOf Tone\n */\nTone.gainToDb = function(gain){\n\treturn 20 * (Math.log(gain) / Math.LN10);\n};\n\n/**\n * Convert an interval (in semitones) to a frequency ratio.\n * @param {Interval} interval the number of semitones above the base note\n * @return {Number} the frequency ratio\n * @static\n * @memberOf Tone\n * @example\n * tone.intervalToFrequencyRatio(0); // 1\n * tone.intervalToFrequencyRatio(12); // 2\n * tone.intervalToFrequencyRatio(-12); // 0.5\n */\nTone.intervalToFrequencyRatio = function(interval){\n\treturn Math.pow(2, (interval/12));\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tTIMING\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Return the current time of the AudioContext clock plus\n * the lookAhead.\n * @return {Number} the currentTime from the AudioContext\n * @memberOf Tone#\n */\nTone.prototype.now = function(){\n\treturn Tone.context.now();\n};\n\n/**\n * Return the current time of the AudioContext clock plus\n * the lookAhead.\n * @return {Number} the currentTime from the AudioContext\n * @static\n * @memberOf Tone\n */\nTone.now = function(){\n\treturn Tone.context.now();\n};\n\n/**\n * Return the current time of the AudioContext clock without\n * any lookAhead.\n * @return {Number} the currentTime from the AudioContext\n * @memberOf Tone#\n */\nTone.prototype.immediate = function(){\n\treturn Tone.context.currentTime;\n};\n\n/**\n * Return the current time of the AudioContext clock without\n * any lookAhead.\n * @return {Number} the currentTime from the AudioContext\n * @memberOf Tone\n */\nTone.immediate = function(){\n\treturn Tone.context.currentTime;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tINHERITANCE\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * have a child inherit all of Tone's (or a parent's) prototype\n * to inherit the parent's properties, make sure to call\n * Parent.call(this) in the child's constructor\n *\n * based on closure library's inherit function\n *\n * @memberOf Tone\n * @static\n * @param {Function} \tchild\n * @param {Function=} parent (optional) parent to inherit from\n * if no parent is supplied, the child\n * will inherit from Tone\n */\nTone.extend = function(child, parent){\n\tif (Tone.isUndef(parent)){\n\t\tparent = Tone;\n\t}\n\tfunction TempConstructor(){}\n\tTempConstructor.prototype = parent.prototype;\n\tchild.prototype = new TempConstructor();\n\t/** @override */\n\tchild.prototype.constructor = child;\n\tchild._super = parent;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tCONTEXT\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * The shared AudioContext\n * @type {Tone.Context}\n * @private\n */\nTone._audioContext = null;\n\n/**\n * \tMost browsers will not play _any_ audio until a user \n * \tclicks something (like a play button). Invoke this method\n * \ton a click or keypress event handler to start the audio context. \n * \tMore about the Autoplay policy [here](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio)\n * @memberOf Tone\n * @static\n * @return {Promise} This promise is resolved when the audio context is started. \n * @example\n * document.querySelector('#playbutton').addEventListener('click', () => Tone.start())\n */\nTone.start = function(){\n\treturn Tone.context.resume();\n};\n\n/**\n * A static pointer to the audio context accessible as Tone.context.\n * @type {Tone.Context}\n * @name context\n * @memberOf Tone\n */\nObject.defineProperty(Tone, \"context\", {\n\t\"get\" : function(){\n\t\treturn Tone._audioContext;\n\t},\n\t\"set\" : function(context){\n\t\tif (context.isContext){\n\t\t\tTone._audioContext = context;\n\t\t} else {\n\t\t\tTone._audioContext = new Tone.Context(context);\n\t\t}\n\t\t//initialize the new audio context\n\t\tTone.Context.emit(\"init\", Tone._audioContext);\n\t}\n});\n\n/**\n * The AudioContext\n * @type {Tone.Context}\n * @name context\n * @memberOf Tone#\n * @readOnly\n */\nObject.defineProperty(Tone.prototype, \"context\", {\n\t\"get\" : function(){\n\t\treturn Tone.context;\n\t}\n});\n\n/**\n * Tone automatically creates a context on init, but if you are working\n * with other libraries which also create an AudioContext, it can be\n * useful to set your own. If you are going to set your own context,\n * be sure to do it at the start of your code, before creating any objects.\n * @static\n * @param {AudioContext} ctx The new audio context to set\n */\nTone.setContext = function(ctx){\n\tTone.context = ctx;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tATTRIBUTES\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * The number of seconds of 1 processing block (128 samples)\n * @type {Number}\n * @name blockTime\n * @memberOf Tone\n * @static\n * @readOnly\n */\nObject.defineProperty(Tone.prototype, \"blockTime\", {\n\t\"get\" : function(){\n\t\treturn 128 / this.context.sampleRate;\n\t}\n});\n\n/**\n * The duration in seconds of one sample.\n * @type {Number}\n * @name sampleTime\n * @memberOf Tone\n * @static\n * @readOnly\n */\nObject.defineProperty(Tone.prototype, \"sampleTime\", {\n\t\"get\" : function(){\n\t\treturn 1 / this.context.sampleRate;\n\t}\n});\n\n/**\n * Whether or not all the technologies that Tone.js relies on are supported by the current browser.\n * @type {Boolean}\n * @name supported\n * @memberOf Tone\n * @readOnly\n * @static\n */\nObject.defineProperty(Tone, \"supported\", {\n\t\"get\" : function(){\n\t\tvar hasAudioContext = Tone.global.hasOwnProperty(\"AudioContext\") || Tone.global.hasOwnProperty(\"webkitAudioContext\");\n\t\tvar hasPromises = Tone.global.hasOwnProperty(\"Promise\");\n\t\treturn hasAudioContext && hasPromises;\n\t}\n});\n\n/**\n * Boolean value if the audio context has been initialized.\n * @type {Boolean}\n * @memberOf Tone\n * @static\n * @name initialized\n * @readOnly\n */\nObject.defineProperty(Tone, \"initialized\", {\n\t\"get\" : function(){\n\t\treturn Boolean(Tone.context);\n\t}\n});\n\n/**\n * Get the context when it becomes available\n * @param {Function} resolve Callback when the context is initialized\n * @return {Tone}\n */\nTone.getContext = function(resolve){\n\tif (Tone.initialized){\n\t\tresolve(Tone.context);\n\t} else {\n\t\tvar resCallback = function(){\n\t\t\tresolve(Tone.context);\n\t\t\tTone.Context.off(\"init\", resCallback);\n\t\t};\n\t\tTone.Context.on(\"init\", resCallback);\n\t}\n\treturn Tone;\n};\n\n/**\n * The version number\n * @type {String}\n * @static\n */\nTone.version = version;\n\nexport default Tone;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * Makes sure that connect returns the dst node\n * @private\n */\nif (Tone.supported){\n\tvar testContext = new OfflineAudioContext(2, 1, 44100);\n\tvar testSrcNode = testContext.createGain();\n\tvar testDstNode = testContext.createGain();\n\tif (testSrcNode.connect(testDstNode) !== testDstNode){\n\t\tvar nativeConnect = AudioNode.prototype.connect;\n\t\tAudioNode.prototype.connect = function(){\n\t\t\tnativeConnect.apply(this, arguments);\n\t\t\treturn arguments[0];\n\t\t};\n\t}\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Context\";\nimport \"../shim/AudioNode\";\n\n/**\n * @class Tone.AudioNode is the base class for classes which process audio.\n * AudioNodes have inputs and outputs.\n * @param\t{AudioContext=} context\tThe audio context to use with the class\n * @extends {Tone}\n */\nTone.AudioNode = function(){\n\tTone.call(this);\n\n\t//use the default context if one is not passed in\n\tvar options = Tone.defaults(arguments, [\"context\"], {\n\t\t\"context\" : Tone.context\n\t});\n\n\t/**\n\t * The AudioContext of this instance\n\t * @private\n\t * @type {AudioContext}\n\t */\n\tthis._context = options.context;\n};\n\nTone.extend(Tone.AudioNode);\n\n/**\n * Get the audio context belonging to this instance.\n * @type {Tone.Context}\n * @memberOf Tone.AudioNode#\n * @name context\n * @readOnly\n */\nObject.defineProperty(Tone.AudioNode.prototype, \"context\", {\n\tget : function(){\n\t\treturn this._context;\n\t}\n});\n\n/**\n * Create input and outputs for this object.\n * @param {Number} [input=0] The number of inputs\n * @param {Number} [outputs=0] The number of outputs\n * @return {Tone.AudioNode} this\n * @private\n */\nTone.AudioNode.prototype.createInsOuts = function(inputs, outputs){\n\n\tif (inputs === 1){\n\t\tthis.input = this.context.createGain();\n\t} else if (inputs > 1){\n\t\tthis.input = new Array(inputs);\n\t}\n\n\tif (outputs === 1){\n\t\tthis.output = this.context.createGain();\n\t} else if (outputs > 1){\n\t\tthis.output = new Array(outputs);\n\t}\n};\n\n/**\n * channelCount is the number of channels used when up-mixing and down-mixing\n * connections to any inputs to the node. The default value is 2 except for\n * specific nodes where its value is specially determined.\n *\n * @memberof Tone.AudioNode#\n * @type {Number}\n * @name channelCount\n * @readOnly\n */\nObject.defineProperty(Tone.AudioNode.prototype, \"channelCount\", {\n\tget : function(){\n\t\treturn this.output.channelCount;\n\t},\n\tset : function(c){\n\t\treturn this.output.channelCount = c;\n\t}\n});\n\n/**\n * channelCountMode determines how channels will be counted when up-mixing and\n * down-mixing connections to any inputs to the node.\n * The default value is \"max\". This attribute has no effect for nodes with no inputs.\n * @memberof Tone.AudioNode#\n * @type {String}\n * @name channelCountMode\n * @readOnly\n */\nObject.defineProperty(Tone.AudioNode.prototype, \"channelCountMode\", {\n\tget : function(){\n\t\treturn this.output.channelCountMode;\n\t},\n\tset : function(m){\n\t\treturn this.output.channelCountMode = m;\n\t}\n});\n\n/**\n * channelInterpretation determines how individual channels will be treated\n * when up-mixing and down-mixing connections to any inputs to the node.\n * The default value is \"speakers\".\n * @memberof Tone.AudioNode#\n * @type {String}\n * @name channelInterpretation\n * @readOnly\n */\nObject.defineProperty(Tone.AudioNode.prototype, \"channelInterpretation\", {\n\tget : function(){\n\t\treturn this.output.channelInterpretation;\n\t},\n\tset : function(i){\n\t\treturn this.output.channelInterpretation = i;\n\t}\n});\n\n/**\n * The number of inputs feeding into the AudioNode.\n * For source nodes, this will be 0.\n * @type {Number}\n * @name numberOfInputs\n * @memberof Tone.AudioNode#\n * @readOnly\n */\nObject.defineProperty(Tone.AudioNode.prototype, \"numberOfInputs\", {\n\tget : function(){\n\t\tif (this.input){\n\t\t\tif (Tone.isArray(this.input)){\n\t\t\t\treturn this.input.length;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n});\n\n/**\n * The number of outputs coming out of the AudioNode.\n * @type {Number}\n * @name numberOfOutputs\n * @memberof Tone.AudioNode#\n * @readOnly\n */\nObject.defineProperty(Tone.AudioNode.prototype, \"numberOfOutputs\", {\n\tget : function(){\n\t\tif (this.output){\n\t\t\tif (Tone.isArray(this.output)){\n\t\t\t\treturn this.output.length;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n});\n\n/**\n * connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode\n * @param {Tone | AudioParam | AudioNode} unit\n * @param {number} [outputNum=0] optionally which output to connect from\n * @param {number} [inputNum=0] optionally which input to connect to\n * @returns {Tone.AudioNode} this\n */\nTone.AudioNode.prototype.connect = function(unit, outputNum, inputNum){\n\tif (Tone.isArray(this.output)){\n\t\toutputNum = Tone.defaultArg(outputNum, 0);\n\t\tthis.output[outputNum].connect(unit, 0, inputNum);\n\t} else {\n\t\tTone.connect(this.output, unit, outputNum, inputNum);\n\t}\n\treturn this;\n};\n\n/**\n * disconnect the output\n * @param {Number|AudioNode} output Either the output index to disconnect\n * if the output is an array, or the\n * node to disconnect from.\n * @returns {Tone.AudioNode} this\n */\nTone.AudioNode.prototype.disconnect = function(destination, outputNum, inputNum){\n\tif (Tone.isArray(this.output)){\n\t\toutputNum = Tone.defaultArg(outputNum, 0);\n\t\tthis.output[outputNum].disconnect(destination, 0, inputNum);\n\t} else {\n\t\tTone.disconnect(this.output, destination, outputNum, inputNum);\n\t}\n\treturn this;\n};\n\n/**\n * Connect the output of this node to the rest of the nodes in series.\n * @example\n * //connect a node to an effect, panVol and then to the master output\n * node.chain(effect, panVol, Tone.Master);\n * @param {...(AudioParam|Tone|AudioNode)} nodes\n * @returns {Tone.AudioNode} this\n */\nTone.AudioNode.prototype.chain = function(){\n\tvar args = Array.from(arguments);\n\targs.unshift(this);\n\tTone.connectSeries.apply(undefined, args);\n\treturn this;\n};\n\n/**\n * connect the output of this node to the rest of the nodes in parallel.\n * @param {...(AudioParam|Tone|AudioNode)} nodes\n * @returns {Tone.AudioNode} this\n */\nTone.AudioNode.prototype.fan = function(){\n\tfor (var i = 0; i < arguments.length; i++){\n\t\tthis.connect(arguments[i]);\n\t}\n\treturn this;\n};\n\n/**\n * Dispose and disconnect\n * @return {Tone.AudioNode} this\n */\nTone.AudioNode.prototype.dispose = function(){\n\tif (Tone.isDefined(this.input)){\n\t\tif (this.input instanceof AudioNode){\n\t\t\tthis.input.disconnect();\n\t\t}\n\t\tthis.input = null;\n\t}\n\tif (Tone.isDefined(this.output)){\n\t\tif (this.output instanceof AudioNode){\n\t\t\tthis.output.disconnect();\n\t\t}\n\t\tthis.output = null;\n\t}\n\tthis._context = null;\n\treturn this;\n};\n\nexport default Tone.AudioNode;\n\n","import Tone from \"../core/Tone\";\nimport \"../shim/AudioContext\";\nimport \"../core/Context\";\nimport \"../core/Gain\";\n\nif (Tone.supported && !Tone.global.AudioContext.prototype.createConstantSource){\n\n\tvar ConstantSourceNode = function(context){\n\t\tthis.context = context;\n\n\t\tvar buffer = context.createBuffer(1, 128, context.sampleRate);\n\t\tvar arr = buffer.getChannelData(0);\n\t\tfor (var i = 0; i < arr.length; i++){\n\t\t\tarr[i] = 1;\n\t\t}\n\n\t\tthis._bufferSource = context.createBufferSource();\n\t\tthis._bufferSource.channelCount = 1;\n\t\tthis._bufferSource.channelCountMode = \"explicit\";\n\t\tthis._bufferSource.buffer = buffer;\n\t\tthis._bufferSource.loop = true;\n\n\t\tvar gainNode = this._output = context.createGain();\n\t\tthis.offset = gainNode.gain;\n\n\t\tthis._bufferSource.connect(gainNode);\n\t};\n\n\tConstantSourceNode.prototype.start = function(time){\n\t\tthis._bufferSource.start(time);\n\t\treturn this;\n\t};\n\n\tConstantSourceNode.prototype.stop = function(time){\n\t\tthis._bufferSource.stop(time);\n\t\treturn this;\n\t};\n\n\tConstantSourceNode.prototype.connect = function(){\n\t\tthis._output.connect.apply(this._output, arguments);\n\t\treturn this;\n\t};\n\n\tConstantSourceNode.prototype.disconnect = function(){\n\t\tthis._output.disconnect.apply(this._output, arguments);\n\t\treturn this;\n\t};\n\n\tAudioContext.prototype.createConstantSource = function(){\n\t\treturn new ConstantSourceNode(this);\n\t};\n\n\tTone.Context.prototype.createConstantSource = function(){\n\t\treturn new ConstantSourceNode(this);\n\t};\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Type\";\nimport \"../core/Param\";\nimport \"../signal/SignalBase\";\nimport \"../shim/ConstantSourceNode\";\n\n/**\n * @class A signal is an audio-rate value. Tone.Signal is a core component of the library.\n * Unlike a number, Signals can be scheduled with sample-level accuracy. Tone.Signal\n * has all of the methods available to native Web Audio\n * [AudioParam](http://webaudio.github.io/web-audio-api/#the-audioparam-interface)\n * as well as additional conveniences. Read more about working with signals\n * [here](https://github.com/Tonejs/Tone.js/wiki/Signals).\n *\n * @constructor\n * @extends {Tone.Param}\n * @param {Number|AudioParam} [value] Initial value of the signal. If an AudioParam\n * is passed in, that parameter will be wrapped\n * and controlled by the Signal.\n * @param {string} [units=Number] unit The units the signal is in.\n * @example\n * var signal = new Tone.Signal(10);\n */\nTone.Signal = function(){\n\n\tvar options = Tone.defaults(arguments, [\"value\", \"units\"], Tone.Signal);\n\tTone.Param.call(this, options);\n\n\t/**\n\t * The constant source node which generates the signal\n\t * @type {ConstantSourceNode}\n\t * @private\n\t */\n\tthis._constantSource = this.context.createConstantSource();\n\tthis._constantSource.start(0);\n\tthis._param = this._constantSource.offset;\n\tthis.value = options.value;\n\n\t/**\n\t * The node where the constant signal value is scaled.\n\t * @type {ConstantSourceNode}\n\t * @private\n\t */\n\tthis.output = this._constantSource;\n\n\t/**\n\t * The node where the value is set.\n\t * @type {Tone.Param}\n\t * @private\n\t */\n\tthis.input = this._param = this.output.offset;\n};\n\nTone.extend(Tone.Signal, Tone.Param);\n\n/**\n * The default values\n * @type {Object}\n * @static\n * @const\n */\nTone.Signal.defaults = {\n\t\"value\" : 0,\n\t\"units\" : Tone.Type.Default,\n\t\"convert\" : true,\n};\n\n//use SignalBase's connect/disconnect methods\nTone.Signal.prototype.connect = Tone.SignalBase.prototype.connect;\nTone.Signal.prototype.disconnect = Tone.SignalBase.prototype.disconnect;\n\n/**\n * Return the current signal value at the given time.\n * @param {Time} time When to get the signal value\n * @return {Number}\n */\nTone.Signal.prototype.getValueAtTime = function(time){\n\tif (this._param.getValueAtTime){\n\t\treturn this._param.getValueAtTime(time);\n\t} else {\n\t\treturn Tone.Param.prototype.getValueAtTime.call(this, time);\n\t}\n};\n\n/**\n * dispose and disconnect\n * @returns {Tone.Signal} this\n */\nTone.Signal.prototype.dispose = function(){\n\tTone.Param.prototype.dispose.call(this);\n\tthis._constantSource.stop();\n\tthis._constantSource.disconnect();\n\tthis._constantSource = null;\n\treturn this;\n};\n\nexport default Tone.Signal;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Param\";\nimport \"../type/Type\";\nimport \"../core/AudioNode\";\n\n/**\n * @class A thin wrapper around the Native Web Audio GainNode.\n * The GainNode is a basic building block of the Web Audio\n * API and is useful for routing audio and adjusting gains.\n * @extends {Tone.AudioNode}\n * @param {Number=} gain The initial gain of the GainNode\n * @param {Tone.Type=} units The units of the gain parameter.\n */\nTone.Gain = function(){\n\n\tvar options = Tone.defaults(arguments, [\"gain\", \"units\"], Tone.Gain);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The GainNode\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.input = this.output = this._gainNode = this.context.createGain();\n\n\t/**\n\t * The gain parameter of the gain node.\n\t * @type {Gain}\n\t * @signal\n\t */\n\tthis.gain = new Tone.Param({\n\t\t\"param\" : this._gainNode.gain,\n\t\t\"units\" : options.units,\n\t\t\"value\" : options.gain,\n\t\t\"convert\" : options.convert\n\t});\n\tthis._readOnly(\"gain\");\n};\n\nTone.extend(Tone.Gain, Tone.AudioNode);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.Gain.defaults = {\n\t\"gain\" : 1,\n\t\"convert\" : true,\n};\n\n/**\n * Clean up.\n * @return {Tone.Gain} this\n */\nTone.Gain.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._gainNode.disconnect();\n\tthis._gainNode = null;\n\tthis._writable(\"gain\");\n\tthis.gain.dispose();\n\tthis.gain = null;\n};\n\nexport default Tone.Gain;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Time\";\nimport \"../type/Frequency\";\nimport \"../type/TransportTime\";\nimport \"../core/Context\";\n\n///////////////////////////////////////////////////////////////////////////\n//\tTYPES\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Units which a value can take on.\n * @enum {String}\n */\nTone.Type = {\n\t/**\n\t * Default units\n\t * @typedef {Default}\n\t */\n\tDefault : \"number\",\n\t/**\n\t * Time can be described in a number of ways. Read more [Time](https://github.com/Tonejs/Tone.js/wiki/Time).\n\t *\n\t * * Numbers, which will be taken literally as the time (in seconds).\n\t * * Notation, (\"4n\", \"8t\") describes time in BPM and time signature relative values.\n\t * * TransportTime, (\"4:3:2\") will also provide tempo and time signature relative times\n\t * in the form BARS:QUARTERS:SIXTEENTHS.\n\t * * Frequency, (\"8hz\") is converted to the length of the cycle in seconds.\n\t * * Now-Relative, (\"+1\") prefix any of the above with \"+\" and it will be interpreted as\n\t * \"the current time plus whatever expression follows\".\n\t * * Object, ({\"4n\" : 3, \"8t\" : -1}). The resulting time is equal to the sum of all of the keys multiplied by the values in the object. \n\t * * No Argument, for methods which accept time, no argument will be interpreted as\n\t * \"now\" (i.e. the currentTime).\n\t *\n\t * @typedef {Time}\n\t */\n\tTime : \"time\",\n\t/**\n\t * Frequency can be described similar to time, except ultimately the\n\t * values are converted to frequency instead of seconds. A number\n\t * is taken literally as the value in hertz. Additionally any of the\n\t * Time encodings can be used. Note names in the form\n\t * of NOTE OCTAVE (i.e. C4) are also accepted and converted to their\n\t * frequency value.\n\t * @typedef {Frequency}\n\t */\n\tFrequency : \"frequency\",\n\t/**\n\t * TransportTime describes a position along the Transport's timeline. It is\n\t * similar to Time in that it uses all the same encodings, but TransportTime specifically\n\t * pertains to the Transport's timeline, which is startable, stoppable, loopable, and seekable.\n\t * [Read more](https://github.com/Tonejs/Tone.js/wiki/TransportTime)\n\t * @typedef {TransportTime}\n\t */\n\tTransportTime : \"transportTime\",\n\t/**\n\t * Ticks are the basic subunit of the Transport. They are\n\t * the smallest unit of time that the Transport supports.\n\t * @typedef {Ticks}\n\t */\n\tTicks : \"ticks\",\n\t/**\n\t * Normal values are within the range [0, 1].\n\t * @typedef {NormalRange}\n\t */\n\tNormalRange : \"normalRange\",\n\t/**\n\t * AudioRange values are between [-1, 1].\n\t * @typedef {AudioRange}\n\t */\n\tAudioRange : \"audioRange\",\n\t/**\n\t * Decibels are a logarithmic unit of measurement which is useful for volume\n\t * because of the logarithmic way that we perceive loudness. 0 decibels\n\t * means no change in volume. -10db is approximately half as loud and 10db\n\t * is twice is loud.\n\t * @typedef {Decibels}\n\t */\n\tDecibels : \"db\",\n\t/**\n\t * Half-step note increments, i.e. 12 is an octave above the root. and 1 is a half-step up.\n\t * @typedef {Interval}\n\t */\n\tInterval : \"interval\",\n\t/**\n\t * Beats per minute.\n\t * @typedef {BPM}\n\t */\n\tBPM : \"bpm\",\n\t/**\n\t * The value must be greater than or equal to 0.\n\t * @typedef {Positive}\n\t */\n\tPositive : \"positive\",\n\t/**\n\t * Gain is the ratio between input and output of a signal.\n\t * A gain of 0 is the same as silencing the signal. A gain of\n\t * 1, causes no change to the incoming signal.\n\t * @typedef {Gain}\n\t */\n\tGain : \"gain\",\n\t/**\n\t * A cent is a hundredth of a semitone.\n\t * @typedef {Cents}\n\t */\n\tCents : \"cents\",\n\t/**\n\t * Angle between 0 and 360.\n\t * @typedef {Degrees}\n\t */\n\tDegrees : \"degrees\",\n\t/**\n\t * A number representing a midi note.\n\t * @typedef {MIDI}\n\t */\n\tMIDI : \"midi\",\n\t/**\n\t * A colon-separated representation of time in the form of\n\t * Bars:Beats:Sixteenths.\n\t * @typedef {BarsBeatsSixteenths}\n\t */\n\tBarsBeatsSixteenths : \"barsBeatsSixteenths\",\n\t/**\n\t * Sampling is the reduction of a continuous signal to a discrete signal.\n\t * Audio is typically sampled 44100 times per second.\n\t * @typedef {Samples}\n\t */\n\tSamples : \"samples\",\n\t/**\n\t * Hertz are a frequency representation defined as one cycle per second.\n\t * @typedef {Hertz}\n\t */\n\tHertz : \"hertz\",\n\t/**\n\t * A frequency represented by a letter name,\n\t * accidental and octave. This system is known as\n\t * [Scientific Pitch Notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation).\n\t * @typedef {Note}\n\t */\n\tNote : \"note\",\n\t/**\n\t * One millisecond is a thousandth of a second.\n\t * @typedef {Milliseconds}\n\t */\n\tMilliseconds : \"milliseconds\",\n\t/**\n\t * Seconds are the time unit of the AudioContext. In the end,\n\t * all values need to be evaluated to seconds.\n\t * @typedef {Seconds}\n\t */\n\tSeconds : \"seconds\",\n\t/**\n\t * A string representing a duration relative to a measure.\n\t * * \"4n\" = quarter note\n\t * * \"2m\" = two measures\n\t * * \"8t\" = eighth-note triplet\n\t * @typedef {Notation}\n\t */\n\tNotation : \"notation\",\n};\n\n///////////////////////////////////////////////////////////////////////////\n// AUGMENT TONE's PROTOTYPE\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Convert Time into seconds.\n *\n * Unlike the method which it overrides, this takes into account\n * transporttime and musical notation.\n *\n * Time : 1.40\n * Notation: 4n or 1m or 2t\n * Now Relative: +3n\n *\n * @param {Time} time\n * @return {Seconds}\n */\nTone.prototype.toSeconds = function(time){\n\tif (Tone.isNumber(time)){\n\t\treturn time;\n\t} else if (Tone.isUndef(time)){\n\t\treturn this.now();\n\t} else if (Tone.isString(time) || Tone.isObject(time)){\n\t\treturn (new Tone.Time(time)).toSeconds();\n\t} else if (time instanceof Tone.TimeBase){\n\t\treturn time.toSeconds();\n\t}\n};\n\n/**\n * Convert a frequency representation into a number.\n * @param {Frequency} freq\n * @return {Hertz} the frequency in hertz\n */\nTone.prototype.toFrequency = function(freq){\n\tif (Tone.isNumber(freq)){\n\t\treturn freq;\n\t} else if (Tone.isString(freq) || Tone.isUndef(freq) || Tone.isObject(freq)){\n\t\treturn (new Tone.Frequency(freq)).valueOf();\n\t} else if (freq instanceof Tone.TimeBase){\n\t\treturn freq.toFrequency();\n\t}\n};\n\n/**\n * Convert a time representation into ticks.\n * @param {Time} time\n * @return {Ticks} the time in ticks\n */\nTone.prototype.toTicks = function(time){\n\tif (Tone.isNumber(time) || Tone.isString(time) || Tone.isObject(time)){\n\t\treturn (new Tone.TransportTime(time)).toTicks();\n\t} else if (Tone.isUndef(time)){\n\t\treturn Tone.Transport.ticks;\n\t} else if (time instanceof Tone.TimeBase){\n\t\treturn time.toTicks();\n\t}\n};\n\nexport default Tone;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Param\";\nimport \"../core/Gain\";\nimport \"../signal/SignalBase\";\n\n/**\n * @class Multiply two incoming signals. Or, if a number is given in the constructor,\n * multiplies the incoming signal by that value.\n *\n * @constructor\n * @extends {Tone.Signal}\n * @param {number=} value Constant value to multiple. If no value is provided,\n * it will return the product of the first and second inputs\n * @example\n * var mult = new Tone.Multiply();\n * var sigA = new Tone.Signal(3);\n * var sigB = new Tone.Signal(4);\n * sigA.connect(mult, 0, 0);\n * sigB.connect(mult, 0, 1);\n * //output of mult is 12.\n * @example\n * var mult = new Tone.Multiply(10);\n * var sig = new Tone.Signal(2).connect(mult);\n * //the output of mult is 20.\n */\nTone.Multiply = function(value){\n\n\tTone.Signal.call(this);\n\tthis.createInsOuts(2, 0);\n\n\t/**\n\t * the input node is the same as the output node\n\t * it is also the GainNode which handles the scaling of incoming signal\n\t *\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis._mult = this.input[0] = this.output = new Tone.Gain();\n\n\t/**\n\t * the scaling parameter\n\t * @type {AudioParam}\n\t * @private\n\t */\n\tthis._param = this.input[1] = this.output.gain;\n\tthis.value = Tone.defaultArg(value, 0);\n};\n\nTone.extend(Tone.Multiply, Tone.Signal);\n\n/**\n * clean up\n * @returns {Tone.Multiply} this\n */\nTone.Multiply.prototype.dispose = function(){\n\tTone.Signal.prototype.dispose.call(this);\n\tthis._mult.dispose();\n\tthis._mult = null;\n\tthis._param = null;\n\treturn this;\n};\n\nexport default Tone.Multiply;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Transport\";\nimport \"../component/Volume\";\nimport \"../core/Master\";\nimport \"../type/Type\";\nimport \"../core/TimelineState\";\nimport \"../signal/Signal\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Base class for sources. Sources have start/stop methods\n * and the ability to be synced to the\n * start/stop of Tone.Transport.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @example\n * //Multiple state change events can be chained together,\n * //but must be set in the correct order and with ascending times\n *\n * // OK\n * state.start().stop(\"+0.2\");\n * // AND\n * state.start().stop(\"+0.2\").start(\"+0.4\").stop(\"+0.7\")\n *\n * // BAD\n * state.stop(\"+0.2\").start();\n * // OR\n * state.start(\"+0.3\").stop(\"+0.2\");\n *\n */\nTone.Source = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.Source.defaults);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The output volume node\n\t * @type {Tone.Volume}\n\t * @private\n\t */\n\tthis._volume = this.output = new Tone.Volume(options.volume);\n\n\t/**\n\t * The volume of the output in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t * @example\n\t * source.volume.value = -6;\n\t */\n\tthis.volume = this._volume.volume;\n\tthis._readOnly(\"volume\");\n\n\t/**\n\t * \tKeep track of the scheduled state.\n\t * @type {Tone.TimelineState}\n\t * @private\n\t */\n\tthis._state = new Tone.TimelineState(Tone.State.Stopped);\n\tthis._state.memory = 100;\n\n\t/**\n\t * The synced `start` callback function from the transport\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._synced = false;\n\n\t/**\n\t * Keep track of all of the scheduled event ids\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._scheduled = [];\n\n\t//make the output explicitly stereo\n\tthis._volume.output.output.channelCount = 2;\n\tthis._volume.output.output.channelCountMode = \"explicit\";\n\t//mute initially\n\tthis.mute = options.mute;\n};\n\nTone.extend(Tone.Source, Tone.AudioNode);\n\n/**\n * The default parameters\n * @static\n * @const\n * @type {Object}\n */\nTone.Source.defaults = {\n\t\"volume\" : 0,\n\t\"mute\" : false\n};\n\n/**\n * Returns the playback state of the source, either \"started\" or \"stopped\".\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.Source#\n * @name state\n */\nObject.defineProperty(Tone.Source.prototype, \"state\", {\n\tget : function(){\n\t\tif (this._synced){\n\t\t\tif (Tone.Transport.state === Tone.State.Started){\n\t\t\t\treturn this._state.getValueAtTime(Tone.Transport.seconds);\n\t\t\t} else {\n\t\t\t\treturn Tone.State.Stopped;\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._state.getValueAtTime(this.now());\n\t\t}\n\t}\n});\n\n/**\n * Mute the output.\n * @memberOf Tone.Source#\n * @type {boolean}\n * @name mute\n * @example\n * //mute the output\n * source.mute = true;\n */\nObject.defineProperty(Tone.Source.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._volume.mute;\n\t},\n\tset : function(mute){\n\t\tthis._volume.mute = mute;\n\t}\n});\n\n//overwrite these functions\nTone.Source.prototype._start = Tone.noOp;\nTone.Source.prototype.restart = Tone.noOp;\nTone.Source.prototype._stop = Tone.noOp;\n\n/**\n * Start the source at the specified time. If no time is given,\n * start the source now.\n * @param {Time} [time=now] When the source should be started.\n * @returns {Tone.Source} this\n * @example\n * source.start(\"+0.5\"); //starts the source 0.5 seconds from now\n */\nTone.Source.prototype.start = function(time, offset, duration){\n\tif (Tone.isUndef(time) && this._synced){\n\t\ttime = Tone.Transport.seconds;\n\t} else {\n\t\ttime = this.toSeconds(time);\n\t\ttime = Math.max(time, this.context.currentTime);\n\t}\n\t//if it's started, stop it and restart it\n\tif (this._state.getValueAtTime(time) === Tone.State.Started){\n\t\tthis._state.cancel(time);\n\t\tthis._state.setStateAtTime(Tone.State.Started, time);\n\t\tthis.restart(time, offset, duration);\n\t} else {\n\t\tthis._state.setStateAtTime(Tone.State.Started, time);\n\t\tif (this._synced){\n\t\t\t// add the offset time to the event\n\t\t\tvar event = this._state.get(time);\n\t\t\tevent.offset = Tone.defaultArg(offset, 0);\n\t\t\tevent.duration = duration;\n\t\t\tvar sched = Tone.Transport.schedule(function(t){\n\t\t\t\tthis._start(t, offset, duration);\n\t\t\t}.bind(this), time);\n\t\t\tthis._scheduled.push(sched);\n\n\t\t\t//if it's already started\n\t\t\tif (Tone.Transport.state === Tone.State.Started){\n\t\t\t\tthis._syncedStart(this.now(), Tone.Transport.seconds);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._start.apply(this, arguments);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Stop the source at the specified time. If no time is given,\n * stop the source now.\n * @param {Time} [time=now] When the source should be stopped.\n * @returns {Tone.Source} this\n * @example\n * source.stop(); // stops the source immediately\n */\nTone.Source.prototype.stop = function(time){\n\tif (Tone.isUndef(time) && this._synced){\n\t\ttime = Tone.Transport.seconds;\n\t} else {\n\t\ttime = this.toSeconds(time);\n\t\ttime = Math.max(time, this.context.currentTime);\n\t}\n\tif (!this._synced){\n\t\tthis._stop.apply(this, arguments);\n\t} else {\n\t\tvar sched = Tone.Transport.schedule(this._stop.bind(this), time);\n\t\tthis._scheduled.push(sched);\n\t}\n\tthis._state.cancel(time);\n\tthis._state.setStateAtTime(Tone.State.Stopped, time);\n\treturn this;\n};\n\n/**\n * Sync the source to the Transport so that all subsequent\n * calls to `start` and `stop` are synced to the TransportTime\n * instead of the AudioContext time.\n *\n * @returns {Tone.Source} this\n * @example\n * //sync the source so that it plays between 0 and 0.3 on the Transport's timeline\n * source.sync().start(0).stop(0.3);\n * //start the transport.\n * Tone.Transport.start();\n *\n * @example\n * //start the transport with an offset and the sync'ed sources\n * //will start in the correct position\n * source.sync().start(0.1);\n * //the source will be invoked with an offset of 0.4\n * Tone.Transport.start(\"+0.5\", 0.5);\n */\nTone.Source.prototype.sync = function(){\n\tthis._synced = true;\n\tthis._syncedStart = function(time, offset){\n\t\tif (offset > 0){\n\t\t\t// get the playback state at that time\n\t\t\tvar stateEvent = this._state.get(offset);\n\t\t\t// listen for start events which may occur in the middle of the sync'ed time\n\t\t\tif (stateEvent && stateEvent.state === Tone.State.Started && stateEvent.time !== offset){\n\t\t\t\t// get the offset\n\t\t\t\tvar startOffset = offset - this.toSeconds(stateEvent.time);\n\t\t\t\tvar duration;\n\t\t\t\tif (stateEvent.duration){\n\t\t\t\t\tduration = this.toSeconds(stateEvent.duration) - startOffset;\n\t\t\t\t}\n\t\t\t\tthis._start(time, this.toSeconds(stateEvent.offset) + startOffset, duration);\n\t\t\t}\n\t\t}\n\t}.bind(this);\n\tthis._syncedStop = function(time){\n\t\tvar seconds = Tone.Transport.getSecondsAtTime(Math.max(time - this.sampleTime, 0));\n\t\tif (this._state.getValueAtTime(seconds) === Tone.State.Started){\n\t\t\tthis._stop(time);\n\t\t}\n\t}.bind(this);\n\tTone.Transport.on(\"start loopStart\", this._syncedStart);\n\tTone.Transport.on(\"stop pause loopEnd\", this._syncedStop);\n\treturn this;\n};\n\n/**\n * Unsync the source to the Transport. See Tone.Source.sync\n * @returns {Tone.Source} this\n */\nTone.Source.prototype.unsync = function(){\n\tif (this._synced){\n\t\tTone.Transport.off(\"stop pause loopEnd\", this._syncedStop);\n\t\tTone.Transport.off(\"start loopStart\", this._syncedStart);\n\t}\n\tthis._synced = false;\n\t// clear all of the scheduled ids\n\tfor (var i = 0; i < this._scheduled.length; i++){\n\t\tvar id = this._scheduled[i];\n\t\tTone.Transport.clear(id);\n\t}\n\tthis._scheduled = [];\n\tthis._state.cancel(0);\n\treturn this;\n};\n\n/**\n *\tClean up.\n * @return {Tone.Source} this\n */\nTone.Source.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis.unsync();\n\tthis._scheduled = null;\n\tthis._writable(\"volume\");\n\tthis._volume.dispose();\n\tthis._volume = null;\n\tthis.volume = null;\n\tthis._state.dispose();\n\tthis._state = null;\n};\n\nexport default Tone.Source;\n\n","import Tone from \"../core/Tone\";\nimport \"../shim/AudioContext\";\n\nif (Tone.supported && !Tone.global.AudioContext.prototype._native_createWaveShaper){\n\n\t//fixes safari only bug which is still present in 11\n\tvar ua = navigator.userAgent.toLowerCase();\n\tvar isSafari = ua.includes(\"safari\") && !ua.includes(\"chrome\");\n\tif (isSafari){\n\n\t\tvar WaveShaperNode = function(context){\n\n\t\t\tthis._internalNode = this.input = this.output = context._native_createWaveShaper();\n\n\t\t\tthis._curve = null;\n\n\t\t\tfor (var prop in this._internalNode){\n\t\t\t\tthis._defineProperty(this._internalNode, prop);\n\t\t\t}\n\t\t};\n\n\t\tObject.defineProperty(WaveShaperNode.prototype, \"curve\", {\n\t\t\t\"get\" : function(){\n\t\t\t\treturn this._curve;\n\t\t\t},\n\t\t\t\"set\" : function(curve){\n\t\t\t\tthis._curve = curve;\n\t\t\t\tvar array = new Float32Array(curve.length+1);\n\t\t\t\tarray.set(curve, 1);\n\t\t\t\tarray[0] = curve[0];\n\t\t\t\tthis._internalNode.curve = array;\n\t\t\t}\n\t\t});\n\n\t\tWaveShaperNode.prototype._defineProperty = function(context, prop){\n\t\t\tif (Tone.isUndef(this[prop])){\n\t\t\t\tObject.defineProperty(this, prop, {\n\t\t\t\t\t\"get\" : function(){\n\t\t\t\t\t\tif (typeof context[prop] === \"function\"){\n\t\t\t\t\t\t\treturn context[prop].bind(context);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn context[prop];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"set\" : function(val){\n\t\t\t\t\t\tcontext[prop] = val;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tTone.global.AudioContext.prototype._native_createWaveShaper = Tone.global.AudioContext.prototype.createWaveShaper;\n\t\tTone.global.AudioContext.prototype.createWaveShaper = function(){\n\t\t\treturn new WaveShaperNode(this);\n\t\t};\n\t}\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/SignalBase\";\nimport \"../shim/WaveShaperNode\";\n\n/**\n * @class Wraps the native Web Audio API\n * [WaveShaperNode](http://webaudio.github.io/web-audio-api/#the-waveshapernode-interface).\n *\n * @extends {Tone.SignalBase}\n * @constructor\n * @param {function|Array|Number} mapping The function used to define the values.\n * The mapping function should take two arguments:\n * the first is the value at the current position\n * and the second is the array position.\n * If the argument is an array, that array will be\n * set as the wave shaping function. The input\n * signal is an AudioRange [-1, 1] value and the output\n * signal can take on any numerical values.\n *\n * @param {Number} [bufferLen=1024] The length of the WaveShaperNode buffer.\n * @example\n * var timesTwo = new Tone.WaveShaper(function(val){\n * \treturn val * 2;\n * }, 2048);\n * @example\n * //a waveshaper can also be constructed with an array of values\n * var invert = new Tone.WaveShaper([1, -1]);\n */\nTone.WaveShaper = function(mapping, bufferLen){\n\n\tTone.SignalBase.call(this);\n\n\t/**\n\t * the waveshaper\n\t * @type {WaveShaperNode}\n\t * @private\n\t */\n\tthis._shaper = this.input = this.output = this.context.createWaveShaper();\n\n\t/**\n\t * the waveshapers curve\n\t * @type {Float32Array}\n\t * @private\n\t */\n\tthis._curve = null;\n\n\tif (Array.isArray(mapping)){\n\t\tthis.curve = mapping;\n\t} else if (isFinite(mapping) || Tone.isUndef(mapping)){\n\t\tthis._curve = new Float32Array(Tone.defaultArg(mapping, 1024));\n\t} else if (Tone.isFunction(mapping)){\n\t\tthis._curve = new Float32Array(Tone.defaultArg(bufferLen, 1024));\n\t\tthis.setMap(mapping);\n\t}\n};\n\nTone.extend(Tone.WaveShaper, Tone.SignalBase);\n\n/**\n * Uses a mapping function to set the value of the curve.\n * @param {function} mapping The function used to define the values.\n * The mapping function take two arguments:\n * the first is the value at the current position\n * which goes from -1 to 1 over the number of elements\n * in the curve array. The second argument is the array position.\n * @returns {Tone.WaveShaper} this\n * @example\n * //map the input signal from [-1, 1] to [0, 10]\n * shaper.setMap(function(val, index){\n * \treturn (val + 1) * 5;\n * })\n */\nTone.WaveShaper.prototype.setMap = function(mapping){\n\tvar array = new Array(this._curve.length);\n\tfor (var i = 0, len = this._curve.length; i < len; i++){\n\t\tvar normalized = (i / (len - 1)) * 2 - 1;\n\t\tarray[i] = mapping(normalized, i);\n\t}\n\tthis.curve = array;\n\treturn this;\n};\n\n/**\n * The array to set as the waveshaper curve. For linear curves\n * array length does not make much difference, but for complex curves\n * longer arrays will provide smoother interpolation.\n * @memberOf Tone.WaveShaper#\n * @type {Array}\n * @name curve\n */\nObject.defineProperty(Tone.WaveShaper.prototype, \"curve\", {\n\tget : function(){\n\t\treturn this._shaper.curve;\n\t},\n\tset : function(mapping){\n\t\tthis._curve = new Float32Array(mapping);\n\t\tthis._shaper.curve = this._curve;\n\t}\n});\n\n/**\n * Specifies what type of oversampling (if any) should be used when\n * applying the shaping curve. Can either be \"none\", \"2x\" or \"4x\".\n * @memberOf Tone.WaveShaper#\n * @type {string}\n * @name oversample\n */\nObject.defineProperty(Tone.WaveShaper.prototype, \"oversample\", {\n\tget : function(){\n\t\treturn this._shaper.oversample;\n\t},\n\tset : function(oversampling){\n\t\tif ([\"none\", \"2x\", \"4x\"].includes(oversampling)){\n\t\t\tthis._shaper.oversample = oversampling;\n\t\t} else {\n\t\t\tthrow new RangeError(\"Tone.WaveShaper: oversampling must be either 'none', '2x', or '4x'\");\n\t\t}\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.WaveShaper} this\n */\nTone.WaveShaper.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._shaper.disconnect();\n\tthis._shaper = null;\n\tthis._curve = null;\n\treturn this;\n};\n\nexport default Tone.WaveShaper;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/CrossFade\";\nimport \"../core/AudioNode\";\n\n/**\n * \t@class Tone.Effect is the base class for effects. Connect the effect between\n * \t the effectSend and effectReturn GainNodes, then control the amount of\n * \t effect which goes to the output using the wet control.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {NormalRange|Object} [wet] The starting wet value.\n */\nTone.Effect = function(){\n\n\tvar options = Tone.defaults(arguments, [\"wet\"], Tone.Effect);\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(1, 1);\n\n\t/**\n\t * the drywet knob to control the amount of effect\n\t * @type {Tone.CrossFade}\n\t * @private\n\t */\n\tthis._dryWet = new Tone.CrossFade(options.wet);\n\n\t/**\n\t * The wet control is how much of the effected\n\t * will pass through to the output. 1 = 100% effected\n\t * signal, 0 = 100% dry signal.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.wet = this._dryWet.fade;\n\n\t/**\n\t * connect the effectSend to the input of hte effect\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis.effectSend = new Tone.Gain();\n\n\t/**\n\t * connect the output of the effect to the effectReturn\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis.effectReturn = new Tone.Gain();\n\n\t//connections\n\tTone.connect(this.input, this._dryWet.a);\n\tTone.connect(this.input, this.effectSend);\n\tthis.effectReturn.connect(this._dryWet.b);\n\tthis._dryWet.connect(this.output);\n\tthis._readOnly([\"wet\"]);\n};\n\nTone.extend(Tone.Effect, Tone.AudioNode);\n\n/**\n * @static\n * @type {Object}\n */\nTone.Effect.defaults = {\n\t\"wet\" : 1\n};\n\n/**\n * chains the effect in between the effectSend and effectReturn\n * @param {Tone} effect\n * @private\n * @returns {Tone.Effect} this\n */\nTone.Effect.prototype.connectEffect = function(effect){\n\tthis.effectSend.chain(effect, this.effectReturn);\n\treturn this;\n};\n\n/**\n * Clean up.\n * @returns {Tone.Effect} this\n */\nTone.Effect.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._dryWet.dispose();\n\tthis._dryWet = null;\n\tthis.effectSend.dispose();\n\tthis.effectSend = null;\n\tthis.effectReturn.dispose();\n\tthis.effectReturn = null;\n\tthis._writable([\"wet\"]);\n\tthis.wet = null;\n\treturn this;\n};\n\nexport default Tone.Effect;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Filter is a filter which allows for all of the same native methods\n * as the [BiquadFilterNode](http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface).\n * Tone.Filter has the added ability to set the filter rolloff at -12\n * (default), -24 and -48.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Frequency|Object} [frequency] The cutoff frequency of the filter.\n * @param {string=} type The type of filter.\n * @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.\n * 3 choices: -12, -24, and -48\n * @example\n * var filter = new Tone.Filter(200, \"highpass\");\n */\nTone.Filter = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\", \"rolloff\"], Tone.Filter);\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(1, 1);\n\n\t/**\n\t * the filter(s)\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._filters = [];\n\n\t/**\n\t * The cutoff frequency of the filter.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The detune parameter\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(0, Tone.Type.Cents);\n\n\t/**\n\t * The gain of the filter, only used in certain filter types\n\t * @type {Number}\n\t * @signal\n\t */\n\tthis.gain = new Tone.Signal({\n\t\t\"value\" : options.gain,\n\t\t\"convert\" : true,\n\t\t\"type\" : Tone.Type.Decibels\n\t});\n\n\t/**\n\t * The Q or Quality of the filter\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis.Q = new Tone.Signal(options.Q);\n\n\t/**\n\t * the type of the filter\n\t * @type {string}\n\t * @private\n\t */\n\tthis._type = options.type;\n\n\t/**\n\t * the rolloff value of the filter\n\t * @type {number}\n\t * @private\n\t */\n\tthis._rolloff = options.rolloff;\n\n\t//set the rolloff;\n\tthis.rolloff = options.rolloff;\n\tthis._readOnly([\"detune\", \"frequency\", \"gain\", \"Q\"]);\n};\n\nTone.extend(Tone.Filter, Tone.AudioNode);\n\n/**\n * the default parameters\n *\n * @static\n * @type {Object}\n */\nTone.Filter.defaults = {\n\t\"type\" : \"lowpass\",\n\t\"frequency\" : 350,\n\t\"rolloff\" : -12,\n\t\"Q\" : 1,\n\t\"gain\" : 0,\n};\n\n/**\n * The type of the filter. Types: \"lowpass\", \"highpass\",\n * \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", or \"peaking\".\n * @memberOf Tone.Filter#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.Filter.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._type;\n\t},\n\tset : function(type){\n\t\tvar types = [\"lowpass\", \"highpass\", \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", \"peaking\"];\n\t\tif (types.indexOf(type)=== -1){\n\t\t\tthrow new TypeError(\"Tone.Filter: invalid type \"+type);\n\t\t}\n\t\tthis._type = type;\n\t\tfor (var i = 0; i < this._filters.length; i++){\n\t\t\tthis._filters[i].type = type;\n\t\t}\n\t}\n});\n\n/**\n * The rolloff of the filter which is the drop in db\n * per octave. Implemented internally by cascading filters.\n * Only accepts the values -12, -24, -48 and -96.\n * @memberOf Tone.Filter#\n * @type {number}\n * @name rolloff\n */\nObject.defineProperty(Tone.Filter.prototype, \"rolloff\", {\n\tget : function(){\n\t\treturn this._rolloff;\n\t},\n\tset : function(rolloff){\n\t\trolloff = parseInt(rolloff, 10);\n\t\tvar possibilities = [-12, -24, -48, -96];\n\t\tvar cascadingCount = possibilities.indexOf(rolloff);\n\t\t//check the rolloff is valid\n\t\tif (cascadingCount === -1){\n\t\t\tthrow new RangeError(\"Tone.Filter: rolloff can only be -12, -24, -48 or -96\");\n\t\t}\n\t\tcascadingCount += 1;\n\t\tthis._rolloff = rolloff;\n\t\t//first disconnect the filters and throw them away\n\t\tthis.input.disconnect();\n\t\tfor (var i = 0; i < this._filters.length; i++){\n\t\t\tthis._filters[i].disconnect();\n\t\t\tthis._filters[i] = null;\n\t\t}\n\t\tthis._filters = new Array(cascadingCount);\n\t\tfor (var count = 0; count < cascadingCount; count++){\n\t\t\tvar filter = this.context.createBiquadFilter();\n\t\t\tfilter.type = this._type;\n\t\t\tthis.frequency.connect(filter.frequency);\n\t\t\tthis.detune.connect(filter.detune);\n\t\t\tthis.Q.connect(filter.Q);\n\t\t\tthis.gain.connect(filter.gain);\n\t\t\tthis._filters[count] = filter;\n\t\t}\n\t\t//connect them up\n\t\tvar connectionChain = [this.input].concat(this._filters).concat([this.output]);\n\t\tTone.connectSeries.apply(Tone, connectionChain);\n\t}\n});\n\n/**\n * Get the frequency response curve. This curve represets how the filter\n * responses to frequencies between 20hz-20khz. \n * @param {Number} [len=128] The number of values to return\n * @return {Float32Array} The frequency response curve between 20-20k\n */\nTone.Filter.prototype.getFrequencyResponse = function(len){\n\tlen = Tone.defaultArg(len, 128);\n\t//start with all 1s\n\tvar totalResponse = new Float32Array(len).map(function(){\n\t\treturn 1;\n\t});\n\tvar freqValues = new Float32Array(len);\n\tfor (var i = 0; i < len; i++){\n\t\tconst norm = Math.pow(i / len, 2);\n\t\tvar freq = norm * (20000 - 20) + 20;\n\t\tfreqValues[i] = freq;\n\t}\n\tvar magValues = new Float32Array(len);\n\tvar phaseValues = new Float32Array(len);\n\tthis._filters.forEach(function(){\n\t\tvar filterClone = this.context.createBiquadFilter();\n\t\tfilterClone.type = this._type;\n\t\tfilterClone.Q.value = this.Q.value;\n\t\tfilterClone.frequency.value = this.frequency.value;\n\t\tfilterClone.gain.value = this.gain.value;\n\t\tfilterClone.getFrequencyResponse(freqValues, magValues, phaseValues);\n\t\tmagValues.forEach(function(val, i){\n\t\t\ttotalResponse[i] *= val;\n\t\t});\n\t}.bind(this));\n\treturn totalResponse;\n};\n\n/**\n * Clean up.\n * @return {Tone.Filter} this\n */\nTone.Filter.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tfor (var i = 0; i < this._filters.length; i++){\n\t\tthis._filters[i].disconnect();\n\t\tthis._filters[i] = null;\n\t}\n\tthis._filters = null;\n\tthis._writable([\"detune\", \"frequency\", \"gain\", \"Q\"]);\n\tthis.frequency.dispose();\n\tthis.Q.dispose();\n\tthis.frequency = null;\n\tthis.Q = null;\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis.gain.dispose();\n\tthis.gain = null;\n\treturn this;\n};\n\nexport default Tone.Filter;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Merge brings two signals into the left and right\n * channels of a single stereo channel.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {number} [channels=2] The number of channels to merge. \n * @example\n * var merge = new Tone.Merge().toMaster();\n * //routing a sine tone in the left channel\n * //and noise in the right channel\n * var osc = new Tone.Oscillator().connect(merge.left);\n * var noise = new Tone.Noise().connect(merge.right);\n * //starting our oscillators\n * noise.start();\n * osc.start();\n */\nTone.Merge = function(channels){\n\n\t//defaults to 2 channels\n\tchannels = Tone.defaultArg(channels, 2);\n\t\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(channels, 0);\n\n\t/**\n\t * the merger node for the two channels\n\t * @type {ChannelMergerNode}\n\t * @private\n\t */\n\tthis._merger = this.output = this.context.createChannelMerger(channels);\n\n\t//connections\n\tfor (var i = 0; i < channels; i++){\n\t\tthis.input[i] = new Tone.Gain();\n\t\tthis.input[i].connect(this._merger, 0, i);\n\t\tthis.input[i].channelCount = 1;\n\t\tthis.input[i].channelCountMode = \"explicit\";\n\t}\n\n\t/**\n\t * The left input channel.\n\t * Alias for input[0]
\n\t * @type {GainNode}\n\t */\n\tthis.left = this.input[0];\n\n\t/**\n\t * The right input channel.\n\t * Alias for input[1]
.\n\t * @type {GainNode}\n\t */\n\tthis.right = this.input[1];\n};\n\nTone.extend(Tone.Merge, Tone.AudioNode);\n\n/**\n * Clean up.\n * @returns {Tone.Merge} this\n */\nTone.Merge.prototype.dispose = function(){\n\tthis.input.forEach(function(input){\n\t\tinput.dispose();\n\t});\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis.left = null;\n\tthis.right = null;\n\tthis._merger.disconnect();\n\tthis._merger = null;\n\treturn this;\n};\n\nexport default Tone.Merge;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * AudioBuffer.copyTo/FromChannel polyfill\n * @private\n */\nif (Tone.supported){\n\tif (!AudioBuffer.prototype.copyToChannel){\n\t\tAudioBuffer.prototype.copyToChannel = function(src, chanNum, start){\n\t\t\tvar channel = this.getChannelData(chanNum);\n\t\t\tstart = start || 0;\n\t\t\tfor (var i = 0; i < channel.length; i++){\n\t\t\t\tchannel[i+start] = src[i];\n\t\t\t}\n\t\t};\n\t\tAudioBuffer.prototype.copyFromChannel = function(dest, chanNum, start){\n\t\t\tvar channel = this.getChannelData(chanNum);\n\t\t\tstart = start || 0;\n\t\t\tfor (var i = 0; i < dest.length; i++){\n\t\t\t\tdest[i] = channel[i+start];\n\t\t\t}\n\t\t};\n\t}\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Emitter\";\nimport \"../type/Type\";\nimport \"../shim/AudioBuffer\";\n\n/**\n * @class Buffer loading and storage. Tone.Buffer is used internally by all\n * classes that make requests for audio files such as Tone.Player,\n * Tone.Sampler and Tone.Convolver.\n *\n * Aside from load callbacks from individual buffers, Tone.Buffer\n * \t\tprovides events which keep track of the loading progress\n * \t\tof _all_ of the buffers. These are Tone.Buffer.on(\"load\" / \"progress\" / \"error\")\n *\n * @constructor\n * @extends {Tone}\n * @param {AudioBuffer|String} url The url to load, or the audio buffer to set.\n * @param {Function=} onload A callback which is invoked after the buffer is loaded.\n * It's recommended to use `Tone.Buffer.on('load', callback)` instead\n * since it will give you a callback when _all_ buffers are loaded.\n * @param {Function=} onerror The callback to invoke if there is an error\n * @example\n * var buffer = new Tone.Buffer(\"path/to/sound.mp3\", function(){\n * \t//the buffer is now available.\n * \tvar buff = buffer.get();\n * });\n * @example\n * //can load provide fallback extension types if the first type is not supported.\n * var buffer = new Tone.Buffer(\"path/to/sound.[mp3|ogg|wav]\");\n */\nTone.Buffer = function(){\n\n\tvar options = Tone.defaults(arguments, [\"url\", \"onload\", \"onerror\"], Tone.Buffer);\n\tTone.call(this);\n\n\t/**\n\t * stores the loaded AudioBuffer\n\t * @type {AudioBuffer}\n\t * @private\n\t */\n\tthis._buffer = null;\n\n\t/**\n\t * indicates if the buffer should be reversed or not\n\t * @type {Boolean}\n\t * @private\n\t */\n\tthis._reversed = options.reverse;\n\n\t/**\n\t * The XHR\n\t * @type {XMLHttpRequest}\n\t * @private\n\t */\n\tthis._xhr = null;\n\n\t/**\n\t * Private callback when the buffer is loaded.\n\t * @type {Function}\n\t * @private\n\t */\n\tthis.onload = Tone.noOp;\n\n\tif (options.url instanceof AudioBuffer || options.url instanceof Tone.Buffer){\n\t\tthis.set(options.url);\n\t\tif (!this.loaded){\n\t\t\tthis.onload = options.onload;\n\t\t}\n\t} else if (Tone.isString(options.url)){\n\t\tthis.load(options.url).then(options.onload).catch(options.onerror);\n\t}\n};\n\nTone.extend(Tone.Buffer);\n\n/**\n * the default parameters\n * @type {Object}\n */\nTone.Buffer.defaults = {\n\t\"url\" : undefined,\n\t\"reverse\" : false,\n\t\"onload\" : Tone.noOp,\n\t\"onerror\" : Tone.noOp\n};\n\n/**\n * Pass in an AudioBuffer or Tone.Buffer to set the value\n * of this buffer.\n * @param {AudioBuffer|Tone.Buffer} buffer the buffer\n * @returns {Tone.Buffer} this\n */\nTone.Buffer.prototype.set = function(buffer){\n\tif (buffer instanceof Tone.Buffer){\n\t\t//if it's loaded, set it\n\t\tif (buffer.loaded){\n\t\t\tthis._buffer = buffer.get();\n\t\t} else {\n\t\t\t//otherwise when it's loaded, invoke it's callback\n\t\t\tbuffer.onload = function(){\n\t\t\t\tthis.set(buffer);\n\t\t\t\tthis.onload(this);\n\t\t\t}.bind(this);\n\t\t}\n\t} else {\n\t\tthis._buffer = buffer;\n\t}\n\t//reverse it initially\n\tif (this._reversed){\n\t\tthis._reverse();\n\t}\n\treturn this;\n};\n\n/**\n * @return {AudioBuffer} The audio buffer stored in the object.\n */\nTone.Buffer.prototype.get = function(){\n\treturn this._buffer;\n};\n\n/**\n * Makes an xhr reqest for the selected url then decodes\n * the file as an audio buffer. Invokes\n * the callback once the audio buffer loads.\n * @param {String} url The url of the buffer to load.\n * filetype support depends on the\n * browser.\n * @returns {Promise} returns a Promise which resolves with the Tone.Buffer\n */\nTone.Buffer.prototype.load = function(url, onload, onerror){\n\n\tvar promise = new Promise(function(load, error){\n\n\t\tthis._xhr = Tone.Buffer.load(url,\n\n\t\t\t//success\n\t\t\tfunction(buff){\n\t\t\t\tthis._xhr = null;\n\t\t\t\tthis.set(buff);\n\t\t\t\tload(this);\n\t\t\t\tthis.onload(this);\n\t\t\t\tif (onload){\n\t\t\t\t\tonload(this);\n\t\t\t\t}\n\t\t\t}.bind(this),\n\n\t\t\t//error\n\t\t\tfunction(err){\n\t\t\t\tthis._xhr = null;\n\t\t\t\terror(err);\n\t\t\t\tif (onerror){\n\t\t\t\t\tonerror(err);\n\t\t\t\t}\n\t\t\t}.bind(this));\n\n\t}.bind(this));\n\n\treturn promise;\n};\n\n/**\n * dispose and disconnect\n * @returns {Tone.Buffer} this\n */\nTone.Buffer.prototype.dispose = function(){\n\tTone.prototype.dispose.call(this);\n\tthis._buffer = null;\n\tif (this._xhr){\n\t\tTone.Buffer._removeFromDownloadQueue(this._xhr);\n\t\tthis._xhr.abort();\n\t\tthis._xhr = null;\n\t}\n\treturn this;\n};\n\n/**\n * If the buffer is loaded or not\n * @memberOf Tone.Buffer#\n * @type {Boolean}\n * @name loaded\n * @readOnly\n */\nObject.defineProperty(Tone.Buffer.prototype, \"loaded\", {\n\t\"get\" : function(){\n\t\treturn this.length > 0;\n\t},\n});\n\n/**\n * The duration of the buffer.\n * @memberOf Tone.Buffer#\n * @type {Number}\n * @name duration\n * @readOnly\n */\nObject.defineProperty(Tone.Buffer.prototype, \"duration\", {\n\t\"get\" : function(){\n\t\tif (this._buffer){\n\t\t\treturn this._buffer.duration;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t},\n});\n\n/**\n * The length of the buffer in samples\n * @memberOf Tone.Buffer#\n * @type {Number}\n * @name length\n * @readOnly\n */\nObject.defineProperty(Tone.Buffer.prototype, \"length\", {\n\t\"get\" : function(){\n\t\tif (this._buffer){\n\t\t\treturn this._buffer.length;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t},\n});\n\n/**\n * The number of discrete audio channels. Returns 0 if no buffer\n * is loaded.\n * @memberOf Tone.Buffer#\n * @type {Number}\n * @name numberOfChannels\n * @readOnly\n */\nObject.defineProperty(Tone.Buffer.prototype, \"numberOfChannels\", {\n\t\"get\" : function(){\n\t\tif (this._buffer){\n\t\t\treturn this._buffer.numberOfChannels;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t},\n});\n\n/**\n * Set the audio buffer from the array. To create a multichannel AudioBuffer,\n * pass in a multidimensional array.\n * @param {Float32Array} array The array to fill the audio buffer\n * @return {Tone.Buffer} this\n */\nTone.Buffer.prototype.fromArray = function(array){\n\tvar isMultidimensional = array[0].length > 0;\n\tvar channels = isMultidimensional ? array.length : 1;\n\tvar len = isMultidimensional ? array[0].length : array.length;\n\tvar buffer = this.context.createBuffer(channels, len, this.context.sampleRate);\n\tif (!isMultidimensional && channels === 1){\n\t\tarray = [array];\n\t}\n\tfor (var c = 0; c < channels; c++){\n\t\tbuffer.copyToChannel(array[c], c);\n\t}\n\tthis._buffer = buffer;\n\treturn this;\n};\n\n/**\n * \tSums muliple channels into 1 channel\n * @param {Number=} channel Optionally only copy a single channel from the array.\n * @return {Array}\n */\nTone.Buffer.prototype.toMono = function(chanNum){\n\tif (Tone.isNumber(chanNum)){\n\t\tthis.fromArray(this.toArray(chanNum));\n\t} else {\n\t\tvar outputArray = new Float32Array(this.length);\n\t\tvar numChannels = this.numberOfChannels;\n\t\tfor (var channel = 0; channel < numChannels; channel++){\n\t\t\tvar channelArray = this.toArray(channel);\n\t\t\tfor (var i = 0; i < channelArray.length; i++){\n\t\t\t\toutputArray[i] += channelArray[i];\n\t\t\t}\n\t\t}\n\t\t//divide by the number of channels\n\t\toutputArray = outputArray.map(function(sample){\n\t\t\treturn sample / numChannels;\n\t\t});\n\t\tthis.fromArray(outputArray);\n\t}\n\treturn this;\n};\n\n/**\n * \tGet the buffer as an array. Single channel buffers will return a 1-dimensional\n * \tFloat32Array, and multichannel buffers will return multidimensional arrays.\n * @param {Number=} channel Optionally only copy a single channel from the array.\n * @return {Array}\n */\nTone.Buffer.prototype.toArray = function(channel){\n\tif (Tone.isNumber(channel)){\n\t\treturn this.getChannelData(channel);\n\t} else if (this.numberOfChannels === 1){\n\t\treturn this.toArray(0);\n\t} else {\n\t\tvar ret = [];\n\t\tfor (var c = 0; c < this.numberOfChannels; c++){\n\t\t\tret[c] = this.getChannelData(c);\n\t\t}\n\t\treturn ret;\n\t}\n};\n\n/**\n * Returns the Float32Array representing the PCM audio data for the specific channel.\n * @param {Number} channel The channel number to return\n * @return {Float32Array} The audio as a TypedArray\n */\nTone.Buffer.prototype.getChannelData = function(channel){\n\treturn this._buffer.getChannelData(channel);\n};\n\n/**\n * Cut a subsection of the array and return a buffer of the\n * subsection. Does not modify the original buffer\n * @param {Time} start The time to start the slice\n * @param {Time=} end The end time to slice. If none is given\n * will default to the end of the buffer\n * @return {Tone.Buffer} this\n */\nTone.Buffer.prototype.slice = function(start, end){\n\tend = Tone.defaultArg(end, this.duration);\n\tvar startSamples = Math.floor(this.context.sampleRate * this.toSeconds(start));\n\tvar endSamples = Math.floor(this.context.sampleRate * this.toSeconds(end));\n\tvar replacement = [];\n\tfor (var i = 0; i < this.numberOfChannels; i++){\n\t\treplacement[i] = this.toArray(i).slice(startSamples, endSamples);\n\t}\n\tvar retBuffer = new Tone.Buffer().fromArray(replacement);\n\treturn retBuffer;\n};\n\n/**\n * Reverse the buffer.\n * @private\n * @return {Tone.Buffer} this\n */\nTone.Buffer.prototype._reverse = function(){\n\tif (this.loaded){\n\t\tfor (var i = 0; i < this.numberOfChannels; i++){\n\t\t\tArray.prototype.reverse.call(this.getChannelData(i));\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Reverse the buffer.\n * @memberOf Tone.Buffer#\n * @type {Boolean}\n * @name reverse\n */\nObject.defineProperty(Tone.Buffer.prototype, \"reverse\", {\n\t\"get\" : function(){\n\t\treturn this._reversed;\n\t},\n\t\"set\" : function(rev){\n\t\tif (this._reversed !== rev){\n\t\t\tthis._reversed = rev;\n\t\t\tthis._reverse();\n\t\t}\n\t},\n});\n\n///////////////////////////////////////////////////////////////////////////\n// STATIC METHODS\n///////////////////////////////////////////////////////////////////////////\n\n//statically inherits Emitter methods\nTone.Emitter.mixin(Tone.Buffer);\n\n/**\n * the static queue for all of the xhr requests\n * @type {Array}\n * @private\n */\nTone.Buffer._downloadQueue = [];\n\n/**\n * A path which is prefixed before every url.\n * @type {String}\n * @static\n */\nTone.Buffer.baseUrl = \"\";\n\n/**\n * Create a Tone.Buffer from the array. To create a multichannel AudioBuffer,\n * pass in a multidimensional array.\n * @param {Float32Array} array The array to fill the audio buffer\n * @return {Tone.Buffer} A Tone.Buffer created from the array\n */\nTone.Buffer.fromArray = function(array){\n\treturn (new Tone.Buffer()).fromArray(array);\n};\n\n/**\n * Creates a Tone.Buffer from a URL, returns a promise\n * which resolves to a Tone.Buffer\n * @param {String} url The url to load.\n * @return {Promise} A promise which resolves to a Tone.Buffer\n */\nTone.Buffer.fromUrl = function(url){\n\tvar buffer = new Tone.Buffer();\n\treturn buffer.load(url).then(function(){\n\t\treturn buffer;\n\t});\n};\n\n/**\n * Remove an xhr request from the download queue\n * @private\n */\nTone.Buffer._removeFromDownloadQueue = function(request){\n\tvar index = Tone.Buffer._downloadQueue.indexOf(request);\n\tif (index !== -1){\n\t\tTone.Buffer._downloadQueue.splice(index, 1);\n\t}\n};\n\n/**\n * Loads a url using XMLHttpRequest.\n * @param {String} url\n * @param {Function} onload\n * @param {Function} onerror\n * @param {Function} onprogress\n * @return {XMLHttpRequest}\n */\nTone.Buffer.load = function(url, onload, onerror){\n\t//default\n\tonload = Tone.defaultArg(onload, Tone.noOp);\n\n\t// test if the url contains multiple extensions\n\tvar matches = url.match(/\\[(.+\\|?)+\\]$/);\n\tif (matches){\n\t\tvar extensions = matches[1].split(\"|\");\n\t\tvar extension = extensions[0];\n\t\tfor (var i = 0; i < extensions.length; i++){\n\t\t\tif (Tone.Buffer.supportsType(extensions[i])){\n\t\t\t\textension = extensions[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\turl = url.replace(matches[0], extension);\n\t}\n\n\tfunction onError(e){\n\t\tTone.Buffer._removeFromDownloadQueue(request);\n\t\tTone.Buffer.emit(\"error\", e);\n\t\tif (onerror){\n\t\t\tonerror(e);\n\t\t} else {\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\tfunction onProgress(){\n\t\t//calculate the progress\n\t\tvar totalProgress = 0;\n\t\tfor (var i = 0; i < Tone.Buffer._downloadQueue.length; i++){\n\t\t\ttotalProgress += Tone.Buffer._downloadQueue[i].progress;\n\t\t}\n\t\tTone.Buffer.emit(\"progress\", totalProgress / Tone.Buffer._downloadQueue.length);\n\t}\n\n\tvar request = new XMLHttpRequest();\n\trequest.open(\"GET\", Tone.Buffer.baseUrl + url, true);\n\trequest.responseType = \"arraybuffer\";\n\t//start out as 0\n\trequest.progress = 0;\n\n\tTone.Buffer._downloadQueue.push(request);\n\n\trequest.addEventListener(\"load\", function(){\n\n\t\tif (request.status === 200){\n\t\t\tTone.context.decodeAudioData(request.response).then(function(buff){\n\n\t\t\t\trequest.progress = 1;\n\t\t\t\tonProgress();\n\t\t\t\tonload(buff);\n\n\t\t\t\tTone.Buffer._removeFromDownloadQueue(request);\n\t\t\t\tif (Tone.Buffer._downloadQueue.length === 0){\n\t\t\t\t\t//emit the event at the end\n\t\t\t\t\tTone.Buffer.emit(\"load\");\n\t\t\t\t}\n\t\t\t}).catch(function(){\n\t\t\t\tTone.Buffer._removeFromDownloadQueue(request);\n\t\t\t\tonError(\"Tone.Buffer: could not decode audio data: \"+url);\n\t\t\t});\n\t\t} else {\n\t\t\tonError(\"Tone.Buffer: could not locate file: \"+url);\n\t\t}\n\t});\n\trequest.addEventListener(\"error\", onError);\n\n\trequest.addEventListener(\"progress\", function(event){\n\t\tif (event.lengthComputable){\n\t\t\t//only go to 95%, the last 5% is when the audio is decoded\n\t\t\trequest.progress = (event.loaded / event.total) * 0.95;\n\t\t\tonProgress();\n\t\t}\n\t});\n\n\trequest.send();\n\n\treturn request;\n};\n\n/**\n * Stop all of the downloads in progress\n * @return {Tone.Buffer}\n * @static\n */\nTone.Buffer.cancelDownloads = function(){\n\tTone.Buffer._downloadQueue.slice().forEach(function(request){\n\t\tTone.Buffer._removeFromDownloadQueue(request);\n\t\trequest.abort();\n\t});\n\treturn Tone.Buffer;\n};\n\n/**\n * Checks a url's extension to see if the current browser can play that file type.\n * @param {String} url The url/extension to test\n * @return {Boolean} If the file extension can be played\n * @static\n * @example\n * Tone.Buffer.supportsType(\"wav\"); //returns true\n * Tone.Buffer.supportsType(\"path/to/file.wav\"); //returns true\n */\nTone.Buffer.supportsType = function(url){\n\tvar extension = url.split(\".\");\n\textension = extension[extension.length - 1];\n\tvar response = document.createElement(\"audio\").canPlayType(\"audio/\"+extension);\n\treturn response !== \"\";\n};\n\n/**\n * Returns a Promise which resolves when all of the buffers have loaded\n * @return {Promise}\n */\nTone.loaded = function(){\n\tvar onload, onerror;\n\tfunction removeEvents(){\n\t\t//remove the events when it's resolved\n\t\tTone.Buffer.off(\"load\", onload);\n\t\tTone.Buffer.off(\"error\", onerror);\n\t}\n\treturn new Promise(function(success, fail){\n\t\tonload = function(){\n\t\t\tsuccess();\n\t\t};\n\t\tonerror = function(){\n\t\t\tfail();\n\t\t};\n\t\t//add the event listeners\n\t\tTone.Buffer.on(\"load\", onload);\n\t\tTone.Buffer.on(\"error\", onerror);\n\t}).then(removeEvents).catch(function(e){\n\t\tremoveEvents();\n\t\tthrow new Error(e);\n\t});\n};\n\nexport default Tone.Buffer;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Oscillator\";\nimport \"../signal/Scale\";\nimport \"../core/AudioNode\";\nimport \"../signal/Signal\";\nimport \"../signal/AudioToGain\";\nimport \"../type/Type\";\nimport \"../signal/Zero\";\n\n/**\n * @class LFO stands for low frequency oscillator. Tone.LFO produces an output signal\n * which can be attached to an AudioParam or Tone.Signal\n * in order to modulate that parameter with an oscillator. The LFO can\n * also be synced to the transport to start/stop and change when the tempo changes.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be\n * in the frequency range of 0.1 to 10 hertz.\n * @param {number=} min The minimum output value of the LFO.\n * @param {number=} max The maximum value of the LFO.\n * @example\n * var lfo = new Tone.LFO(\"4n\", 400, 4000);\n * lfo.connect(filter.frequency);\n */\nTone.LFO = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"min\", \"max\"], Tone.LFO);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The oscillator.\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._oscillator = new Tone.Oscillator({\n\t\t\"frequency\" : options.frequency,\n\t\t\"type\" : options.type,\n\t});\n\n\t/**\n\t * the lfo's frequency\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._oscillator.frequency;\n\n\t/**\n\t * The amplitude of the LFO, which controls the output range between\n\t * the min and max output. For example if the min is -10 and the max\n\t * is 10, setting the amplitude to 0.5 would make the LFO modulate\n\t * between -5 and 5.\n\t * @type {Number}\n\t * @signal\n\t */\n\tthis.amplitude = this._oscillator.volume;\n\tthis.amplitude.units = Tone.Type.NormalRange;\n\tthis.amplitude.value = options.amplitude;\n\n\t/**\n\t * The signal which is output when the LFO is stopped\n\t * @type {Tone.Signal}\n\t * @private\n\t */\n\tthis._stoppedSignal = new Tone.Signal(0, Tone.Type.AudioRange);\n\n\t/**\n\t * Just outputs zeros.\n\t * @type {Tone.Zero}\n\t * @private\n\t */\n\tthis._zeros = new Tone.Zero();\n\n\t/**\n\t * The value that the LFO outputs when it's stopped\n\t * @type {AudioRange}\n\t * @private\n\t */\n\tthis._stoppedValue = 0;\n\n\t/**\n\t * @type {Tone.AudioToGain}\n\t * @private\n\t */\n\tthis._a2g = new Tone.AudioToGain();\n\n\t/**\n\t * @type {Tone.Scale}\n\t * @private\n\t */\n\tthis._scaler = this.output = new Tone.Scale(options.min, options.max);\n\n\t/**\n\t * the units of the LFO (used for converting)\n\t * @type {Tone.Type}\n\t * @private\n\t */\n\tthis._units = Tone.Type.Default;\n\tthis.units = options.units;\n\n\t//connect it up\n\tthis._oscillator.chain(this._a2g, this._scaler);\n\tthis._zeros.connect(this._a2g);\n\tthis._stoppedSignal.connect(this._a2g);\n\tthis._readOnly([\"amplitude\", \"frequency\"]);\n\tthis.phase = options.phase;\n};\n\nTone.extend(Tone.LFO, Tone.AudioNode);\n\n/**\n * the default parameters\n *\n * @static\n * @const\n * @type {Object}\n */\nTone.LFO.defaults = {\n\t\"type\" : \"sine\",\n\t\"min\" : 0,\n\t\"max\" : 1,\n\t\"phase\" : 0,\n\t\"frequency\" : \"4n\",\n\t\"amplitude\" : 1,\n\t\"units\" : Tone.Type.Default\n};\n\n/**\n * Start the LFO.\n * @param {Time} [time=now] the time the LFO will start\n * @returns {Tone.LFO} this\n */\nTone.LFO.prototype.start = function(time){\n\ttime = this.toSeconds(time);\n\tthis._stoppedSignal.setValueAtTime(0, time);\n\tthis._oscillator.start(time);\n\treturn this;\n};\n\n/**\n * Stop the LFO.\n * @param {Time} [time=now] the time the LFO will stop\n * @returns {Tone.LFO} this\n */\nTone.LFO.prototype.stop = function(time){\n\ttime = this.toSeconds(time);\n\tthis._stoppedSignal.setValueAtTime(this._stoppedValue, time);\n\tthis._oscillator.stop(time);\n\treturn this;\n};\n\n/**\n * Sync the start/stop/pause to the transport\n * and the frequency to the bpm of the transport\n * @returns {Tone.LFO} this\n * @example\n * lfo.frequency.value = \"8n\";\n * lfo.sync().start(0)\n * //the rate of the LFO will always be an eighth note,\n * //even as the tempo changes\n */\nTone.LFO.prototype.sync = function(){\n\tthis._oscillator.sync();\n\tthis._oscillator.syncFrequency();\n\treturn this;\n};\n\n/**\n * unsync the LFO from transport control\n * @returns {Tone.LFO} this\n */\nTone.LFO.prototype.unsync = function(){\n\tthis._oscillator.unsync();\n\tthis._oscillator.unsyncFrequency();\n\treturn this;\n};\n\n/**\n * The miniumum output of the LFO.\n * @memberOf Tone.LFO#\n * @type {number}\n * @name min\n */\nObject.defineProperty(Tone.LFO.prototype, \"min\", {\n\tget : function(){\n\t\treturn this._toUnits(this._scaler.min);\n\t},\n\tset : function(min){\n\t\tmin = this._fromUnits(min);\n\t\tthis._scaler.min = min;\n\t}\n});\n\n/**\n * The maximum output of the LFO.\n * @memberOf Tone.LFO#\n * @type {number}\n * @name max\n */\nObject.defineProperty(Tone.LFO.prototype, \"max\", {\n\tget : function(){\n\t\treturn this._toUnits(this._scaler.max);\n\t},\n\tset : function(max){\n\t\tmax = this._fromUnits(max);\n\t\tthis._scaler.max = max;\n\t}\n});\n\n/**\n * The type of the oscillator: sine, square, sawtooth, triangle.\n * @memberOf Tone.LFO#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.LFO.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._oscillator.type;\n\t},\n\tset : function(type){\n\t\tthis._oscillator.type = type;\n\t\tthis._stoppedValue = this._oscillator._getInitialValue();\n\t\tthis._stoppedSignal.value = this._stoppedValue;\n\t}\n});\n\n/**\n * The phase of the LFO.\n * @memberOf Tone.LFO#\n * @type {number}\n * @name phase\n */\nObject.defineProperty(Tone.LFO.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._oscillator.phase;\n\t},\n\tset : function(phase){\n\t\tthis._oscillator.phase = phase;\n\t\tthis._stoppedValue = this._oscillator._getInitialValue();\n\t\tthis._stoppedSignal.value = this._stoppedValue;\n\t}\n});\n\n/**\n * The output units of the LFO.\n * @memberOf Tone.LFO#\n * @type {Tone.Type}\n * @name units\n */\nObject.defineProperty(Tone.LFO.prototype, \"units\", {\n\tget : function(){\n\t\treturn this._units;\n\t},\n\tset : function(val){\n\t\tvar currentMin = this.min;\n\t\tvar currentMax = this.max;\n\t\t//convert the min and the max\n\t\tthis._units = val;\n\t\tthis.min = currentMin;\n\t\tthis.max = currentMax;\n\t}\n});\n\n/**\n * Returns the playback state of the source, either \"started\" or \"stopped\".\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.LFO#\n * @name state\n */\nObject.defineProperty(Tone.LFO.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._oscillator.state;\n\t}\n});\n\n/**\n * Connect the output of the LFO to an AudioParam, AudioNode, or Tone Node.\n * Tone.LFO will automatically convert to the destination units of the\n * will get the units from the connected node.\n * @param {Tone | AudioParam | AudioNode} node\n * @param {number} [outputNum=0] optionally which output to connect from\n * @param {number} [inputNum=0] optionally which input to connect to\n * @returns {Tone.LFO} this\n * @private\n */\nTone.LFO.prototype.connect = function(node){\n\tif (node.constructor === Tone.Signal || node.constructor === Tone.Param){\n\t\tthis.convert = node.convert;\n\t\tthis.units = node.units;\n\t}\n\tTone.SignalBase.prototype.connect.apply(this, arguments);\n\treturn this;\n};\n\n/**\n * private method borrowed from Param converts\n * units from their destination value\n * @function\n * @private\n */\nTone.LFO.prototype._fromUnits = Tone.Param.prototype._fromUnits;\n\n/**\n * private method borrowed from Param converts\n * units to their destination value\n * @function\n * @private\n */\nTone.LFO.prototype._toUnits = Tone.Param.prototype._toUnits;\n\n/**\n * disconnect and dispose\n * @returns {Tone.LFO} this\n */\nTone.LFO.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"amplitude\", \"frequency\"]);\n\tthis._oscillator.dispose();\n\tthis._oscillator = null;\n\tthis._stoppedSignal.dispose();\n\tthis._stoppedSignal = null;\n\tthis._zeros.dispose();\n\tthis._zeros = null;\n\tthis._scaler.dispose();\n\tthis._scaler = null;\n\tthis._a2g.dispose();\n\tthis._a2g = null;\n\tthis.frequency = null;\n\tthis.amplitude = null;\n\treturn this;\n};\n\nexport default Tone.LFO;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Add\";\nimport \"../signal/Negate\";\nimport \"../signal/Signal\";\nimport \"../core/Gain\";\n\n/**\n * @class Subtract the signal connected to input[1]
from the signal connected \n * to input[0]
. If an argument is provided in the constructor, the \n * signals .value
will be subtracted from the incoming signal.\n *\n * @extends {Tone.Signal}\n * @constructor\n * @param {number=} value The value to subtract from the incoming signal. If the value\n * is omitted, it will subtract the second signal from the first.\n * @example\n * var sub = new Tone.Subtract(1);\n * var sig = new Tone.Signal(4).connect(sub);\n * //the output of sub is 3. \n * @example\n * var sub = new Tone.Subtract();\n * var sigA = new Tone.Signal(10);\n * var sigB = new Tone.Signal(2.5);\n * sigA.connect(sub, 0, 0);\n * sigB.connect(sub, 0, 1);\n * //output of sub is 7.5\n */\nTone.Subtract = function(value){\n\n\tTone.Signal.call(this);\n\tthis.createInsOuts(2, 0);\n\n\t/**\n\t * the summing node\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis._sum = this.input[0] = this.output = new Tone.Gain();\n\n\t/**\n\t * negate the input of the second input before connecting it\n\t * to the summing node.\n\t * @type {Tone.Negate}\n\t * @private\n\t */\n\tthis._neg = new Tone.Negate();\n\n\t/**\n\t * the node where the value is set\n\t * @private\n\t * @type {Tone.Signal}\n\t */\n\tthis._param = this.input[1] = new Tone.Signal(value);\n\tthis._param.chain(this._neg, this._sum);\n};\n\nTone.extend(Tone.Subtract, Tone.Signal);\n\n/**\n * Clean up.\n * @returns {Tone.SignalBase} this\n */\nTone.Subtract.prototype.dispose = function(){\n\tTone.Signal.prototype.dispose.call(this);\n\tthis._neg.dispose();\n\tthis._neg = null;\n\tthis._sum.disconnect();\n\tthis._sum = null;\n\treturn this;\n};\n\nexport default Tone.Subtract;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Type\";\nimport \"../core/AudioNode\";\nimport \"../core/Timeline\";\n\n/**\n * @class Tone.Param wraps the native Web Audio's AudioParam to provide\n * additional unit conversion functionality. It also\n * serves as a base-class for classes which have a single,\n * automatable parameter.\n * @extends {Tone.AudioNode}\n * @param {AudioParam} param The parameter to wrap.\n * @param {Tone.Type} units The units of the audio param.\n * @param {Boolean} convert If the param should be converted.\n */\nTone.Param = function(){\n\n\tvar options = Tone.defaults(arguments, [\"param\", \"units\", \"convert\"], Tone.Param);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The native parameter to control\n\t * @type {AudioParam}\n\t * @private\n\t */\n\tthis._param = this.input = options.param;\n\n\t/**\n\t * The units of the parameter\n\t * @type {Tone.Type}\n\t */\n\tthis.units = options.units;\n\n\t/**\n\t * If the value should be converted or not\n\t * @type {Boolean}\n\t */\n\tthis.convert = options.convert;\n\n\t/**\n\t * True if the signal value is being overridden by\n\t * a connected signal.\n\t * @readOnly\n\t * @type {boolean}\n\t * @private\n\t */\n\tthis.overridden = false;\n\n\t/**\n\t * The timeline which tracks all of the automations.\n\t * @type {Tone.Timeline}\n\t * @private\n\t */\n\tthis._events = new Tone.Timeline(1000);\n\n\tif (Tone.isDefined(options.value) && this._param){\n\t\tthis.setValueAtTime(options.value, 0);\n\t}\n};\n\nTone.extend(Tone.Param, Tone.AudioNode);\n\n/**\n * Defaults\n * @type {Object}\n * @const\n */\nTone.Param.defaults = {\n\t\"units\" : Tone.Type.Default,\n\t\"convert\" : true,\n\t\"param\" : undefined\n};\n\n/**\n * The current value of the parameter.\n * @memberOf Tone.Param#\n * @type {Number}\n * @name value\n */\nObject.defineProperty(Tone.Param.prototype, \"value\", {\n\tget : function(){\n\t\tvar now = this.now();\n\t\treturn this._toUnits(this.getValueAtTime(now));\n\t},\n\tset : function(value){\n\t\tthis._initialValue = this._fromUnits(value);\n\t\tthis.cancelScheduledValues(this.now());\n\t\tthis.setValueAtTime(value, this.now());\n\t}\n});\n\n/**\n * The minimum output value of the parameter\n * @memberOf Tone.Param#\n * @type {Number}\n * @name value\n */\nObject.defineProperty(Tone.Param.prototype, \"minValue\", {\n\tget : function(){\n\t\tif (this.units === Tone.Type.Time || this.units === Tone.Type.Frequency ||\n\t\t\tthis.units === Tone.Type.NormalRange || this.units === Tone.Type.Positive ||\n\t\t\tthis.units === Tone.Type.BPM){\n\t\t\treturn 0;\n\t\t} else if (this.units === Tone.Type.AudioRange){\n\t\t\treturn -1;\n\t\t} else if (this.units === Tone.Type.Decibels){\n\t\t\treturn -Infinity;\n\t\t} else {\n\t\t\treturn this._param.minValue;\n\t\t}\n\t}\n});\n\n/**\n * The maximum output value of the parameter\n * @memberOf Tone.Param#\n * @type {Number}\n * @name value\n */\nObject.defineProperty(Tone.Param.prototype, \"maxValue\", {\n\tget : function(){\n\t\tif (this.units === Tone.Type.NormalRange ||\n\t\t\tthis.units === Tone.Type.AudioRange){\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn this._param.maxValue;\n\t\t}\n\t}\n});\n\n/**\n * Convert the given value from the type specified by Tone.Param.units\n * into the destination value (such as Gain or Frequency).\n * @private\n * @param {*} val the value to convert\n * @return {number} the number which the value should be set to\n */\nTone.Param.prototype._fromUnits = function(val){\n\tif ((this.convert || Tone.isUndef(this.convert)) && !this.overridden){\n\t\tswitch (this.units){\n\t\t\tcase Tone.Type.Time:\n\t\t\t\treturn this.toSeconds(val);\n\t\t\tcase Tone.Type.Frequency:\n\t\t\t\treturn this.toFrequency(val);\n\t\t\tcase Tone.Type.Decibels:\n\t\t\t\treturn Tone.dbToGain(val);\n\t\t\tcase Tone.Type.NormalRange:\n\t\t\t\treturn Math.min(Math.max(val, 0), 1);\n\t\t\tcase Tone.Type.AudioRange:\n\t\t\t\treturn Math.min(Math.max(val, -1), 1);\n\t\t\tcase Tone.Type.Positive:\n\t\t\t\treturn Math.max(val, 0);\n\t\t\tdefault:\n\t\t\t\treturn val;\n\t\t}\n\t} else {\n\t\treturn val;\n\t}\n};\n\n/**\n * Convert the parameters value into the units specified by Tone.Param.units.\n * @private\n * @param {number} val the value to convert\n * @return {number}\n */\nTone.Param.prototype._toUnits = function(val){\n\tif (this.convert || Tone.isUndef(this.convert)){\n\t\tswitch (this.units){\n\t\t\tcase Tone.Type.Decibels:\n\t\t\t\treturn Tone.gainToDb(val);\n\t\t\tdefault:\n\t\t\t\treturn val;\n\t\t}\n\t} else {\n\t\treturn val;\n\t}\n};\n\n/**\n * the minimum output value\n * @type {Number}\n * @private\n */\nTone.Param.prototype._minOutput = 1e-5;\n\n/**\n * The event types\n * @enum {String}\n * @private\n */\nTone.Param.AutomationType = {\n\tLinear : \"linearRampToValueAtTime\",\n\tExponential : \"exponentialRampToValueAtTime\",\n\tTarget : \"setTargetAtTime\",\n\tSetValue : \"setValueAtTime\",\n\tCancel : \"cancelScheduledValues\"\n};\n\n/**\n * Schedules a parameter value change at the given time.\n * @param {*}\tvalue The value to set the signal.\n * @param {Time} time The time when the change should occur.\n * @returns {Tone.Param} this\n * @example\n * //set the frequency to \"G4\" in exactly 1 second from now.\n * freq.setValueAtTime(\"G4\", \"+1\");\n */\nTone.Param.prototype.setValueAtTime = function(value, time){\n\ttime = this.toSeconds(time);\n\tvalue = this._fromUnits(value);\n\tthis._events.add({\n\t\t\"type\" : Tone.Param.AutomationType.SetValue,\n\t\t\"value\" : value,\n\t\t\"time\" : time,\n\t});\n\tthis.log(Tone.Param.AutomationType.SetValue, value, time);\n\tthis._param.setValueAtTime(value, time);\n\treturn this;\n};\n\n/**\n * Get the signals value at the given time. Subsequent scheduling\n * may invalidate the returned value.\n * @param {Time} time When to get the value\n * @returns {Number} The value at the given time\n */\nTone.Param.prototype.getValueAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tvar after = this._events.getAfter(time);\n\tvar before = this._events.get(time);\n\tvar initialValue = Tone.defaultArg(this._initialValue, this._param.defaultValue);\n\tvar value = initialValue;\n\t//if it was set by\n\tif (before === null){\n\t\tvalue = initialValue;\n\t} else if (before.type === Tone.Param.AutomationType.Target){\n\t\tvar previous = this._events.getBefore(before.time);\n\t\tvar previousVal;\n\t\tif (previous === null){\n\t\t\tpreviousVal = initialValue;\n\t\t} else {\n\t\t\tpreviousVal = previous.value;\n\t\t}\n\t\tvalue = this._exponentialApproach(before.time, previousVal, before.value, before.constant, time);\n\t} else if (after === null){\n\t\tvalue = before.value;\n\t} else if (after.type === Tone.Param.AutomationType.Linear){\n\t\tvalue = this._linearInterpolate(before.time, before.value, after.time, after.value, time);\n\t} else if (after.type === Tone.Param.AutomationType.Exponential){\n\t\tvalue = this._exponentialInterpolate(before.time, before.value, after.time, after.value, time);\n\t} else {\n\t\tvalue = before.value;\n\t}\n\treturn value;\n};\n\n/**\n * Creates a schedule point with the current value at the current time.\n * This is useful for creating an automation anchor point in order to\n * schedule changes from the current value.\n *\n * @param {number=} now (Optionally) pass the now value in.\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.setRampPoint = function(time){\n\ttime = this.toSeconds(time);\n\tvar currentVal = this.getValueAtTime(time);\n\tthis.cancelAndHoldAtTime(time);\n\tif (currentVal === 0){\n\t\tcurrentVal = this._minOutput;\n\t}\n\tthis.setValueAtTime(this._toUnits(currentVal), time);\n\treturn this;\n};\n\n/**\n * Schedules a linear continuous change in parameter value from the\n * previous scheduled parameter value to the given value.\n *\n * @param {number} value\n * @param {Time} endTime\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.linearRampToValueAtTime = function(value, endTime){\n\tvalue = this._fromUnits(value);\n\tendTime = this.toSeconds(endTime);\n\tthis._events.add({\n\t\t\"type\" : Tone.Param.AutomationType.Linear,\n\t\t\"value\" : value,\n\t\t\"time\" : endTime,\n\t});\n\tthis.log(Tone.Param.AutomationType.Linear, value, endTime);\n\tthis._param.linearRampToValueAtTime(value, endTime);\n\treturn this;\n};\n\n/**\n * Schedules an exponential continuous change in parameter value from\n * the previous scheduled parameter value to the given value.\n *\n * @param {number} value\n * @param {Time} endTime\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.exponentialRampToValueAtTime = function(value, endTime){\n\tvalue = this._fromUnits(value);\n\tvalue = Math.max(this._minOutput, value);\n\tendTime = this.toSeconds(endTime);\n\t//store the event\n\tthis._events.add({\n\t\t\"type\" : Tone.Param.AutomationType.Exponential,\n\t\t\"time\" : endTime,\n\t\t\"value\" : value\n\t});\n\tthis.log(Tone.Param.AutomationType.Exponential, value, endTime);\n\tthis._param.exponentialRampToValueAtTime(value, endTime);\n\treturn this;\n};\n\n/**\n * Schedules an exponential continuous change in parameter value from\n * the current time and current value to the given value over the\n * duration of the rampTime.\n *\n * @param {number} value The value to ramp to.\n * @param {Time} rampTime the time that it takes the\n * value to ramp from it's current value\n * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n * @returns {Tone.Param} this\n * @example\n * //exponentially ramp to the value 2 over 4 seconds.\n * signal.exponentialRampTo(2, 4);\n */\nTone.Param.prototype.exponentialRampTo = function(value, rampTime, startTime){\n\tstartTime = this.toSeconds(startTime);\n\tthis.setRampPoint(startTime);\n\tthis.exponentialRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\treturn this;\n};\n\n/**\n * Schedules an linear continuous change in parameter value from\n * the current time and current value to the given value over the\n * duration of the rampTime.\n *\n * @param {number} value The value to ramp to.\n * @param {Time} rampTime the time that it takes the\n * value to ramp from it's current value\n * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n * @returns {Tone.Param} this\n * @example\n * //linearly ramp to the value 4 over 3 seconds.\n * signal.linearRampTo(4, 3);\n */\nTone.Param.prototype.linearRampTo = function(value, rampTime, startTime){\n\tstartTime = this.toSeconds(startTime);\n\tthis.setRampPoint(startTime);\n\tthis.linearRampToValueAtTime(value, startTime + this.toSeconds(rampTime));\n\treturn this;\n};\n\n/**\n * Start exponentially approaching the target value at the given time. Since it\n * is an exponential approach it will continue approaching after the ramp duration. The\n * rampTime is the time that it takes to reach over 99% of the way towards the value.\n * @param {number} value The value to ramp to.\n * @param {Time} rampTime the time that it takes the\n * value to ramp from it's current value\n * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n * @returns {Tone.Param} this\n * @example\n * //exponentially ramp to the value 2 over 4 seconds.\n * signal.exponentialRampTo(2, 4);\n */\nTone.Param.prototype.targetRampTo = function(value, rampTime, startTime){\n\tstartTime = this.toSeconds(startTime);\n\tthis.setRampPoint(startTime);\n\tthis.exponentialApproachValueAtTime(value, startTime, rampTime);\n\treturn this;\n};\n\n/**\n * Start exponentially approaching the target value at the given time. Since it\n * is an exponential approach it will continue approaching after the ramp duration. The\n * rampTime is the time that it takes to reach over 99% of the way towards the value. This methods\n * is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'\n * @param {number} value The value to ramp to.\n * @param {Time}\ttime \tWhen the ramp should start.\n * @param {Time} rampTime the time that it takes the\n * value to ramp from it's current value\n * @returns {Tone.Param} this\n * @example\n * //exponentially ramp to the value 2 over 4 seconds.\n * signal.exponentialRampTo(2, 4);\n */\nTone.Param.prototype.exponentialApproachValueAtTime = function(value, time, rampTime){\n\tvar timeConstant = Math.log(this.toSeconds(rampTime)+1)/Math.log(200);\n\ttime = this.toSeconds(time);\n\tthis.setTargetAtTime(value, time, timeConstant);\n\t//at 90% start a linear ramp to the final value\n\tthis.cancelAndHoldAtTime(time + rampTime * 0.9);\n\tthis.linearRampToValueAtTime(value, time + rampTime);\n\treturn this;\n};\n\n/**\n * Start exponentially approaching the target value at the given time with\n * a rate having the given time constant.\n * @param {number} value\n * @param {Time} startTime\n * @param {number} timeConstant\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.setTargetAtTime = function(value, startTime, timeConstant){\n\tvalue = this._fromUnits(value);\n\t// The value will never be able to approach without timeConstant > 0.\n\tif (timeConstant <= 0){\n\t\tthrow new Error(\"timeConstant must be greater than 0\");\n\t}\n\tstartTime = this.toSeconds(startTime);\n\tthis._events.add({\n\t\t\"type\" : Tone.Param.AutomationType.Target,\n\t\t\"value\" : value,\n\t\t\"time\" : startTime,\n\t\t\"constant\" : timeConstant\n\t});\n\tthis.log(Tone.Param.AutomationType.Target, value, startTime, timeConstant);\n\tthis._param.setTargetAtTime(value, startTime, timeConstant);\n\treturn this;\n};\n\n/**\n * Sets an array of arbitrary parameter values starting at the given time\n * for the given duration.\n *\n * @param {Array} values\n * @param {Time} startTime\n * @param {Time} duration\n * @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.setValueCurveAtTime = function(values, startTime, duration, scaling){\n\tscaling = Tone.defaultArg(scaling, 1);\n\tduration = this.toSeconds(duration);\n\tstartTime = this.toSeconds(startTime);\n\tthis.setValueAtTime(values[0] * scaling, startTime);\n\tvar segTime = duration / (values.length - 1);\n\tfor (var i = 1; i < values.length; i++){\n\t\tthis.linearRampToValueAtTime(values[i] * scaling, startTime + i * segTime);\n\t}\n\treturn this;\n};\n\n/**\n * Cancels all scheduled parameter changes with times greater than or\n * equal to startTime.\n *\n * @param {Time} time\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.cancelScheduledValues = function(time){\n\ttime = this.toSeconds(time);\n\tthis._events.cancel(time);\n\tthis._param.cancelScheduledValues(time);\n\tthis.log(Tone.Param.AutomationType.Cancel, time);\n\treturn this;\n};\n\n/**\n * This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n * it holds the automated value at time until the next automated event.\n * @param {Time} time\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.cancelAndHoldAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tvar valueAtTime = this.getValueAtTime(time);\n\tthis.log(\"cancelAndHoldAtTime\", time, \"value=\"+valueAtTime);\n\n\t//remove the schedule events\n\tthis._param.cancelScheduledValues(time);\n\n\t//if there is an event at the given time\n\t//and that even is not a \"set\"\n\tvar before = this._events.get(time);\n\tvar after = this._events.getAfter(time);\n\tif (before && before.time === time){\n\t\t//remove everything after\n\t\tif (after){\n\t\t\tthis._events.cancel(after.time);\n\t\t} else {\n\t\t\tthis._events.cancel(time + this.sampleTime);\n\t\t}\n\t} else if (after){\n\t\t//cancel the next event(s)\n\t\tthis._events.cancel(after.time);\n\t\tif (after.type === Tone.Param.AutomationType.Linear){\n\t\t\tthis.linearRampToValueAtTime(valueAtTime, time);\n\t\t} else if (after.type === Tone.Param.AutomationType.Exponential){\n\t\t\tthis.exponentialRampToValueAtTime(valueAtTime, time);\n\t\t}\n\t}\n\n\t//set the value at the given time\n\tthis._events.add({\n\t\t\"type\" : Tone.Param.AutomationType.SetValue,\n\t\t\"value\" : valueAtTime,\n\t\t\"time\" : time\n\t});\n\tthis._param.setValueAtTime(valueAtTime, time);\n\treturn this;\n};\n\n/**\n * Ramps to the given value over the duration of the rampTime.\n * Automatically selects the best ramp type (exponential or linear)\n * depending on the `units` of the signal\n *\n * @param {number} value\n * @param {Time} rampTime \tThe time that it takes the\n * value to ramp from it's current value\n * @param {Time}\t[startTime=now] \tWhen the ramp should start.\n * @returns {Tone.Param} this\n * @example\n * //ramp to the value either linearly or exponentially\n * //depending on the \"units\" value of the signal\n * signal.rampTo(0, 10);\n * @example\n * //schedule it to ramp starting at a specific time\n * signal.rampTo(0, 10, 5)\n */\nTone.Param.prototype.rampTo = function(value, rampTime, startTime){\n\trampTime = Tone.defaultArg(rampTime, 0.1);\n\tif (this.units === Tone.Type.Frequency || this.units === Tone.Type.BPM || this.units === Tone.Type.Decibels){\n\t\tthis.exponentialRampTo(value, rampTime, startTime);\n\t} else {\n\t\tthis.linearRampTo(value, rampTime, startTime);\n\t}\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tAUTOMATION CURVE CALCULATIONS\n//\tMIT License, copyright (c) 2014 Jordan Santell\n///////////////////////////////////////////////////////////////////////////\n\n// Calculates the the value along the curve produced by setTargetAtTime\nTone.Param.prototype._exponentialApproach = function(t0, v0, v1, timeConstant, t){\n\treturn v1 + (v0 - v1) * Math.exp(-(t - t0) / timeConstant);\n};\n\n// Calculates the the value along the curve produced by linearRampToValueAtTime\nTone.Param.prototype._linearInterpolate = function(t0, v0, t1, v1, t){\n\treturn v0 + (v1 - v0) * ((t - t0) / (t1 - t0));\n};\n\n// Calculates the the value along the curve produced by exponentialRampToValueAtTime\nTone.Param.prototype._exponentialInterpolate = function(t0, v0, t1, v1, t){\n\treturn v0 * Math.pow(v1 / v0, (t - t0) / (t1 - t0));\n};\n\n/**\n * Clean up\n * @returns {Tone.Param} this\n */\nTone.Param.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._param = null;\n\tthis._events = null;\n\treturn this;\n};\n\nexport default Tone.Param;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../component/Split\";\nimport \"../component/Merge\";\nimport \"../component/CrossFade\";\n\n/**\n * @class Base class for Stereo effects. Provides effectSendL/R and effectReturnL/R.\n *\n *\t@constructor\n *\t@extends {Tone.Effect}\n */\nTone.StereoEffect = function(){\n\n\t//get the defaults\n\tTone.AudioNode.call(this);\n\tvar options = Tone.defaults(arguments, [\"wet\"], Tone.Effect);\n\tthis.createInsOuts(1, 1);\n\n\t/**\n\t * the drywet knob to control the amount of effect\n\t * @type {Tone.CrossFade}\n\t * @private\n\t */\n\tthis._dryWet = new Tone.CrossFade(options.wet);\n\n\t/**\n\t * The wet control, i.e. how much of the effected\n\t * will pass through to the output.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.wet = this._dryWet.fade;\n\n\t/**\n\t * then split it\n\t * @type {Tone.Split}\n\t * @private\n\t */\n\tthis._split = new Tone.Split();\n\n\t/**\n\t * the effects send LEFT\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.effectSendL = this._split.left;\n\n\t/**\n\t * the effects send RIGHT\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.effectSendR = this._split.right;\n\n\t/**\n\t * the stereo effect merger\n\t * @type {Tone.Merge}\n\t * @private\n\t */\n\tthis._merge = new Tone.Merge();\n\n\t/**\n\t * the effect return LEFT\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.effectReturnL = this._merge.left;\n\n\t/**\n\t * the effect return RIGHT\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.effectReturnR = this._merge.right;\n\n\t//connections\n\tTone.connect(this.input, this._split);\n\t//dry wet connections\n\tTone.connect(this.input, this._dryWet, 0, 0);\n\tthis._merge.connect(this._dryWet, 0, 1);\n\tthis._dryWet.connect(this.output);\n\tthis._readOnly([\"wet\"]);\n};\n\nTone.extend(Tone.StereoEffect, Tone.Effect);\n\n/**\n * Clean up.\n * @returns {Tone.StereoEffect} this\n */\nTone.StereoEffect.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._dryWet.dispose();\n\tthis._dryWet = null;\n\tthis._split.dispose();\n\tthis._split = null;\n\tthis._merge.dispose();\n\tthis._merge = null;\n\tthis.effectSendL = null;\n\tthis.effectSendR = null;\n\tthis.effectReturnL = null;\n\tthis.effectReturnR = null;\n\tthis._writable([\"wet\"]);\n\tthis.wet = null;\n\treturn this;\n};\n\nexport default Tone.StereoEffect;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Clock\";\nimport \"../type/Type\";\nimport \"../core/Timeline\";\nimport \"../core/Emitter\";\nimport \"../core/Gain\";\nimport \"../core/IntervalTimeline\";\nimport \"../core/TransportRepeatEvent\";\nimport \"../core/TransportEvent\";\n\n/**\n * @class Transport for timing musical events.\n * Supports tempo curves and time changes. Unlike browser-based timing (setInterval, requestAnimationFrame)\n * Tone.Transport timing events pass in the exact time of the scheduled event\n * in the argument of the callback function. Pass that time value to the object\n * you're scheduling.
\n * A single transport is created for you when the library is initialized.\n *
\n * The transport emits the events: \"start\", \"stop\", \"pause\", and \"loop\" which are\n * called with the time of that event as the argument.\n *\n * @extends {Tone.Emitter}\n * @singleton\n * @example\n * //repeated event every 8th note\n * Tone.Transport.scheduleRepeat(function(time){\n * \t//do something with the time\n * }, \"8n\");\n * @example\n * //schedule an event on the 16th measure\n * Tone.Transport.schedule(function(time){\n * \t//do something with the time\n * }, \"16:0:0\");\n */\nTone.Transport = function(){\n\n\tTone.Emitter.call(this);\n\n\tTone.getContext(function(){\n\n\t\t///////////////////////////////////////////////////////////////////////\n\t\t//\tLOOPING\n\t\t//////////////////////////////////////////////////////////////////////\n\n\t\t/**\n\t\t * \tIf the transport loops or not.\n\t\t * @type {boolean}\n\t\t */\n\t\tthis.loop = false;\n\n\t\t/**\n\t\t * \tThe loop start position in ticks\n\t\t * @type {Ticks}\n\t\t * @private\n\t\t */\n\t\tthis._loopStart = 0;\n\n\t\t/**\n\t\t * \tThe loop end position in ticks\n\t\t * @type {Ticks}\n\t\t * @private\n\t\t */\n\t\tthis._loopEnd = 0;\n\n\t\t///////////////////////////////////////////////////////////////////////\n\t\t//\tCLOCK/TEMPO\n\t\t//////////////////////////////////////////////////////////////////////\n\n\t\t/**\n\t\t * Pulses per quarter is the number of ticks per quarter note.\n\t\t * @private\n\t\t * @type {Number}\n\t\t */\n\t\tthis._ppq = TransportConstructor.defaults.PPQ;\n\n\t\t/**\n\t\t * watches the main oscillator for timing ticks\n\t\t * initially starts at 120bpm\n\t\t * @private\n\t\t * @type {Tone.Clock}\n\t\t */\n\t\tthis._clock = new Tone.Clock({\n\t\t\t\"callback\" : this._processTick.bind(this),\n\t\t\t\"frequency\" : 0,\n\t\t});\n\n\t\tthis._bindClockEvents();\n\n\t\t/**\n\t\t * The Beats Per Minute of the Transport.\n\t\t * @type {BPM}\n\t\t * @signal\n\t\t * @example\n\t\t * Tone.Transport.bpm.value = 80;\n\t\t * //ramp the bpm to 120 over 10 seconds\n\t\t * Tone.Transport.bpm.rampTo(120, 10);\n\t\t */\n\t\tthis.bpm = this._clock.frequency;\n\t\tthis.bpm._toUnits = this._toUnits.bind(this);\n\t\tthis.bpm._fromUnits = this._fromUnits.bind(this);\n\t\tthis.bpm.units = Tone.Type.BPM;\n\t\tthis.bpm.value = TransportConstructor.defaults.bpm;\n\t\tthis._readOnly(\"bpm\");\n\n\t\t/**\n\t\t * The time signature, or more accurately the numerator\n\t\t * of the time signature over a denominator of 4.\n\t\t * @type {Number}\n\t\t * @private\n\t\t */\n\t\tthis._timeSignature = TransportConstructor.defaults.timeSignature;\n\n\t\t///////////////////////////////////////////////////////////////////////\n\t\t//\tTIMELINE EVENTS\n\t\t//////////////////////////////////////////////////////////////////////\n\n\t\t/**\n\t\t * All the events in an object to keep track by ID\n\t\t * @type {Object}\n\t\t * @private\n\t\t */\n\t\tthis._scheduledEvents = {};\n\n\t\t/**\n\t\t * \tThe scheduled events.\n\t\t * @type {Tone.Timeline}\n\t\t * @private\n\t\t */\n\t\tthis._timeline = new Tone.Timeline();\n\n\t\t/**\n\t\t * Repeated events\n\t\t * @type {Array}\n\t\t * @private\n\t\t */\n\t\tthis._repeatedEvents = new Tone.IntervalTimeline();\n\n\t\t/**\n\t\t * All of the synced Signals\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t\tthis._syncedSignals = [];\n\n\t\t///////////////////////////////////////////////////////////////////////\n\t\t//\tSWING\n\t\t//////////////////////////////////////////////////////////////////////\n\n\t\t/**\n\t\t * The subdivision of the swing\n\t\t * @type {Ticks}\n\t\t * @private\n\t\t */\n\t\tthis._swingTicks = TransportConstructor.defaults.PPQ / 2; //8n\n\n\t\t/**\n\t\t * The swing amount\n\t\t * @type {NormalRange}\n\t\t * @private\n\t\t */\n\t\tthis._swingAmount = 0;\n\n\t\t//transport is a singleton so it adds itself to the context\n\t\tthis.context.transport = this;\n\n\t}.bind(this));\n};\n\nTone.extend(Tone.Transport, Tone.Emitter);\n\n/**\n * the defaults\n * @type {Object}\n * @const\n * @static\n */\nTone.Transport.defaults = {\n\t\"bpm\" : 120,\n\t\"swing\" : 0,\n\t\"swingSubdivision\" : \"8n\",\n\t\"timeSignature\" : 4,\n\t\"loopStart\" : 0,\n\t\"loopEnd\" : \"4m\",\n\t\"PPQ\" : 192\n};\n\n/**\n * Is an instanceof Tone.Transport\n * @type {Boolean}\n */\nTone.Transport.prototype.isTransport = true;\n\n///////////////////////////////////////////////////////////////////////////////\n//\tTICKS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * called on every tick\n * @param {number} tickTime clock relative tick time\n * @private\n */\nTone.Transport.prototype._processTick = function(tickTime, ticks){\n\t//handle swing\n\tif (this._swingAmount > 0 &&\n\t\tticks % this._ppq !== 0 && //not on a downbeat\n\t\tticks % (this._swingTicks * 2) !== 0){\n\t\t//add some swing\n\t\tvar progress = (ticks % (this._swingTicks * 2)) / (this._swingTicks * 2);\n\t\tvar amount = Math.sin((progress) * Math.PI) * this._swingAmount;\n\t\ttickTime += Tone.Ticks(this._swingTicks * 2/3).toSeconds() * amount;\n\t}\n\t//do the loop test\n\tif (this.loop){\n\t\tif (ticks >= this._loopEnd){\n\t\t\tthis.emit(\"loopEnd\", tickTime);\n\t\t\tthis._clock.setTicksAtTime(this._loopStart, tickTime);\n\t\t\tticks = this._loopStart;\n\t\t\tthis.emit(\"loopStart\", tickTime, this._clock.getSecondsAtTime(tickTime));\n\t\t\tthis.emit(\"loop\", tickTime);\n\t\t}\n\t}\n\t//invoke the timeline events scheduled on this tick\n\tthis._timeline.forEachAtTime(ticks, function(event){\n\t\tevent.invoke(tickTime);\n\t});\n};\n\n///////////////////////////////////////////////////////////////////////////////\n//\tSCHEDULABLE EVENTS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Schedule an event along the timeline.\n * @param {Function} callback The callback to be invoked at the time.\n * @param {TransportTime} time The time to invoke the callback at.\n * @return {Number} The id of the event which can be used for canceling the event.\n * @example\n * //trigger the callback when the Transport reaches the desired time\n * Tone.Transport.schedule(function(time){\n * \tenvelope.triggerAttack(time);\n * }, \"128i\");\n */\nTone.Transport.prototype.schedule = function(callback, time){\n\tvar event = new Tone.TransportEvent(this, {\n\t\t\"time\" : Tone.TransportTime(time),\n\t\t\"callback\" : callback\n\t});\n\treturn this._addEvent(event, this._timeline);\n};\n\n/**\n * Schedule a repeated event along the timeline. The event will fire\n * at the `interval` starting at the `startTime` and for the specified\n * `duration`.\n * @param {Function} callback The callback to invoke.\n * @param {Time} interval The duration between successive\n * callbacks. Must be a positive number.\n * @param {TransportTime=} startTime When along the timeline the events should\n * start being invoked.\n * @param {Time} [duration=Infinity] How long the event should repeat.\n * @return {Number} The ID of the scheduled event. Use this to cancel\n * the event.\n * @example\n * //a callback invoked every eighth note after the first measure\n * Tone.Transport.scheduleRepeat(callback, \"8n\", \"1m\");\n */\nTone.Transport.prototype.scheduleRepeat = function(callback, interval, startTime, duration){\n\tvar event = new Tone.TransportRepeatEvent(this, {\n\t\t\"callback\" : callback,\n\t\t\"interval\" : Tone.Time(interval),\n\t\t\"time\" : Tone.TransportTime(startTime),\n\t\t\"duration\" : Tone.Time(Tone.defaultArg(duration, Infinity)),\n\t});\n\t//kick it off if the Transport is started\n\treturn this._addEvent(event, this._repeatedEvents);\n};\n\n/**\n * Schedule an event that will be removed after it is invoked. \n * @param {Function} callback The callback to invoke once.\n * @param {TransportTime} time The time the callback should be invoked.\n * @returns {Number} The ID of the scheduled event.\n */\nTone.Transport.prototype.scheduleOnce = function(callback, time){\n\tvar event = new Tone.TransportEvent(this, {\n\t\t\"time\" : Tone.TransportTime(time),\n\t\t\"callback\" : callback,\n\t\t\"once\" : true\n\t});\n\treturn this._addEvent(event, this._timeline);\n};\n\n/**\n * Clear the passed in event id from the timeline\n * @param {Number} eventId The id of the event.\n * @returns {Tone.Transport} this\n */\nTone.Transport.prototype.clear = function(eventId){\n\tif (this._scheduledEvents.hasOwnProperty(eventId)){\n\t\tvar item = this._scheduledEvents[eventId.toString()];\n\t\titem.timeline.remove(item.event);\n\t\titem.event.dispose();\n\t\tdelete this._scheduledEvents[eventId.toString()];\n\t}\n\treturn this;\n};\n\n/**\n * Add an event to the correct timeline. Keep track of the\n * timeline it was added to.\n * @param {Tone.TransportEvent}\tevent\n * @param {Tone.Timeline} timeline\n * @returns {Number} the event id which was just added\n * @private\n */\nTone.Transport.prototype._addEvent = function(event, timeline){\n\tthis._scheduledEvents[event.id.toString()] = {\n\t\t\"event\" : event,\n\t\t\"timeline\" : timeline\n\t};\n\ttimeline.add(event);\n\treturn event.id;\n};\n\n/**\n * Remove scheduled events from the timeline after\n * the given time. Repeated events will be removed\n * if their startTime is after the given time\n * @param {TransportTime} [after=0] Clear all events after\n * this time.\n * @returns {Tone.Transport} this\n */\nTone.Transport.prototype.cancel = function(after){\n\tafter = Tone.defaultArg(after, 0);\n\tafter = this.toTicks(after);\n\tthis._timeline.forEachFrom(after, function(event){\n\t\tthis.clear(event.id);\n\t}.bind(this));\n\tthis._repeatedEvents.forEachFrom(after, function(event){\n\t\tthis.clear(event.id);\n\t}.bind(this));\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n//\tSTART/STOP/PAUSE\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Bind start/stop/pause events from the clock and emit them.\n * @private\n */\nTone.Transport.prototype._bindClockEvents = function(){\n\tthis._clock.on(\"start\", function(time, offset){\n\t\toffset = Tone.Ticks(offset).toSeconds();\n\t\tthis.emit(\"start\", time, offset);\n\t}.bind(this));\n\n\tthis._clock.on(\"stop\", function(time){\n\t\tthis.emit(\"stop\", time);\n\t}.bind(this));\n\n\tthis._clock.on(\"pause\", function(time){\n\t\tthis.emit(\"pause\", time);\n\t}.bind(this));\n};\n\n/**\n * Returns the playback state of the source, either \"started\", \"stopped\", or \"paused\"\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.Transport#\n * @name state\n */\nObject.defineProperty(Tone.Transport.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._clock.getStateAtTime(this.now());\n\t}\n});\n\n/**\n * Start the transport and all sources synced to the transport.\n * @param {Time} [time=now] The time when the transport should start.\n * @param {TransportTime=} offset The timeline offset to start the transport.\n * @returns {Tone.Transport} this\n * @example\n * //start the transport in one second starting at beginning of the 5th measure.\n * Tone.Transport.start(\"+1\", \"4:0:0\");\n */\nTone.Transport.prototype.start = function(time, offset){\n\t//start the clock\n\tif (Tone.isDefined(offset)){\n\t\toffset = this.toTicks(offset);\n\t}\n\tthis._clock.start(time, offset);\n\treturn this;\n};\n\n/**\n * Stop the transport and all sources synced to the transport.\n * @param {Time} [time=now] The time when the transport should stop.\n * @returns {Tone.Transport} this\n * @example\n * Tone.Transport.stop();\n */\nTone.Transport.prototype.stop = function(time){\n\tthis._clock.stop(time);\n\treturn this;\n};\n\n/**\n * Pause the transport and all sources synced to the transport.\n * @param {Time} [time=now]\n * @returns {Tone.Transport} this\n */\nTone.Transport.prototype.pause = function(time){\n\tthis._clock.pause(time);\n\treturn this;\n};\n\n/**\n * Toggle the current state of the transport. If it is\n * started, it will stop it, otherwise it will start the Transport.\n * @param {Time=} time The time of the event\n * @return {Tone.Transport} this\n */\nTone.Transport.prototype.toggle = function(time){\n\ttime = this.toSeconds(time);\n\tif (this._clock.getStateAtTime(time) !== Tone.State.Started){\n\t\tthis.start(time);\n\t} else {\n\t\tthis.stop(time);\n\t}\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n//\tSETTERS/GETTERS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * The time signature as just the numerator over 4.\n * For example 4/4 would be just 4 and 6/8 would be 3.\n * @memberOf Tone.Transport#\n * @type {Number|Array}\n * @name timeSignature\n * @example\n * //common time\n * Tone.Transport.timeSignature = 4;\n * // 7/8\n * Tone.Transport.timeSignature = [7, 8];\n * //this will be reduced to a single number\n * Tone.Transport.timeSignature; //returns 3.5\n */\nObject.defineProperty(Tone.Transport.prototype, \"timeSignature\", {\n\tget : function(){\n\t\treturn this._timeSignature;\n\t},\n\tset : function(timeSig){\n\t\tif (Tone.isArray(timeSig)){\n\t\t\ttimeSig = (timeSig[0] / timeSig[1]) * 4;\n\t\t}\n\t\tthis._timeSignature = timeSig;\n\t}\n});\n\n/**\n * When the Tone.Transport.loop = true, this is the starting position of the loop.\n * @memberOf Tone.Transport#\n * @type {Time}\n * @name loopStart\n */\nObject.defineProperty(Tone.Transport.prototype, \"loopStart\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._loopStart).toSeconds();\n\t},\n\tset : function(startPosition){\n\t\tthis._loopStart = this.toTicks(startPosition);\n\t}\n});\n\n/**\n * When the Tone.Transport.loop = true, this is the ending position of the loop.\n * @memberOf Tone.Transport#\n * @type {Time}\n * @name loopEnd\n */\nObject.defineProperty(Tone.Transport.prototype, \"loopEnd\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._loopEnd).toSeconds();\n\t},\n\tset : function(endPosition){\n\t\tthis._loopEnd = this.toTicks(endPosition);\n\t}\n});\n\n/**\n * Set the loop start and stop at the same time.\n * @param {TransportTime} startPosition\n * @param {TransportTime} endPosition\n * @returns {Tone.Transport} this\n * @example\n * //loop over the first measure\n * Tone.Transport.setLoopPoints(0, \"1m\");\n * Tone.Transport.loop = true;\n */\nTone.Transport.prototype.setLoopPoints = function(startPosition, endPosition){\n\tthis.loopStart = startPosition;\n\tthis.loopEnd = endPosition;\n\treturn this;\n};\n\n/**\n * The swing value. Between 0-1 where 1 equal to\n * the note + half the subdivision.\n * @memberOf Tone.Transport#\n * @type {NormalRange}\n * @name swing\n */\nObject.defineProperty(Tone.Transport.prototype, \"swing\", {\n\tget : function(){\n\t\treturn this._swingAmount;\n\t},\n\tset : function(amount){\n\t\t//scale the values to a normal range\n\t\tthis._swingAmount = amount;\n\t}\n});\n\n/**\n * Set the subdivision which the swing will be applied to.\n * The default value is an 8th note. Value must be less\n * than a quarter note.\n *\n * @memberOf Tone.Transport#\n * @type {Time}\n * @name swingSubdivision\n */\nObject.defineProperty(Tone.Transport.prototype, \"swingSubdivision\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._swingTicks).toNotation();\n\t},\n\tset : function(subdivision){\n\t\tthis._swingTicks = this.toTicks(subdivision);\n\t}\n});\n\n/**\n * The Transport's position in Bars:Beats:Sixteenths.\n * Setting the value will jump to that position right away.\n * @memberOf Tone.Transport#\n * @type {BarsBeatsSixteenths}\n * @name position\n */\nObject.defineProperty(Tone.Transport.prototype, \"position\", {\n\tget : function(){\n\t\tvar now = this.now();\n\t\tvar ticks = this._clock.getTicksAtTime(now);\n\t\treturn Tone.Ticks(ticks).toBarsBeatsSixteenths();\n\t},\n\tset : function(progress){\n\t\tvar ticks = this.toTicks(progress);\n\t\tthis.ticks = ticks;\n\t}\n});\n\n/**\n * The Transport's position in seconds\n * Setting the value will jump to that position right away.\n * @memberOf Tone.Transport#\n * @type {Seconds}\n * @name seconds\n */\nObject.defineProperty(Tone.Transport.prototype, \"seconds\", {\n\tget : function(){\n\t\treturn this._clock.seconds;\n\t},\n\tset : function(s){\n\t\tvar now = this.now();\n\t\tvar ticks = this.bpm.timeToTicks(s, now);\n\t\tthis.ticks = ticks;\n\t}\n});\n\n/**\n * The Transport's loop position as a normalized value. Always\n * returns 0 if the transport if loop is not true.\n * @memberOf Tone.Transport#\n * @name progress\n * @type {NormalRange}\n */\nObject.defineProperty(Tone.Transport.prototype, \"progress\", {\n\tget : function(){\n\t\tif (this.loop){\n\t\t\tvar now = this.now();\n\t\t\tvar ticks = this._clock.getTicksAtTime(now);\n\t\t\treturn (ticks - this._loopStart) / (this._loopEnd - this._loopStart);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n});\n\n/**\n * The transports current tick position.\n *\n * @memberOf Tone.Transport#\n * @type {Ticks}\n * @name ticks\n */\nObject.defineProperty(Tone.Transport.prototype, \"ticks\", {\n\tget : function(){\n\t\treturn this._clock.ticks;\n\t},\n\tset : function(t){\n\t\tif (this._clock.ticks !== t){\n\t\t\tvar now = this.now();\n\t\t\t//stop everything synced to the transport\n\t\t\tif (this.state === Tone.State.Started){\n\t\t\t\tthis.emit(\"stop\", now);\n\t\t\t\tthis._clock.setTicksAtTime(t, now);\n\t\t\t\t//restart it with the new time\n\t\t\t\tthis.emit(\"start\", now, this.seconds);\n\t\t\t} else {\n\t\t\t\tthis._clock.setTicksAtTime(t, now);\n\t\t\t}\n\t\t}\n\t}\n});\n\n/**\n * Get the clock's ticks at the given time.\n * @param {Time} time When to get the tick value\n * @return {Ticks} The tick value at the given time.\n */\nTone.Transport.prototype.getTicksAtTime = function(time){\n\treturn Math.round(this._clock.getTicksAtTime(time));\n};\n\n/**\n * Return the elapsed seconds at the given time.\n * @param {Time} time When to get the elapsed seconds\n * @return {Seconds} The number of elapsed seconds\n */\nTone.Transport.prototype.getSecondsAtTime = function(time){\n\treturn this._clock.getSecondsAtTime(time);\n};\n\n/**\n * Pulses Per Quarter note. This is the smallest resolution\n * the Transport timing supports. This should be set once\n * on initialization and not set again. Changing this value\n * after other objects have been created can cause problems.\n *\n * @memberOf Tone.Transport#\n * @type {Number}\n * @name PPQ\n */\nObject.defineProperty(Tone.Transport.prototype, \"PPQ\", {\n\tget : function(){\n\t\treturn this._ppq;\n\t},\n\tset : function(ppq){\n\t\tvar bpm = this.bpm.value;\n\t\tthis._ppq = ppq;\n\t\tthis.bpm.value = bpm;\n\t}\n});\n\n/**\n * Convert from BPM to frequency (factoring in PPQ)\n * @param {BPM} bpm The BPM value to convert to frequency\n * @return {Frequency} The BPM as a frequency with PPQ factored in.\n * @private\n */\nTone.Transport.prototype._fromUnits = function(bpm){\n\treturn 1 / (60 / bpm / this.PPQ);\n};\n\n/**\n * Convert from frequency (with PPQ) into BPM\n * @param {Frequency} freq The clocks frequency to convert to BPM\n * @return {BPM} The frequency value as BPM.\n * @private\n */\nTone.Transport.prototype._toUnits = function(freq){\n\treturn (freq / this.PPQ) * 60;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n//\tSYNCING\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Returns the time aligned to the next subdivision\n * of the Transport. If the Transport is not started,\n * it will return 0.\n * Note: this will not work precisely during tempo ramps.\n * @param {Time} subdivision The subdivision to quantize to\n * @return {Number} The context time of the next subdivision.\n * @example\n * Tone.Transport.start(); //the transport must be started\n * Tone.Transport.nextSubdivision(\"4n\");\n */\nTone.Transport.prototype.nextSubdivision = function(subdivision){\n\tsubdivision = this.toTicks(subdivision);\n\tif (this.state !== Tone.State.Started){\n\t\t//if the transport's not started, return 0\n\t\treturn 0;\n\t} else {\n\t\tvar now = this.now();\n\t\t//the remainder of the current ticks and the subdivision\n\t\tvar transportPos = this.getTicksAtTime(now);\n\t\tvar remainingTicks = subdivision - transportPos % subdivision;\n\t\treturn this._clock.nextTickTime(remainingTicks, now);\n\t}\n};\n\n/**\n * Attaches the signal to the tempo control signal so that\n * any changes in the tempo will change the signal in the same\n * ratio.\n *\n * @param {Tone.Signal} signal\n * @param {number=} ratio Optionally pass in the ratio between\n * the two signals. Otherwise it will be computed\n * based on their current values.\n * @returns {Tone.Transport} this\n */\nTone.Transport.prototype.syncSignal = function(signal, ratio){\n\tif (!ratio){\n\t\t//get the sync ratio\n\t\tvar now = this.now();\n\t\tif (signal.getValueAtTime(now) !== 0){\n\t\t\tratio = signal.getValueAtTime(now) / this.bpm.getValueAtTime(now);\n\t\t} else {\n\t\t\tratio = 0;\n\t\t}\n\t}\n\tvar ratioSignal = new Tone.Gain(ratio);\n\tthis.bpm.chain(ratioSignal, signal._param);\n\tthis._syncedSignals.push({\n\t\t\"ratio\" : ratioSignal,\n\t\t\"signal\" : signal,\n\t\t\"initial\" : signal.value\n\t});\n\tsignal.value = 0;\n\treturn this;\n};\n\n/**\n * Unsyncs a previously synced signal from the transport's control.\n * See Tone.Transport.syncSignal.\n * @param {Tone.Signal} signal\n * @returns {Tone.Transport} this\n */\nTone.Transport.prototype.unsyncSignal = function(signal){\n\tfor (var i = this._syncedSignals.length - 1; i >= 0; i--){\n\t\tvar syncedSignal = this._syncedSignals[i];\n\t\tif (syncedSignal.signal === signal){\n\t\t\tsyncedSignal.ratio.dispose();\n\t\t\tsyncedSignal.signal.value = syncedSignal.initial;\n\t\t\tthis._syncedSignals.splice(i, 1);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Clean up.\n * @returns {Tone.Transport} this\n * @private\n */\nTone.Transport.prototype.dispose = function(){\n\tTone.Emitter.prototype.dispose.call(this);\n\tthis._clock.dispose();\n\tthis._clock = null;\n\tthis._writable(\"bpm\");\n\tthis.bpm = null;\n\tthis._timeline.dispose();\n\tthis._timeline = null;\n\tthis._repeatedEvents.dispose();\n\tthis._repeatedEvents = null;\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n//\tINITIALIZATION\n///////////////////////////////////////////////////////////////////////////////\n\nvar TransportConstructor = Tone.Transport;\nTone.Transport = new TransportConstructor();\n\nTone.Context.on(\"init\", function(context){\n\tif (context.transport && context.transport.isTransport){\n\t\tTone.Transport = context.transport;\n\t} else {\n\t\tTone.Transport = new TransportConstructor();\n\t}\n});\n\nTone.Context.on(\"close\", function(context){\n\tif (context.transport && context.transport.isTransport){\n\t\tcontext.transport.dispose();\n\t}\n});\n\nexport default Tone.Transport;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../source/Source\";\nimport \"../core/Transport\";\nimport \"../source/OscillatorNode\";\n\n/**\n * @class Tone.Oscillator supports a number of features including\n * phase rotation, multiple oscillator types (see Tone.Oscillator.type),\n * and Transport syncing (see Tone.Oscillator.syncFrequency).\n *\n * @constructor\n * @extends {Tone.Source}\n * @param {Frequency} [frequency] Starting frequency\n * @param {string} [type] The oscillator type. Read more about type below.\n * @example\n * //make and start a 440hz sine tone\n * var osc = new Tone.Oscillator(440, \"sine\").toMaster().start();\n */\nTone.Oscillator = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\"], Tone.Oscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * the main oscillator\n\t * @type {OscillatorNode}\n\t * @private\n\t */\n\tthis._oscillator = null;\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The detune control signal.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\n\t/**\n\t * the periodic wave\n\t * @type {PeriodicWave}\n\t * @private\n\t */\n\tthis._wave = null;\n\n\t/**\n\t * The partials of the oscillator\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._partials = options.partials;\n\n\t/**\n\t * The number of partials to limit or extend the periodic wave by\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._partialCount = options.partialCount;\n\n\t/**\n\t * the phase of the oscillator\n\t * between 0 - 360\n\t * @type {number}\n\t * @private\n\t */\n\tthis._phase = options.phase;\n\n\t/**\n\t * the type of the oscillator\n\t * @type {string}\n\t * @private\n\t */\n\tthis._type = options.type;\n\n\t//setup\n\tif (options.partialCount && options.type !== Tone.Oscillator.Type.Custom){\n\t\tthis._type = this.baseType + options.partialCount.toString();\n\t}\n\tthis.phase = this._phase;\n\tthis._readOnly([\"frequency\", \"detune\"]);\n};\n\nTone.extend(Tone.Oscillator, Tone.Source);\n\n/**\n * the default parameters\n * @type {Object}\n */\nTone.Oscillator.defaults = {\n\t\"type\" : \"sine\",\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"phase\" : 0,\n\t\"partials\" : [],\n\t\"partialCount\" : 0\n};\n\n/**\n * The Oscillator types\n * @enum {String}\n */\nTone.Oscillator.Type = {\n\tSine : \"sine\",\n\tTriangle : \"triangle\",\n\tSawtooth : \"sawtooth\",\n\tSquare : \"square\",\n\tCustom : \"custom\"\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now]\n * @private\n */\nTone.Oscillator.prototype._start = function(time){\n\tthis.log(\"start\", time);\n\t//new oscillator with previous values\n\tvar oscillator = new Tone.OscillatorNode();\n\tthis._oscillator = oscillator;\n\tif (this._wave){\n\t\tthis._oscillator.setPeriodicWave(this._wave);\n\t} else {\n\t\tthis._oscillator.type = this._type;\n\t}\n\t//connect the control signal to the oscillator frequency & detune\n\tthis._oscillator.connect(this.output);\n\tthis.frequency.connect(this._oscillator.frequency);\n\tthis.detune.connect(this._oscillator.detune);\n\n\t//start the oscillator\n\ttime = this.toSeconds(time);\n\tthis._oscillator.start(time);\n};\n\n/**\n * stop the oscillator\n * @private\n * @param {Time} [time=now] (optional) timing parameter\n * @returns {Tone.Oscillator} this\n */\nTone.Oscillator.prototype._stop = function(time){\n\tthis.log(\"stop\", time);\n\tif (this._oscillator){\n\t\ttime = this.toSeconds(time);\n\t\tthis._oscillator.stop(time);\n\t}\n\treturn this;\n};\n\n/**\n * Restart the oscillator. Does not stop the oscillator, but instead\n * just cancels any scheduled 'stop' from being invoked.\n * @param {Time=} time\n * @return {Tone.Oscillator} this\n */\nTone.Oscillator.prototype.restart = function(time){\n\tif (this._oscillator){\n\t\tthis._oscillator.cancelStop();\n\t}\n\tthis._state.cancel(this.toSeconds(time));\n\treturn this;\n};\n\n/**\n * Sync the signal to the Transport's bpm. Any changes to the transports bpm,\n * will also affect the oscillators frequency.\n * @returns {Tone.Oscillator} this\n * @example\n * Tone.Transport.bpm.value = 120;\n * osc.frequency.value = 440;\n * //the ration between the bpm and the frequency will be maintained\n * osc.syncFrequency();\n * Tone.Transport.bpm.value = 240;\n * // the frequency of the oscillator is doubled to 880\n */\nTone.Oscillator.prototype.syncFrequency = function(){\n\tTone.Transport.syncSignal(this.frequency);\n\treturn this;\n};\n\n/**\n * Unsync the oscillator's frequency from the Transport.\n * See Tone.Oscillator.syncFrequency\n * @returns {Tone.Oscillator} this\n */\nTone.Oscillator.prototype.unsyncFrequency = function(){\n\tTone.Transport.unsyncSignal(this.frequency);\n\treturn this;\n};\n\n/**\n * The type of the oscillator: either sine, square, triangle, or sawtooth. Also capable of\n * setting the first x number of partials of the oscillator. For example: \"sine4\" would\n * set be the first 4 partials of the sine wave and \"triangle8\" would set the first\n * 8 partials of the triangle wave.\n *
\n * Uses PeriodicWave internally even for native types so that it can set the phase.\n * PeriodicWave equations are from the\n * [Webkit Web Audio implementation](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp&sq=package:chromium).\n *\n * @memberOf Tone.Oscillator#\n * @type {string}\n * @name type\n * @example\n * //set it to a square wave\n * osc.type = \"square\";\n * @example\n * //set the first 6 partials of a sawtooth wave\n * osc.type = \"sawtooth6\";\n */\nObject.defineProperty(Tone.Oscillator.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._type;\n\t},\n\tset : function(type){\n\t\tvar isBasicType = [Tone.Oscillator.Type.Sine, Tone.Oscillator.Type.Square, Tone.Oscillator.Type.Triangle, Tone.Oscillator.Type.Sawtooth].includes(type);\n\t\tif (this._phase === 0 && isBasicType){\n\t\t\tthis._wave = null;\n\t\t\tthis._partialCount = 0;\n\t\t\t//just go with the basic approach\n\t\t\tif (this._oscillator !== null){\n\t\t\t\tthis._oscillator.type = type;\n\t\t\t}\n\t\t} else {\n\t\t\tvar coefs = this._getRealImaginary(type, this._phase);\n\t\t\tvar periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);\n\t\t\tthis._wave = periodicWave;\n\t\t\tif (this._oscillator !== null){\n\t\t\t\tthis._oscillator.setPeriodicWave(this._wave);\n\t\t\t}\n\t\t}\n\t\tthis._type = type;\n\t}\n});\n\n/**\n * The oscillator type without the partialsCount appended to the end\n * @memberOf Tone.Oscillator#\n * @type {string}\n * @name baseType\n * @example\n * osc.type = 'sine2'\n * osc.baseType //'sine'\n * osc.partialCount = 2\n */\nObject.defineProperty(Tone.Oscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn this._type.replace(this.partialCount, \"\");\n\t},\n\tset : function(baseType){\n\t\tif (this.partialCount && this._type !== Tone.Oscillator.Type.Custom && baseType !== Tone.Oscillator.Type.Custom){\n\t\t\tthis.type = baseType + this.partialCount;\n\t\t} else {\n\t\t\tthis.type = baseType;\n\t\t}\n\t}\n});\n\n/**\n * 'partialCount' offers an alternative way to set the number of used partials. \n * When partialCount is 0, the maximum number of partials are used when representing\n * the waveform using the periodicWave. When 'partials' is set, this value is \n * not settable, but equals the length of the partials array.\n * @example\n * osc.type = 'sine'\n * osc.partialCount = 3\n * //is equivalent to\n * osc.type = 'sine3'\n * @memberOf Tone.Oscillator#\n * @type {Number}\n * @name partialCount\n */\nObject.defineProperty(Tone.Oscillator.prototype, \"partialCount\", {\n\tget : function(){\n\t\treturn this._partialCount;\n\t},\n\tset : function(p){\n\t\tvar type = this._type;\n\t\tvar partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(this._type);\n\t\tif (partial){\n\t\t\ttype = partial[1];\n\t\t}\n\t\tif (this._type !== Tone.Oscillator.Type.Custom){\n\t\t\tif (p === 0){\n\t\t\t\tthis.type = type;\n\t\t\t} else {\n\t\t\t\tthis.type = type + p.toString();\n\t\t\t}\n\t\t}\n\t}\n});\n\n/**\n * Get the object's attributes. Given no arguments get\n * will return all available object properties and their corresponding\n * values. \n * @memberOf Tone.Oscillator#\n * @returns {Object}\n */\nTone.Oscillator.prototype.get = function(){\n\tvar values = Tone.prototype.get.apply(this, arguments);\n\tif (values.type !== Tone.Oscillator.Type.Custom){\n\t\tdelete values.partials;\n\t}\n\treturn values;\n};\n\n/**\n * Returns the real and imaginary components based\n * on the oscillator type.\n * @returns {Array} [real, imaginary]\n * @private\n */\nTone.Oscillator.prototype._getRealImaginary = function(type, phase){\n\tvar fftSize = 4096;\n\tvar periodicWaveSize = fftSize / 2;\n\n\tvar real = new Float32Array(periodicWaveSize);\n\tvar imag = new Float32Array(periodicWaveSize);\n\n\tvar partialCount = 1;\n\tif (type === Tone.Oscillator.Type.Custom){\n\t\tpartialCount = this._partials.length + 1;\n\t\tthis._partialCount = this._partials.length;\n\t\tperiodicWaveSize = partialCount;\n\t} else {\n\t\tvar partial = /^(sine|triangle|square|sawtooth)(\\d+)$/.exec(type);\n\t\tif (partial){\n\t\t\tpartialCount = parseInt(partial[2]) + 1;\n\t\t\tthis._partialCount = parseInt(partial[2]);\n\t\t\ttype = partial[1];\n\t\t\tpartialCount = Math.max(partialCount, 2);\n\t\t\tperiodicWaveSize = partialCount;\n\t\t} else {\n\t\t\tthis._partialCount = 0;\n\t\t}\n\t\tthis._partials = [];\n\t}\n\n\tfor (var n = 1; n < periodicWaveSize; ++n){\n\t\tvar piFactor = 2 / (n * Math.PI);\n\t\tvar b;\n\t\tswitch (type){\n\t\t\tcase Tone.Oscillator.Type.Sine:\n\t\t\t\tb = (n <= partialCount) ? 1 : 0;\n\t\t\t\tthis._partials[n-1] = b;\n\t\t\t\tbreak;\n\t\t\tcase Tone.Oscillator.Type.Square:\n\t\t\t\tb = (n & 1) ? 2 * piFactor : 0;\n\t\t\t\tthis._partials[n-1] = b;\n\t\t\t\tbreak;\n\t\t\tcase Tone.Oscillator.Type.Sawtooth:\n\t\t\t\tb = piFactor * ((n & 1) ? 1 : -1);\n\t\t\t\tthis._partials[n-1] = b;\n\t\t\t\tbreak;\n\t\t\tcase Tone.Oscillator.Type.Triangle:\n\t\t\t\tif (n & 1){\n\t\t\t\t\tb = 2 * (piFactor * piFactor) * ((((n - 1) >> 1) & 1) ? -1 : 1);\n\t\t\t\t} else {\n\t\t\t\t\tb = 0;\n\t\t\t\t}\n\t\t\t\tthis._partials[n-1] = b;\n\t\t\t\tbreak;\n\t\t\tcase Tone.Oscillator.Type.Custom:\n\t\t\t\tb = this._partials[n - 1];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new TypeError(\"Tone.Oscillator: invalid type: \"+type);\n\t\t}\n\t\tif (b !== 0){\n\t\t\treal[n] = -b * Math.sin(phase * n);\n\t\t\timag[n] = b * Math.cos(phase * n);\n\t\t} else {\n\t\t\treal[n] = 0;\n\t\t\timag[n] = 0;\n\t\t}\n\t}\n\treturn [real, imag];\n};\n\n/**\n * Compute the inverse FFT for a given phase.\n * @param {Float32Array} real\n * @param {Float32Array} imag\n * @param {NormalRange} phase\n * @return {AudioRange}\n * @private\n */\nTone.Oscillator.prototype._inverseFFT = function(real, imag, phase){\n\tvar sum = 0;\n\tvar len = real.length;\n\tfor (var i = 0; i < len; i++){\n\t\tsum += real[i] * Math.cos(i * phase) + imag[i] * Math.sin(i * phase);\n\t}\n\treturn sum;\n};\n\n/**\n * Returns the initial value of the oscillator.\n * @return {AudioRange}\n * @private\n */\nTone.Oscillator.prototype._getInitialValue = function(){\n\tvar coefs = this._getRealImaginary(this._type, 0);\n\tvar real = coefs[0];\n\tvar imag = coefs[1];\n\tvar maxValue = 0;\n\tvar twoPi = Math.PI * 2;\n\t//check for peaks in 8 places\n\tfor (var i = 0; i < 8; i++){\n\t\tmaxValue = Math.max(this._inverseFFT(real, imag, (i / 8) * twoPi), maxValue);\n\t}\n\treturn -this._inverseFFT(real, imag, this._phase) / maxValue;\n};\n\n/**\n * The partials of the waveform. A partial represents\n * the amplitude at a harmonic. The first harmonic is the\n * fundamental frequency, the second is the octave and so on\n * following the harmonic series.\n * Setting this value will automatically set the type to \"custom\".\n * The value is an empty array when the type is not \"custom\".\n * @memberOf Tone.Oscillator#\n * @type {Array}\n * @name partials\n * @example\n * osc.partials = [1, 0.2, 0.01];\n */\nObject.defineProperty(Tone.Oscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn this._partials;\n\t},\n\tset : function(partials){\n\t\tthis._partials = partials;\n\t\tthis.type = Tone.Oscillator.Type.Custom;\n\t}\n});\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.Oscillator#\n * @type {Degrees}\n * @name phase\n * @example\n * osc.phase = 180; //flips the phase of the oscillator\n */\nObject.defineProperty(Tone.Oscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._phase * (180 / Math.PI);\n\t},\n\tset : function(phase){\n\t\tthis._phase = phase * Math.PI / 180;\n\t\t//reset the type\n\t\tthis.type = this._type;\n\t}\n});\n\n/**\n * Dispose and disconnect.\n * @return {Tone.Oscillator} this\n */\nTone.Oscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tif (this._oscillator !== null){\n\t\tthis._oscillator.dispose();\n\t\tthis._oscillator = null;\n\t}\n\tthis._wave = null;\n\tthis._writable([\"frequency\", \"detune\"]);\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis._partials = null;\n\treturn this;\n};\n\nexport default Tone.Oscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Param\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Wrapper around Web Audio's native [DelayNode](http://webaudio.github.io/web-audio-api/#the-delaynode-interface).\n * @extends {Tone}\n * @param {Time=} delayTime The delay applied to the incoming signal.\n * @param {Time=} maxDelay The maximum delay time.\n */\nTone.Delay = function(){\n\n\tvar options = Tone.defaults(arguments, [\"delayTime\", \"maxDelay\"], Tone.Delay);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The maximum delay time initialized with the node\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._maxDelay = Math.max(this.toSeconds(options.maxDelay), this.toSeconds(options.delayTime));\n\t\n\t/**\n\t * The native delay node\n\t * @type {DelayNode}\n\t * @private\n\t */\n\tthis._delayNode = this.input = this.output = this.context.createDelay(this._maxDelay);\n\n\t/**\n\t * The amount of time the incoming signal is\n\t * delayed.\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.delayTime = new Tone.Param({\n\t\t\"param\" : this._delayNode.delayTime,\n\t\t\"units\" : Tone.Type.Time,\n\t\t\"value\" : options.delayTime\n\t});\n\n\tthis._readOnly(\"delayTime\");\n};\n\nTone.extend(Tone.Delay, Tone.AudioNode);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.Delay.defaults = {\n\t\"maxDelay\" : 1,\n\t\"delayTime\" : 0\n};\n\n/**\n * The maximum delay time. This cannot be changed. The value is passed into the constructor.\n * @memberof Tone.Delay#\n * @type {Time}\n * @name maxDelay\n * @readOnly\n */\nObject.defineProperty(Tone.Delay.prototype, \"maxDelay\", {\n\tget : function(){\n\t\treturn this._maxDelay;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.Delay} this\n */\nTone.Delay.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._delayNode.disconnect();\n\tthis._delayNode = null;\n\tthis._writable(\"delayTime\");\n\tthis.delayTime = null;\n\treturn this;\n};\n\nexport default Tone.Delay;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n *\t@class Tone.Split splits an incoming signal into left and right channels.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {number} [channels=2] The number of channels to merge.\n * @example\n * var split = new Tone.Split();\n * stereoSignal.connect(split);\n */\nTone.Split = function(channels){\n\n\t//defaults to 2 channels\n\tchannels = Tone.defaultArg(channels, 2);\n\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(0, channels);\n\n\t/**\n\t * @type {ChannelSplitterNode}\n\t * @private\n\t */\n\tthis._splitter = this.input = this.context.createChannelSplitter(channels);\n\n\t//connections\n\tfor (var i = 0; i < channels; i++){\n\t\tthis.output[i] = new Tone.Gain();\n\t\tTone.connect(this._splitter, this.output[i], i, 0);\n\t\tthis.output[i].channelCount = 1;\n\t\tthis.output[i].channelCountMode = \"explicit\";\n\t}\n\n\t/**\n\t * Left channel output.\n\t * Alias for output[0]
\n\t * @type {Tone.Gain}\n\t */\n\tthis.left = this.output[0];\n\n\t/**\n\t * Right channel output.\n\t * Alias for output[1]
\n\t * @type {Tone.Gain}\n\t */\n\tthis.right = this.output[1];\n};\n\nTone.extend(Tone.Split, Tone.AudioNode);\n\n/**\n * Clean up.\n * @returns {Tone.Split} this\n */\nTone.Split.prototype.dispose = function(){\n\tthis.output.forEach(function(output){\n\t\toutput.dispose();\n\t});\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._splitter.disconnect();\n\tthis.left = null;\n\tthis.right = null;\n\tthis._splitter = null;\n\treturn this;\n};\n\nexport default Tone.Split;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Emitter\";\nimport \"../core/Timeline\";\nimport \"../shim/AudioContext\";\n\nvar AudioContextProperties = [\"baseLatency\", \"destination\", \"currentTime\", \"sampleRate\", \"listener\", \"state\"];\nvar AudioContextMethods = [\"suspend\", \"close\", \"resume\", \"getOutputTimestamp\", \"createMediaElementSource\", \"createMediaStreamSource\", \"createMediaStreamDestination\", \"createBuffer\", \"decodeAudioData\", \"createBufferSource\", \"createConstantSource\", \"createGain\", \"createDelay\", \"createBiquadFilter\", \"createIIRFilter\", \"createWaveShaper\", \"createPanner\", \"createConvolver\", \"createDynamicsCompressor\", \"createAnalyser\", \"createScriptProcessor\", \"createStereoPanner\", \"createOscillator\", \"createPeriodicWave\", \"createChannelSplitter\", \"createChannelMerger\", \"audioWorklet\"];\n\n/**\n * @class Wrapper around the native AudioContext.\n * @extends {Tone.Emitter}\n * @param {AudioContext=} context optionally pass in a context\n */\nTone.Context = function(){\n\n\tTone.Emitter.call(this);\n\n\tvar options = Tone.defaults(arguments, [\"context\"], Tone.Context);\n\n\tif (!options.context){\n\t\toptions.context = new Tone.global.AudioContext();\n\t\tif (!options.context){\n\t\t\tthrow new Error(\"could not create AudioContext. Possibly too many AudioContexts running already.\");\n\t\t}\n\t}\n\tthis._context = options.context;\n\t//make sure it's not an AudioContext wrapper\n\twhile (this._context.rawContext){\n\t\tthis._context = this._context.rawContext;\n\t}\n\n\t// extend all of the properties\n\tAudioContextProperties.forEach(function(prop){\n\t\tthis._defineProperty(this._context, prop);\n\t}.bind(this));\n\t// extend all of the methods\n\tAudioContextMethods.forEach(function(method){\n\t\tthis._defineMethod(this._context, method);\n\t}.bind(this));\n\n\t/**\n\t * The default latency hint\n\t * @type {String}\n\t * @private\n\t */\n\tthis._latencyHint = options.latencyHint;\n\n\t/**\n\t * An object containing all of the constants AudioBufferSourceNodes\n\t * @type {Object}\n\t * @private\n\t */\n\tthis._constants = {};\n\n\t///////////////////////////////////////////////////////////////////////\n\t// WORKER\n\t///////////////////////////////////////////////////////////////////////\n\n\t/**\n\t * The amount of time events are scheduled\n\t * into the future\n\t * @type {Number}\n\t */\n\tthis.lookAhead = options.lookAhead;\n\n\t/**\n\t * A reference to the actual computed update interval\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._computedUpdateInterval = 0;\n\n\t/**\n\t * A reliable callback method\n\t * @private\n\t * @type {Ticker}\n\t */\n\tthis._ticker = new Ticker(this.emit.bind(this, \"tick\"), options.clockSource, options.updateInterval);\n\n\t///////////////////////////////////////////////////////////////////////\n\t// TIMEOUTS\n\t///////////////////////////////////////////////////////////////////////\n\n\t/**\n\t * All of the setTimeout events.\n\t * @type {Tone.Timeline}\n\t * @private\n\t */\n\tthis._timeouts = new Tone.Timeline();\n\n\t/**\n\t * The timeout id counter\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._timeoutIds = 0;\n\n\tthis.on(\"tick\", this._timeoutLoop.bind(this));\n\n\t//forward state change events\n\tthis._context.onstatechange = function(e){\n\t\tthis.emit(\"statechange\", e);\n\t}.bind(this);\n};\n\nTone.extend(Tone.Context, Tone.Emitter);\nTone.Emitter.mixin(Tone.Context);\n\n/**\n * defaults\n * @static\n * @type {Object}\n */\nTone.Context.defaults = {\n\t\"clockSource\" : \"worker\",\n\t\"latencyHint\" : \"interactive\",\n\t\"lookAhead\" : 0.1,\n\t\"updateInterval\" : 0.03\n};\n\n/**\n * Is an instanceof Tone.Context\n * @type {Boolean}\n */\nTone.Context.prototype.isContext = true;\n\n/**\n * Define a property on this Tone.Context.\n * This is used to extend the native AudioContext\n * @param {AudioContext} context\n * @param {String} prop\n * @private\n */\nTone.Context.prototype._defineProperty = function(context, prop){\n\tif (Tone.isUndef(this[prop])){\n\t\tObject.defineProperty(this, prop, {\n\t\t\t\"get\" : function(){\n\t\t\t\treturn context[prop];\n\t\t\t},\n\t\t\t\"set\" : function(val){\n\t\t\t\tcontext[prop] = val;\n\t\t\t}\n\t\t});\n\t}\n};\n\n/**\n * Define a method on this Tone.Context.\n * This is used to extend the native AudioContext\n * @param {AudioContext} context\n * @param {String} prop\n * @private\n */\nTone.Context.prototype._defineMethod = function(context, prop){\n\tif (Tone.isUndef(this[prop])){\n\t\tObject.defineProperty(this, prop, {\n\t\t\t\"get\" : function(){\n\t\t\t\treturn context[prop].bind(context);\n\t\t\t}\n\t\t});\n\t}\n};\n\n/**\n * The current audio context time\n * @return {Number}\n */\nTone.Context.prototype.now = function(){\n\treturn this._context.currentTime + this.lookAhead;\n};\n\n/**\n * The audio output destination. Alias for Tone.Master\n * @readyOnly\n * @type {Tone.Master}\n */\nObject.defineProperty(Tone.Context.prototype, \"destination\", {\n\t\"get\" : function(){\n\t\tif (!this.master){\n\t\t\treturn this._context.destination;\n\t\t} else {\n\t\t\treturn this.master;\n\t\t}\n\t}\n});\n\n/**\n * Starts the audio context from a suspended state. This is required\n * to initially start the AudioContext.\n * @return {Promise}\n */\nTone.Context.prototype.resume = function(){\n\tif (this._context.state === \"suspended\" && this._context instanceof AudioContext){\n\t\treturn this._context.resume();\n\t} else {\n\t\treturn Promise.resolve();\n\t}\n};\n\n/**\n * Promise which is invoked when the context is running.\n * Tries to resume the context if it's not started.\n * @return {Promise}\n */\nTone.Context.prototype.close = function(){\n\tvar closePromise = Promise.resolve();\n\t//never close the global Tone.Context\n\tif (this !== Tone.global.TONE_AUDIO_CONTEXT){\n\t\tclosePromise = this.rawContext.close();\n\t}\n\treturn closePromise.then(function(){\n\t\tTone.Context.emit(\"close\", this);\n\t}.bind(this));\n};\n\n/**\n * Generate a looped buffer at some constant value.\n * @param {Number} val\n * @return {BufferSourceNode}\n */\nTone.Context.prototype.getConstant = function(val){\n\tif (this._constants[val]){\n\t\treturn this._constants[val];\n\t} else {\n\t\tvar buffer = this._context.createBuffer(1, 128, this._context.sampleRate);\n\t\tvar arr = buffer.getChannelData(0);\n\t\tfor (var i = 0; i < arr.length; i++){\n\t\t\tarr[i] = val;\n\t\t}\n\t\tvar constant = this._context.createBufferSource();\n\t\tconstant.channelCount = 1;\n\t\tconstant.channelCountMode = \"explicit\";\n\t\tconstant.buffer = buffer;\n\t\tconstant.loop = true;\n\t\tconstant.start(0);\n\t\tthis._constants[val] = constant;\n\t\treturn constant;\n\t}\n};\n\n/**\n * The private loop which keeps track of the context scheduled timeouts\n * Is invoked from the clock source\n * @private\n */\nTone.Context.prototype._timeoutLoop = function(){\n\tvar now = this.now();\n\twhile (this._timeouts && this._timeouts.length && this._timeouts.peek().time <= now){\n\t\tthis._timeouts.shift().callback();\n\t}\n};\n\n/**\n * A setTimeout which is gaurenteed by the clock source.\n * Also runs in the offline context.\n * @param {Function} fn The callback to invoke\n * @param {Seconds} timeout The timeout in seconds\n * @returns {Number} ID to use when invoking Tone.Context.clearTimeout\n */\nTone.Context.prototype.setTimeout = function(fn, timeout){\n\tthis._timeoutIds++;\n\tvar now = this.now();\n\tthis._timeouts.add({\n\t\t\"callback\" : fn,\n\t\t\"time\" : now + timeout,\n\t\t\"id\" : this._timeoutIds\n\t});\n\treturn this._timeoutIds;\n};\n\n/**\n * Clears a previously scheduled timeout with Tone.context.setTimeout\n * @param {Number} id The ID returned from setTimeout\n * @return {Tone.Context} this\n */\nTone.Context.prototype.clearTimeout = function(id){\n\tthis._timeouts.forEach(function(event){\n\t\tif (event.id === id){\n\t\t\tthis.remove(event);\n\t\t}\n\t});\n\treturn this;\n};\n\n/**\n * How often the Web Worker callback is invoked.\n * This number corresponds to how responsive the scheduling\n * can be. Context.updateInterval + Context.lookAhead gives you the\n * total latency between scheduling an event and hearing it.\n * @type {Number}\n * @memberOf Tone.Context#\n * @name updateInterval\n */\nObject.defineProperty(Tone.Context.prototype, \"updateInterval\", {\n\t\"get\" : function(){\n\t\treturn this._ticker.updateInterval;\n\t},\n\t\"set\" : function(interval){\n\t\tthis._ticker.updateInterval = interval;\n\t}\n});\n\n/**\n * The unwrapped AudioContext.\n * @type {AudioContext}\n * @memberOf Tone.Context#\n * @name rawContext\n * @readOnly\n */\nObject.defineProperty(Tone.Context.prototype, \"rawContext\", {\n\t\"get\" : function(){\n\t\treturn this._context;\n\t}\n});\n\n/**\n * What the source of the clock is, either \"worker\" (Web Worker [default]),\n * \"timeout\" (setTimeout), or \"offline\" (none).\n * @type {String}\n * @memberOf Tone.Context#\n * @name clockSource\n */\nObject.defineProperty(Tone.Context.prototype, \"clockSource\", {\n\t\"get\" : function(){\n\t\treturn this._ticker.type;\n\t},\n\t\"set\" : function(type){\n\t\tthis._ticker.type = type;\n\t}\n});\n\n/**\n * The type of playback, which affects tradeoffs between audio\n * output latency and responsiveness.\n *\n * In addition to setting the value in seconds, the latencyHint also\n * accepts the strings \"interactive\" (prioritizes low latency),\n * \"playback\" (prioritizes sustained playback), \"balanced\" (balances\n * latency and performance), and \"fastest\" (lowest latency, might glitch more often).\n * @type {String|Seconds}\n * @memberOf Tone.Context#\n * @name latencyHint\n * @example\n * //set the lookAhead to 0.3 seconds\n * Tone.context.latencyHint = 0.3;\n */\nObject.defineProperty(Tone.Context.prototype, \"latencyHint\", {\n\t\"get\" : function(){\n\t\treturn this._latencyHint;\n\t},\n\t\"set\" : function(hint){\n\t\tvar lookAhead = hint;\n\t\tthis._latencyHint = hint;\n\t\tif (Tone.isString(hint)){\n\t\t\tswitch (hint){\n\t\t\t\tcase \"interactive\" :\n\t\t\t\t\tlookAhead = 0.1;\n\t\t\t\t\tthis._context.latencyHint = hint;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"playback\" :\n\t\t\t\t\tlookAhead = 0.8;\n\t\t\t\t\tthis._context.latencyHint = hint;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"balanced\" :\n\t\t\t\t\tlookAhead = 0.25;\n\t\t\t\t\tthis._context.latencyHint = hint;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"fastest\" :\n\t\t\t\t\tthis._context.latencyHint = \"interactive\";\n\t\t\t\t\tlookAhead = 0.01;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tthis.lookAhead = lookAhead;\n\t\tthis.updateInterval = lookAhead/3;\n\t}\n});\n\n/**\n * Unlike other dispose methods, this returns a Promise\n * which executes when the context is closed and disposed\n * @returns {Promise} this\n */\nTone.Context.prototype.dispose = function(){\n\treturn this.close().then(function(){\n\t\tTone.Emitter.prototype.dispose.call(this);\n\t\tthis._ticker.dispose();\n\t\tthis._ticker = null;\n\t\tthis._timeouts.dispose();\n\t\tthis._timeouts = null;\n\t\tfor (var con in this._constants){\n\t\t\tthis._constants[con].disconnect();\n\t\t}\n\t\tthis._constants = null;\n\t}.bind(this));\n};\n\n/**\n * @class A class which provides a reliable callback using either\n * a Web Worker, or if that isn't supported, falls back to setTimeout.\n * @private\n */\nvar Ticker = function(callback, type, updateInterval){\n\n\t/**\n\t * Either \"worker\" or \"timeout\"\n\t * @type {String}\n\t * @private\n\t */\n\tthis._type = type;\n\n\t/**\n\t * The update interval of the worker\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._updateInterval = updateInterval;\n\n\t/**\n\t * The callback to invoke at regular intervals\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._callback = Tone.defaultArg(callback, Tone.noOp);\n\n\t//create the clock source for the first time\n\tthis._createClock();\n};\n\n/**\n * The possible ticker types\n * @private\n * @type {Object}\n */\nTicker.Type = {\n\t\"Worker\" : \"worker\",\n\t\"Timeout\" : \"timeout\",\n\t\"Offline\" : \"offline\"\n};\n\n/**\n * Generate a web worker\n * @return {WebWorker}\n * @private\n */\nTicker.prototype._createWorker = function(){\n\n\t//URL Shim\n\tTone.global.URL = Tone.global.URL || Tone.global.webkitURL;\n\n\tvar blob = new Blob([\n\t\t//the initial timeout time\n\t\t\"var timeoutTime = \"+(this._updateInterval * 1000).toFixed(1)+\";\" +\n\t\t//onmessage callback\n\t\t\"self.onmessage = function(msg){\" +\n\t\t\"\ttimeoutTime = parseInt(msg.data);\" +\n\t\t\"};\" +\n\t\t//the tick function which posts a message\n\t\t//and schedules a new tick\n\t\t\"function tick(){\" +\n\t\t\"\tsetTimeout(tick, timeoutTime);\" +\n\t\t\"\tself.postMessage('tick');\" +\n\t\t\"}\" +\n\t\t//call tick initially\n\t\t\"tick();\"\n\t]);\n\tvar blobUrl = URL.createObjectURL(blob);\n\tvar worker = new Worker(blobUrl);\n\n\tworker.onmessage = this._callback.bind(this);\n\n\tthis._worker = worker;\n};\n\n/**\n * Create a timeout loop\n * @private\n */\nTicker.prototype._createTimeout = function(){\n\tthis._timeout = setTimeout(function(){\n\t\tthis._createTimeout();\n\t\tthis._callback();\n\t}.bind(this), this._updateInterval * 1000);\n};\n\n/**\n * Create the clock source.\n * @private\n */\nTicker.prototype._createClock = function(){\n\tif (this._type === Ticker.Type.Worker){\n\t\ttry {\n\t\t\tthis._createWorker();\n\t\t} catch (e){\n\t\t\t// workers not supported, fallback to timeout\n\t\t\tthis._type = Ticker.Type.Timeout;\n\t\t\tthis._createClock();\n\t\t}\n\t} else if (this._type === Ticker.Type.Timeout){\n\t\tthis._createTimeout();\n\t}\n};\n\n/**\n * @memberOf Ticker#\n * @type {Number}\n * @name updateInterval\n * @private\n */\nObject.defineProperty(Ticker.prototype, \"updateInterval\", {\n\t\"get\" : function(){\n\t\treturn this._updateInterval;\n\t},\n\t\"set\" : function(interval){\n\t\tthis._updateInterval = Math.max(interval, 128/44100);\n\t\tif (this._type === Ticker.Type.Worker){\n\t\t\tthis._worker.postMessage(Math.max(interval * 1000, 1));\n\t\t}\n\t}\n});\n\n/**\n * The type of the ticker, either a worker or a timeout\n * @memberOf Ticker#\n * @type {Number}\n * @name type\n * @private\n */\nObject.defineProperty(Ticker.prototype, \"type\", {\n\t\"get\" : function(){\n\t\treturn this._type;\n\t},\n\t\"set\" : function(type){\n\t\tthis._disposeClock();\n\t\tthis._type = type;\n\t\tthis._createClock();\n\t}\n});\n\n/**\n * Clean up the current clock source\n * @private\n */\nTicker.prototype._disposeClock = function(){\n\tif (this._timeout){\n\t\tclearTimeout(this._timeout);\n\t\tthis._timeout = null;\n\t}\n\tif (this._worker){\n\t\tthis._worker.terminate();\n\t\tthis._worker.onmessage = null;\n\t\tthis._worker = null;\n\t}\n};\n\n/**\n * Clean up\n * @private\n */\nTicker.prototype.dispose = function(){\n\tthis._disposeClock();\n\tthis._callback = null;\n};\n\n// set the audio context initially, and if one is not already created\nif (Tone.supported && !Tone.initialized){\t\t\t\n\tif (!Tone.global.TONE_AUDIO_CONTEXT){\n\t\tTone.global.TONE_AUDIO_CONTEXT = new Tone.Context();\n\t}\n\tTone.context = Tone.global.TONE_AUDIO_CONTEXT;\n\n\t// log on first initialization\n\t// allow optional silencing of this log\n\tif (!Tone.global.TONE_SILENCE_LOGGING){\n\t\tvar prefix = \"v\";\n\t\tif (Tone.version === \"dev\"){\n\t\t\tprefix = \"\";\n\t\t}\n\t\tvar printString = \" * Tone.js \" + prefix + Tone.version + \" * \"; \n\t\t// eslint-disable-next-line no-console\n\t\tconsole.log(\"%c\" + printString, \"background: #000; color: #fff\");\n\t}\n} else if (!Tone.supported && !Tone.global.TONE_SILENCE_LOGGING){\n\t// eslint-disable-next-line no-console\n\tconsole.warn(\"This browser does not support Tone.js\");\n}\n\nexport default Tone.Context;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Type\";\nimport \"../core/Master\";\n\n/**\n * @class Base-class for all instruments\n *\n * @constructor\n * @extends {Tone.AudioNode}\n */\nTone.Instrument = function(options){\n\n\t//get the defaults\n\toptions = Tone.defaultArg(options, Tone.Instrument.defaults);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The output and volume triming node\n\t * @type {Tone.Volume}\n\t * @private\n\t */\n\tthis._volume = this.output = new Tone.Volume(options.volume);\n\n\t/**\n\t * The volume of the output in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t * @example\n\t * source.volume.value = -6;\n\t */\n\tthis.volume = this._volume.volume;\n\tthis._readOnly(\"volume\");\n\n\t/**\n\t * Keep track of all events scheduled to the transport\n\t * when the instrument is 'synced'\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._scheduledEvents = [];\n};\n\nTone.extend(Tone.Instrument, Tone.AudioNode);\n\n/**\n * the default attributes\n * @type {object}\n */\nTone.Instrument.defaults = {\n\t/** the volume of the output in decibels */\n\t\"volume\" : 0\n};\n\n/**\n * @abstract\n * @param {string|number} note the note to trigger\n * @param {Time} [time=now] the time to trigger the ntoe\n * @param {number} [velocity=1] the velocity to trigger the note\n */\nTone.Instrument.prototype.triggerAttack = Tone.noOp;\n\n/**\n * @abstract\n * @param {Time} [time=now] when to trigger the release\n */\nTone.Instrument.prototype.triggerRelease = Tone.noOp;\n\n/**\n * Sync the instrument to the Transport. All subsequent calls of\n * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n * will be scheduled along the transport.\n * @example\n * instrument.sync()\n * //schedule 3 notes when the transport first starts\n * instrument.triggerAttackRelease('C4', '8n', 0)\n * instrument.triggerAttackRelease('E4', '8n', '8n')\n * instrument.triggerAttackRelease('G4', '8n', '4n')\n * //start the transport to hear the notes\n * Transport.start()\n * @returns {Tone.Instrument} this\n */\nTone.Instrument.prototype.sync = function(){\n\tthis._syncMethod(\"triggerAttack\", 1);\n\tthis._syncMethod(\"triggerRelease\", 0);\n\treturn this;\n};\n\n/**\n * Wrap the given method so that it can be synchronized\n * @param {String} method Which method to wrap and sync\n * @param {Number} timePosition What position the time argument appears in\n * @private\n */\nTone.Instrument.prototype._syncMethod = function(method, timePosition){\n\tvar originalMethod = this[\"_original_\"+method] = this[method];\n\tthis[method] = function(){\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\tvar time = args[timePosition];\n\t\tvar id = Tone.Transport.schedule(function(t){\n\t\t\targs[timePosition] = t;\n\t\t\toriginalMethod.apply(this, args);\n\t\t}.bind(this), time);\n\t\tthis._scheduledEvents.push(id);\n\t}.bind(this);\n};\n\n/**\n * Unsync the instrument from the Transport\n * @returns {Tone.Instrument} this\n */\nTone.Instrument.prototype.unsync = function(){\n\tthis._scheduledEvents.forEach(function(id){\n\t\tTone.Transport.clear(id);\n\t});\n\tthis._scheduledEvents = [];\n\tif (this._original_triggerAttack){\n\t\tthis.triggerAttack = this._original_triggerAttack;\n\t\tthis.triggerRelease = this._original_triggerRelease;\n\t}\n\treturn this;\n};\n\n/**\n * Trigger the attack and then the release after the duration.\n * @param {Frequency} note The note to trigger.\n * @param {Time} duration How long the note should be held for before\n * triggering the release. This value must be greater than 0.\n * @param {Time} [time=now] When the note should be triggered.\n * @param {NormalRange} [velocity=1] The velocity the note should be triggered at.\n * @returns {Tone.Instrument} this\n * @example\n * //trigger \"C4\" for the duration of an 8th note\n * synth.triggerAttackRelease(\"C4\", \"8n\");\n */\nTone.Instrument.prototype.triggerAttackRelease = function(note, duration, time, velocity){\n\ttime = this.toSeconds(time);\n\tduration = this.toSeconds(duration);\n\tthis.triggerAttack(note, time, velocity);\n\tthis.triggerRelease(time + duration);\n\treturn this;\n};\n\n/**\n * clean up\n * @returns {Tone.Instrument} this\n */\nTone.Instrument.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._volume.dispose();\n\tthis._volume = null;\n\tthis._writable([\"volume\"]);\n\tthis.volume = null;\n\tthis.unsync();\n\tthis._scheduledEvents = null;\n\treturn this;\n};\n\nexport default Tone.Instrument;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\nimport \"../signal/Signal\";\n\n/**\n * @class AudioToGain converts an input in AudioRange [-1,1] to NormalRange [0,1]. \n * See Tone.GainToAudio.\n *\n * @extends {Tone.SignalBase}\n * @constructor\n * @example\n * var a2g = new Tone.AudioToGain();\n */\nTone.AudioToGain = function(){\n\n\tTone.SignalBase.call(this);\n\t/**\n\t * @type {WaveShaperNode}\n\t * @private\n\t */\n\tthis._norm = this.input = this.output = new Tone.WaveShaper(function(x){\n\t\treturn (x + 1) / 2;\n\t});\n};\n\nTone.extend(Tone.AudioToGain, Tone.SignalBase);\n\n/**\n * clean up\n * @returns {Tone.AudioToGain} this\n */\nTone.AudioToGain.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._norm.dispose();\n\tthis._norm = null;\n\treturn this;\n};\n\nexport default Tone.AudioToGain;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../signal/Subtract\";\nimport \"../signal/EqualPowerGain\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Crossfade provides equal power fading between two inputs.\n * More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {NormalRange} [initialFade=0.5]\n * @example\n * var crossFade = new Tone.CrossFade(0.5);\n * //connect effect A to crossfade from\n * //effect output 0 to crossfade input 0\n * effectA.connect(crossFade, 0, 0);\n * //connect effect B to crossfade from\n * //effect output 0 to crossfade input 1\n * effectB.connect(crossFade, 0, 1);\n * crossFade.fade.value = 0;\n * // ^ only effectA is output\n * crossFade.fade.value = 1;\n * // ^ only effectB is output\n * crossFade.fade.value = 0.5;\n * // ^ the two signals are mixed equally.\n */\nTone.CrossFade = function(initialFade){\n\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(2, 1);\n\n\t/**\n\t * Alias for input[0]
.\n\t * @type {Tone.Gain}\n\t */\n\tthis.a = this.input[0] = new Tone.Gain();\n\n\t/**\n\t * Alias for input[1]
.\n\t * @type {Tone.Gain}\n\t */\n\tthis.b = this.input[1] = new Tone.Gain();\n\n\t/**\n\t * \tThe mix between the two inputs. A fade value of 0\n\t * \twill output 100% input[0]
and\n\t * \ta value of 1 will output 100% input[1]
.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.fade = new Tone.Signal(Tone.defaultArg(initialFade, 0.5), Tone.Type.NormalRange);\n\n\t/**\n\t * equal power gain cross fade\n\t * @private\n\t * @type {Tone.EqualPowerGain}\n\t */\n\tthis._equalPowerA = new Tone.EqualPowerGain();\n\n\t/**\n\t * equal power gain cross fade\n\t * @private\n\t * @type {Tone.EqualPowerGain}\n\t */\n\tthis._equalPowerB = new Tone.EqualPowerGain();\n\n\t/**\n\t * invert the incoming signal\n\t * @private\n\t * @type {Tone}\n\t */\n\tthis._one = this.context.getConstant(1);\n\n\t/**\n\t * invert the incoming signal\n\t * @private\n\t * @type {Tone.Subtract}\n\t */\n\tthis._invert = new Tone.Subtract();\n\n\t//connections\n\tthis.a.connect(this.output);\n\tthis.b.connect(this.output);\n\tthis.fade.chain(this._equalPowerB, this.b.gain);\n\tTone.connect(this._one, this._invert, 0, 0);\n\tthis.fade.connect(this._invert, 0, 1);\n\tthis._invert.chain(this._equalPowerA, this.a.gain);\n\tthis._readOnly(\"fade\");\n};\n\nTone.extend(Tone.CrossFade, Tone.AudioNode);\n\n/**\n * clean up\n * @returns {Tone.CrossFade} this\n */\nTone.CrossFade.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable(\"fade\");\n\tthis._equalPowerA.dispose();\n\tthis._equalPowerA = null;\n\tthis._equalPowerB.dispose();\n\tthis._equalPowerB = null;\n\tthis.fade.dispose();\n\tthis.fade = null;\n\tthis._invert.dispose();\n\tthis._invert = null;\n\tthis._one = null;\n\tthis.a.dispose();\n\tthis.a = null;\n\tthis.b.dispose();\n\tthis.b = null;\n\treturn this;\n};\n\nexport default Tone.CrossFade;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * @class A Timeline class for scheduling and maintaining state\n * along a timeline. All events must have a \"time\" property.\n * Internally, events are stored in time order for fast\n * retrieval.\n * @extends {Tone}\n * @param {Positive} [memory=Infinity] The number of previous events that are retained.\n */\nTone.Timeline = function(){\n\n\tvar options = Tone.defaults(arguments, [\"memory\"], Tone.Timeline);\n\tTone.call(this);\n\n\t/**\n\t * The array of scheduled timeline events\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._timeline = [];\n\n\t/**\n\t * The memory of the timeline, i.e.\n\t * how many events in the past it will retain\n\t * @type {Positive}\n\t */\n\tthis.memory = options.memory;\n};\n\nTone.extend(Tone.Timeline);\n\n/**\n * the default parameters\n * @static\n * @const\n */\nTone.Timeline.defaults = {\n\t\"memory\" : Infinity\n};\n\n/**\n * The number of items in the timeline.\n * @type {Number}\n * @memberOf Tone.Timeline#\n * @name length\n * @readOnly\n */\nObject.defineProperty(Tone.Timeline.prototype, \"length\", {\n\tget : function(){\n\t\treturn this._timeline.length;\n\t}\n});\n\n/**\n * Insert an event object onto the timeline. Events must have a \"time\" attribute.\n * @param {Object} event The event object to insert into the\n * timeline.\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.add = function(event){\n\t//the event needs to have a time attribute\n\tif (Tone.isUndef(event.time)){\n\t\tthrow new Error(\"Tone.Timeline: events must have a time attribute\");\n\t}\n\tevent.time = event.time.valueOf();\n\tvar index = this._search(event.time);\n\tthis._timeline.splice(index + 1, 0, event);\n\t//if the length is more than the memory, remove the previous ones\n\tif (this.length > this.memory){\n\t\tvar diff = this.length - this.memory;\n\t\tthis._timeline.splice(0, diff);\n\t}\n\treturn this;\n};\n\n/**\n * Remove an event from the timeline.\n * @param {Object} event The event object to remove from the list.\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.remove = function(event){\n\tvar index = this._timeline.indexOf(event);\n\tif (index !== -1){\n\t\tthis._timeline.splice(index, 1);\n\t}\n\treturn this;\n};\n\n/**\n * Get the nearest event whose time is less than or equal to the given time.\n * @param {Number} time The time to query.\n * @param {String} comparator Which value in the object to compare\n * @returns {Object} The event object set after that time.\n */\nTone.Timeline.prototype.get = function(time, comparator){\n\tcomparator = Tone.defaultArg(comparator, \"time\");\n\tvar index = this._search(time, comparator);\n\tif (index !== -1){\n\t\treturn this._timeline[index];\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/**\n * Return the first event in the timeline without removing it\n * @returns {Object} The first event object\n */\nTone.Timeline.prototype.peek = function(){\n\treturn this._timeline[0];\n};\n\n/**\n * Return the first event in the timeline and remove it\n * @returns {Object} The first event object\n */\nTone.Timeline.prototype.shift = function(){\n\treturn this._timeline.shift();\n};\n\n/**\n * Get the event which is scheduled after the given time.\n * @param {Number} time The time to query.\n * @param {String} comparator Which value in the object to compare\n * @returns {Object} The event object after the given time\n */\nTone.Timeline.prototype.getAfter = function(time, comparator){\n\tcomparator = Tone.defaultArg(comparator, \"time\");\n\tvar index = this._search(time, comparator);\n\tif (index + 1 < this._timeline.length){\n\t\treturn this._timeline[index + 1];\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/**\n * Get the event before the event at the given time.\n * @param {Number} time The time to query.\n * @param {String} comparator Which value in the object to compare\n * @returns {Object} The event object before the given time\n */\nTone.Timeline.prototype.getBefore = function(time, comparator){\n\tcomparator = Tone.defaultArg(comparator, \"time\");\n\tvar len = this._timeline.length;\n\t//if it's after the last item, return the last item\n\tif (len > 0 && this._timeline[len - 1][comparator] < time){\n\t\treturn this._timeline[len - 1];\n\t}\n\tvar index = this._search(time, comparator);\n\tif (index - 1 >= 0){\n\t\treturn this._timeline[index - 1];\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/**\n * Cancel events after the given time\n * @param {Number} time The time to query.\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.cancel = function(after){\n\tif (this._timeline.length > 1){\n\t\tvar index = this._search(after);\n\t\tif (index >= 0){\n\t\t\tif (this._timeline[index].time === after){\n\t\t\t\t//get the first item with that time\n\t\t\t\tfor (var i = index; i >= 0; i--){\n\t\t\t\t\tif (this._timeline[i].time === after){\n\t\t\t\t\t\tindex = i;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._timeline = this._timeline.slice(0, index);\n\t\t\t} else {\n\t\t\t\tthis._timeline = this._timeline.slice(0, index + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._timeline = [];\n\t\t}\n\t} else if (this._timeline.length === 1){\n\t\t//the first item's time\n\t\tif (this._timeline[0].time >= after){\n\t\t\tthis._timeline = [];\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Cancel events before or equal to the given time.\n * @param {Number} time The time to cancel before.\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.cancelBefore = function(time){\n\tvar index = this._search(time);\n\tif (index >= 0){\n\t\tthis._timeline = this._timeline.slice(index + 1);\n\t}\n\treturn this;\n};\n\n/**\n * Returns the previous event if there is one. null otherwise\n * @param {Object} event The event to find the previous one of\n * @return {Object} The event right before the given event\n */\nTone.Timeline.prototype.previousEvent = function(event){\n\tvar index = this._timeline.indexOf(event);\n\tif (index > 0){\n\t\treturn this._timeline[index-1];\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/**\n * Does a binary search on the timeline array and returns the\n * nearest event index whose time is after or equal to the given time.\n * If a time is searched before the first index in the timeline, -1 is returned.\n * If the time is after the end, the index of the last item is returned.\n * @param {Number} time\n * @param {String} comparator Which value in the object to compare\n * @return {Number} the index in the timeline array\n * @private\n */\nTone.Timeline.prototype._search = function(time, comparator){\n\tif (this._timeline.length === 0){\n\t\treturn -1;\n\t}\n\tcomparator = Tone.defaultArg(comparator, \"time\");\n\tvar beginning = 0;\n\tvar len = this._timeline.length;\n\tvar end = len;\n\tif (len > 0 && this._timeline[len - 1][comparator] <= time){\n\t\treturn len - 1;\n\t}\n\twhile (beginning < end){\n\t\t// calculate the midpoint for roughly equal partition\n\t\tvar midPoint = Math.floor(beginning + (end - beginning) / 2);\n\t\tvar event = this._timeline[midPoint];\n\t\tvar nextEvent = this._timeline[midPoint + 1];\n\t\tif (event[comparator] === time){\n\t\t\t//choose the last one that has the same time\n\t\t\tfor (var i = midPoint; i < this._timeline.length; i++){\n\t\t\t\tvar testEvent = this._timeline[i];\n\t\t\t\tif (testEvent[comparator] === time){\n\t\t\t\t\tmidPoint = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn midPoint;\n\t\t} else if (event[comparator] < time && nextEvent[comparator] > time){\n\t\t\treturn midPoint;\n\t\t} else if (event[comparator] > time){\n\t\t\t//search lower\n\t\t\tend = midPoint;\n\t\t} else {\n\t\t\t//search upper\n\t\t\tbeginning = midPoint + 1;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/**\n * Internal iterator. Applies extra safety checks for\n * removing items from the array.\n * @param {Function} callback\n * @param {Number=} lowerBound\n * @param {Number=} upperBound\n * @private\n */\nTone.Timeline.prototype._iterate = function(callback, lowerBound, upperBound){\n\tlowerBound = Tone.defaultArg(lowerBound, 0);\n\tupperBound = Tone.defaultArg(upperBound, this._timeline.length-1);\n\tthis._timeline.slice(lowerBound, upperBound+1).forEach(function(event){\n\t\tcallback.call(this, event);\n\t}.bind(this));\n};\n\n/**\n * Iterate over everything in the array\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.forEach = function(callback){\n\tthis._iterate(callback);\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array at or before the given time.\n * @param {Number} time The time to check if items are before\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.forEachBefore = function(time, callback){\n\t//iterate over the items in reverse so that removing an item doesn't break things\n\tvar upperBound = this._search(time);\n\tif (upperBound !== -1){\n\t\tthis._iterate(callback, 0, upperBound);\n\t}\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array after the given time.\n * @param {Number} time The time to check if items are before\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.forEachAfter = function(time, callback){\n\t//iterate over the items in reverse so that removing an item doesn't break things\n\tvar lowerBound = this._search(time);\n\tthis._iterate(callback, lowerBound + 1);\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array between the startTime and endTime. \n * The timerange is inclusive of the startTime, but exclusive of the endTime. \n * range = [startTime, endTime). \n * @param {Number} startTime The time to check if items are before\n * @param {Number} endTime The end of the test interval. \n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.forEachBetween = function(startTime, endTime, callback){\n\tvar lowerBound = this._search(startTime);\n\tvar upperBound = this._search(endTime);\n\tif (lowerBound !== -1 && upperBound !== -1){\n\t\tif (this._timeline[lowerBound].time !== startTime){\n\t\t\tlowerBound += 1;\n\t\t}\n\t\t//exclusive of the end time\n\t\tif (this._timeline[upperBound].time === endTime){\n\t\t\tupperBound -= 1;\n\t\t}\n\t\tthis._iterate(callback, lowerBound, upperBound);\n\t} else if (lowerBound === -1){\n\t\tthis._iterate(callback, 0, upperBound);\n\t}\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array at or after the given time. Similar to\n * forEachAfter, but includes the item(s) at the given time.\n * @param {Number} time The time to check if items are before\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.forEachFrom = function(time, callback){\n\t//iterate over the items in reverse so that removing an item doesn't break things\n\tvar lowerBound = this._search(time);\n\t//work backwards until the event time is less than time\n\twhile (lowerBound >= 0 && this._timeline[lowerBound].time >= time){\n\t\tlowerBound--;\n\t}\n\tthis._iterate(callback, lowerBound + 1);\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array at the given time\n * @param {Number} time The time to check if items are before\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.Timeline} this\n */\nTone.Timeline.prototype.forEachAtTime = function(time, callback){\n\t//iterate over the items in reverse so that removing an item doesn't break things\n\tvar upperBound = this._search(time);\n\tif (upperBound !== -1){\n\t\tthis._iterate(function(event){\n\t\t\tif (event.time === time){\n\t\t\t\tcallback.call(this, event);\n\t\t\t}\n\t\t}, 0, upperBound);\n\t}\n\treturn this;\n};\n\n/**\n * Clean up.\n * @return {Tone.Timeline} this\n */\nTone.Timeline.prototype.dispose = function(){\n\tTone.prototype.dispose.call(this);\n\tthis._timeline = null;\n\treturn this;\n};\n\nexport default Tone.Timeline;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Instrument\";\nimport \"../signal/Signal\";\n\n/**\n * @class This is an abstract base class for other monophonic instruments to \n * extend. IMPORTANT: It does not make any sound on its own and\n * shouldn't be directly instantiated.\n *\n * @constructor\n * @abstract\n * @extends {Tone.Instrument}\n */\nTone.Monophonic = function(options){\n\n\t//get the defaults\n\toptions = Tone.defaultArg(options, Tone.Monophonic.defaults);\n\tTone.Instrument.call(this, options);\n\n\t/**\n\t * The glide time between notes. \n\t * @type {Time}\n\t */\n\tthis.portamento = options.portamento;\n};\n\nTone.extend(Tone.Monophonic, Tone.Instrument);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.Monophonic.defaults = {\n\t\"portamento\" : 0\n};\n\n/**\n * Trigger the attack of the note optionally with a given velocity. \n * \n * \n * @param {Frequency} note The note to trigger.\n * @param {Time} [time=now] When the note should start.\n * @param {number} [velocity=1] velocity The velocity scaler \n * determines how \"loud\" the note \n * will be triggered.\n * @returns {Tone.Monophonic} this\n * @example\n * synth.triggerAttack(\"C4\");\n * @example\n * //trigger the note a half second from now at half velocity\n * synth.triggerAttack(\"C4\", \"+0.5\", 0.5);\n */\nTone.Monophonic.prototype.triggerAttack = function(note, time, velocity){\n\tthis.log(\"triggerAttack\", note, time, velocity);\n\ttime = this.toSeconds(time);\n\tthis._triggerEnvelopeAttack(time, velocity);\n\tthis.setNote(note, time);\n\treturn this;\n};\n\n/**\n * Trigger the release portion of the envelope\n * @param {Time} [time=now] If no time is given, the release happens immediatly\n * @returns {Tone.Monophonic} this\n * @example\n * synth.triggerRelease();\n */\nTone.Monophonic.prototype.triggerRelease = function(time){\n\tthis.log(\"triggerRelease\", time);\n\ttime = this.toSeconds(time);\n\tthis._triggerEnvelopeRelease(time);\n\treturn this;\n};\n\n/**\n * override this method with the actual method\n * @abstract\n * @private\n */\t\nTone.Monophonic.prototype._triggerEnvelopeAttack = function(){};\n\n/**\n * override this method with the actual method\n * @abstract\n * @private\n */\t\nTone.Monophonic.prototype._triggerEnvelopeRelease = function(){};\n\n/**\n * Get the level of the output at the given time. Measures\n * the envelope(s) value at the time. \n * @param {Time} time The time to query the envelope value\n * @return {NormalRange} The output level between 0-1\n */\nTone.Monophonic.prototype.getLevelAtTime = function(time){\n\ttime = this.toSeconds(time);\n\treturn this.envelope.getValueAtTime(time);\n};\n\n/**\n * Set the note at the given time. If no time is given, the note\n * will set immediately. \n * @param {Frequency} note The note to change to.\n * @param {Time} [time=now] The time when the note should be set. \n * @returns {Tone.Monophonic} this\n * @example\n * //change to F#6 in one quarter note from now.\n * synth.setNote(\"F#6\", \"+4n\");\n * @example\n * //change to Bb4 right now\n * synth.setNote(\"Bb4\");\n */\nTone.Monophonic.prototype.setNote = function(note, time){\n\ttime = this.toSeconds(time);\n\tif (this.portamento > 0 && this.getLevelAtTime(time) > 0.05){\n\t\tvar portTime = this.toSeconds(this.portamento);\n\t\tthis.frequency.exponentialRampTo(note, portTime, time);\n\t} else {\n\t\tthis.frequency.setValueAtTime(note, time);\n\t}\n\treturn this;\n};\n\nexport default Tone.Monophonic;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Add\";\nimport \"../signal/Multiply\";\nimport \"../signal/Signal\";\n\n/**\n * @class Performs a linear scaling on an input signal.\n * Scales a NormalRange input to between\n * outputMin and outputMax.\n *\n * @constructor\n * @extends {Tone.SignalBase}\n * @param {number} [outputMin=0] The output value when the input is 0. \n * @param {number} [outputMax=1]\tThe output value when the input is 1. \n * @example\n * var scale = new Tone.Scale(50, 100);\n * var signal = new Tone.Signal(0.5).connect(scale);\n * //the output of scale equals 75\n */\nTone.Scale = function(outputMin, outputMax){\n\n\tTone.SignalBase.call(this);\n\t\n\t/** \n\t * @private\n\t * @type {number}\n\t */\n\tthis._outputMin = Tone.defaultArg(outputMin, 0);\n\n\t/** \n\t * @private\n\t * @type {number}\n\t */\n\tthis._outputMax = Tone.defaultArg(outputMax, 1);\n\n\t/** \n\t * @private\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._scale = this.input = new Tone.Multiply(1);\n\t\n\t/** \n\t * @private\n\t * @type {Tone.Add}\n\t * @private\n\t */\n\tthis._add = this.output = new Tone.Add(0);\n\n\tthis._scale.connect(this._add);\n\tthis._setRange();\n};\n\nTone.extend(Tone.Scale, Tone.SignalBase);\n\n/**\n * The minimum output value. This number is output when \n * the value input value is 0. \n * @memberOf Tone.Scale#\n * @type {number}\n * @name min\n */\nObject.defineProperty(Tone.Scale.prototype, \"min\", {\n\tget : function(){\n\t\treturn this._outputMin;\n\t},\n\tset : function(min){\n\t\tthis._outputMin = min;\n\t\tthis._setRange();\n\t}\n});\n\n/**\n * The maximum output value. This number is output when \n * the value input value is 1. \n * @memberOf Tone.Scale#\n * @type {number}\n * @name max\n */\nObject.defineProperty(Tone.Scale.prototype, \"max\", {\n\tget : function(){\n\t\treturn this._outputMax;\n\t},\n\tset : function(max){\n\t\tthis._outputMax = max;\n\t\tthis._setRange();\n\t}\n});\n\n/**\n * set the values\n * @private\n */\nTone.Scale.prototype._setRange = function(){\n\tthis._add.value = this._outputMin;\n\tthis._scale.value = this._outputMax - this._outputMin;\n};\n\n/**\n * Clean up.\n * @returns {Tone.Scale} this\n */\nTone.Scale.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._add.dispose();\n\tthis._add = null;\n\tthis._scale.dispose();\n\tthis._scale = null;\n\treturn this;\n}; \n\nexport default Tone.Scale;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Volume is a simple volume node, useful for creating a volume fader.\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Decibels} [volume=0] the initial volume\n * @example\n * var vol = new Tone.Volume(-12);\n * instrument.chain(vol, Tone.Master);\n */\nTone.Volume = function(){\n\n\tvar options = Tone.defaults(arguments, [\"volume\"], Tone.Volume);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * the output node\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.output = this.input = new Tone.Gain(options.volume, Tone.Type.Decibels);\n\n\t/**\n\t * The unmuted volume\n\t * @type {Decibels}\n\t * @private\n\t */\n\tthis._unmutedVolume = options.volume;\n\n\t/**\n\t * The volume control in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.volume = this.output.gain;\n\n\tthis._readOnly(\"volume\");\n\n\t//set the mute initially\n\tthis.mute = options.mute;\n};\n\nTone.extend(Tone.Volume, Tone.AudioNode);\n\n/**\n * Defaults\n * @type {Object}\n * @const\n * @static\n */\nTone.Volume.defaults = {\n\t\"volume\" : 0,\n\t\"mute\" : false\n};\n\n/**\n * Mute the output.\n * @memberOf Tone.Volume#\n * @type {boolean}\n * @name mute\n * @example\n * //mute the output\n * volume.mute = true;\n */\nObject.defineProperty(Tone.Volume.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this.volume.value === -Infinity;\n\t},\n\tset : function(mute){\n\t\tif (!this.mute && mute){\n\t\t\tthis._unmutedVolume = this.volume.value;\n\t\t\t//maybe it should ramp here?\n\t\t\tthis.volume.value = -Infinity;\n\t\t} else if (this.mute && !mute){\n\t\t\tthis.volume.value = this._unmutedVolume;\n\t\t}\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.Volume} this\n */\nTone.Volume.prototype.dispose = function(){\n\tthis.input.dispose();\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable(\"volume\");\n\tthis.volume.dispose();\n\tthis.volume = null;\n\treturn this;\n};\n\nexport default Tone.Volume;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Gain\";\nimport \"../signal/SignalBase\";\n\n/**\n * @class Tone.Zero outputs 0's at audio-rate. The reason this has to be\n * it's own class is that many browsers optimize out Tone.Signal\n * with a value of 0 and will not process nodes further down the graph.\n * @extends {Tone.SignalBase}\n */\nTone.Zero = function(){\n\n\tTone.SignalBase.call(this);\n\n\t/**\n\t * The gain node\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._gain = this.input = this.output = new Tone.Gain();\n\n\tTone.connect(this.context.getConstant(0), this._gain);\n};\n\nTone.extend(Tone.Zero, Tone.SignalBase);\n\n/**\n * clean up\n * @return {Tone.Zero} this\n */\nTone.Zero.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._gain.dispose();\n\tthis._gain = null;\n\treturn this;\n};\n\nexport default Tone.Zero;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../core/Gain\";\n\n/**\n * @class Add a signal and a number or two signals. When no value is\n * passed into the constructor, Tone.Add will sum input[0]
\n * and input[1]
. If a value is passed into the constructor, \n * the it will be added to the input.\n * \n * @constructor\n * @extends {Tone.Signal}\n * @param {number=} value If no value is provided, Tone.Add will sum the first\n * and second inputs. \n * @example\n * var signal = new Tone.Signal(2);\n * var add = new Tone.Add(2);\n * signal.connect(add);\n * //the output of add equals 4\n * @example\n * //if constructed with no arguments\n * //it will add the first and second inputs\n * var add = new Tone.Add();\n * var sig0 = new Tone.Signal(3).connect(add, 0, 0);\n * var sig1 = new Tone.Signal(4).connect(add, 0, 1);\n * //the output of add equals 7. \n */\nTone.Add = function(value){\n\n\tTone.Signal.call(this);\n\tthis.createInsOuts(2, 0);\n\n\t/**\n\t * the summing node\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis._sum = this.input[0] = this.input[1] = this.output = new Tone.Gain();\n\n\t/**\n\t * @private\n\t * @type {Tone.Signal}\n\t */\n\tthis._param = this.input[1] = new Tone.Signal(value);\n\n\tthis._param.connect(this._sum);\n};\n\nTone.extend(Tone.Add, Tone.Signal);\n\n/**\n * Clean up.\n * @returns {Tone.Add} this\n */\nTone.Add.prototype.dispose = function(){\n\tTone.Signal.prototype.dispose.call(this);\n\tthis._sum.dispose();\n\tthis._sum = null;\n\treturn this;\n}; \n\nexport default Tone.Add;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Base class for all Signals. Used Internally.\n *\n * @constructor\n * @extends {Tone}\n */\nTone.SignalBase = function(){\n\tTone.AudioNode.call(this);\n};\n\nTone.extend(Tone.SignalBase, Tone.AudioNode);\n\n/**\n * When signals connect to other signals or AudioParams,\n * they take over the output value of that signal or AudioParam.\n * For all other nodes, the behavior is the same as a default connect
.\n *\n * @override\n * @param {AudioParam|AudioNode|Tone.Signal|Tone} node\n * @param {number} [outputNumber=0] The output number to connect from.\n * @param {number} [inputNumber=0] The input number to connect to.\n * @returns {Tone.SignalBase} this\n */\nTone.SignalBase.prototype.connect = function(node, outputNumber, inputNumber){\n\t//zero it out so that the signal can have full control\n\tif ((Tone.Signal && Tone.Signal === node.constructor) ||\n\t\t\t(Tone.Param && Tone.Param === node.constructor)){\n\t\t//cancel changes\n\t\tnode._param.cancelScheduledValues(0);\n\t\t//reset the value\n\t\tnode._param.setValueAtTime(0, 0);\n\t\t//mark the value as overridden\n\t\tnode.overridden = true;\n\t} else if (node instanceof AudioParam){\n\t\tnode.cancelScheduledValues(0);\n\t\tnode.setValueAtTime(0, 0);\n\t}\n\tTone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);\n\treturn this;\n};\n\nexport default Tone.SignalBase;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Envelope\";\nimport \"../core/Gain\";\n\n/**\n * @class Tone.AmplitudeEnvelope is a Tone.Envelope connected to a gain node.\n * Unlike Tone.Envelope, which outputs the envelope's value, Tone.AmplitudeEnvelope accepts\n * an audio signal as the input and will apply the envelope to the amplitude\n * of the signal. Read more about ADSR Envelopes on [Wikipedia](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).\n *\n * @constructor\n * @extends {Tone.Envelope}\n * @param {Time|Object} [attack] The amount of time it takes for the envelope to go from\n * 0 to it's maximum value.\n * @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n * \tto fall to the sustain value.\n * @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n * \tthe release is triggered.\n * @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n * @example\n * var ampEnv = new Tone.AmplitudeEnvelope({\n * \t\"attack\": 0.1,\n * \t\"decay\": 0.2,\n * \t\"sustain\": 1.0,\n * \t\"release\": 0.8\n * }).toMaster();\n * //create an oscillator and connect it\n * var osc = new Tone.Oscillator().connect(ampEnv).start();\n * //trigger the envelopes attack and release \"8t\" apart\n * ampEnv.triggerAttackRelease(\"8t\");\n */\nTone.AmplitudeEnvelope = function(){\n\n\tTone.Envelope.apply(this, arguments);\n\n\t/**\n\t * the input node\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.input = this.output = new Tone.Gain();\n\n\tthis._sig.connect(this.output.gain);\n};\n\nTone.extend(Tone.AmplitudeEnvelope, Tone.Envelope);\n\n/**\n * Clean up\n * @return {Tone.AmplitudeEnvelope} this\n */\nTone.AmplitudeEnvelope.prototype.dispose = function(){\n\tTone.Envelope.prototype.dispose.call(this);\n\treturn this;\n};\n\nexport default Tone.AmplitudeEnvelope;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Buffer\";\nimport \"../source/Source\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Wrapper around the native BufferSourceNode.\n * @extends {Tone.AudioNode}\n * @param {AudioBuffer|Tone.Buffer} buffer The buffer to play\n * @param {Function} onload The callback to invoke when the\n * buffer is done playing.\n */\nTone.BufferSource = function(){\n\n\tvar options = Tone.defaults(arguments, [\"buffer\", \"onload\"], Tone.BufferSource);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The callback to invoke after the\n\t * buffer source is done playing.\n\t * @type {Function}\n\t */\n\tthis.onended = options.onended;\n\n\t/**\n\t * The time that the buffer was started.\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._startTime = -1;\n\n\t/**\n\t * An additional flag if the actual BufferSourceNode\n\t * has been started. b/c stopping an unstarted buffer\n\t * will throw it into an invalid state\n\t * @type {Boolean}\n\t * @private\n\t */\n\tthis._sourceStarted = false;\n\n\t/**\n\t * Flag if the source has already been stopped\n\t * @type {Boolean}\n\t * @private\n\t */\n\tthis._sourceStopped = false;\n\n\t/**\n\t * The time that the buffer is scheduled to stop.\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._stopTime = -1;\n\n\t/**\n\t * The gain node which envelopes the BufferSource\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._gainNode = this.output = new Tone.Gain(0);\n\n\t/**\n\t * The buffer source\n\t * @type {AudioBufferSourceNode}\n\t * @private\n\t */\n\tthis._source = this.context.createBufferSource();\n\tTone.connect(this._source, this._gainNode);\n\tthis._source.onended = this._onended.bind(this);\n\n\t/**\n\t * The private buffer instance\n\t * @type {Tone.Buffer}\n\t * @private\n\t */\n\tthis._buffer = new Tone.Buffer(options.buffer, options.onload);\n\n\t/**\n\t * The playbackRate of the buffer\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis.playbackRate = new Tone.Param({\n\t\tparam : this._source.playbackRate,\n\t\tunits : Tone.Type.Positive,\n\t\tvalue : options.playbackRate\n\t});\n\n\t/**\n\t * The fadeIn time of the amplitude envelope.\n\t * @type {Time}\n\t */\n\tthis.fadeIn = options.fadeIn;\n\n\t/**\n\t * The fadeOut time of the amplitude envelope.\n\t * @type {Time}\n\t */\n\tthis.fadeOut = options.fadeOut;\n\n\t/**\n\t * The curve applied to the fades, either \"linear\" or \"exponential\"\n\t * @type {String}\n\t */\n\tthis.curve = options.curve;\n\n\t/**\n\t * The onended timeout\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._onendedTimeout = -1;\n\n\t//set some values initially\n\tthis.loop = options.loop;\n\tthis.loopStart = options.loopStart;\n\tthis.loopEnd = options.loopEnd;\n};\n\nTone.extend(Tone.BufferSource, Tone.AudioNode);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.BufferSource.defaults = {\n\t\"onended\" : Tone.noOp,\n\t\"onload\" : Tone.noOp,\n\t\"loop\" : false,\n\t\"loopStart\" : 0,\n\t\"loopEnd\" : 0,\n\t\"fadeIn\" : 0,\n\t\"fadeOut\" : 0,\n\t\"curve\" : \"linear\",\n\t\"playbackRate\" : 1\n};\n\n/**\n * Returns the playback state of the source, either \"started\" or \"stopped\".\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.BufferSource#\n * @name state\n */\nObject.defineProperty(Tone.BufferSource.prototype, \"state\", {\n\tget : function(){\n\t\treturn this.getStateAtTime(this.now());\n\t}\n});\n\n/**\n * Get the playback state at the given time\n * @param {Time} time The time to test the state at\n * @return {Tone.State} The playback state. \n */\nTone.BufferSource.prototype.getStateAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tif (this._startTime !== -1 && \n\t\tthis._startTime <= time && \n\t\t(this._stopTime === -1 || time < this._stopTime) && \n\t\t!this._sourceStopped){\n\t\treturn Tone.State.Started;\n\t} else {\n\t\treturn Tone.State.Stopped;\n\t}\n};\n\n/**\n * Start the buffer\n * @param {Time} [startTime=now] When the player should start.\n * @param {Time} [offset=0] The offset from the beginning of the sample\n * to start at.\n * @param {Time=} duration How long the sample should play. If no duration\n * is given, it will default to the full length\n * of the sample (minus any offset)\n * @param {Gain} [gain=1] The gain to play the buffer back at.\n * @return {Tone.BufferSource} this\n */\nTone.BufferSource.prototype.start = function(time, offset, duration, gain){\n\tthis.log(\"start\", time, offset, duration, gain);\n\tthis.assert(this._startTime === -1, \"can only be started once\");\n\tthis.assert(this.buffer.loaded, \"buffer is either not set or not loaded\");\n\tthis.assert(!this._sourceStopped, \"source is already stopped\");\n\n\ttime = this.toSeconds(time);\n\t//if it's a loop the default offset is the loopstart point\n\tif (this.loop){\n\t\toffset = Tone.defaultArg(offset, this.loopStart);\n\t} else {\n\t\t//otherwise the default offset is 0\n\t\toffset = Tone.defaultArg(offset, 0);\n\t}\n\toffset = this.toSeconds(offset);\n\t//make sure the offset is not less than 0\n\toffset = Math.max(offset, 0);\n\n\tgain = Tone.defaultArg(gain, 1);\n\n\t//apply a fade in envelope\n\tvar fadeInTime = this.toSeconds(this.fadeIn);\n\tif (fadeInTime > 0){\n\t\tthis._gainNode.gain.setValueAtTime(0, time);\n\t\tif (this.curve === \"linear\"){\n\t\t\tthis._gainNode.gain.linearRampToValueAtTime(gain, time + fadeInTime);\n\t\t} else {\n\t\t\tthis._gainNode.gain.exponentialApproachValueAtTime(gain, time, fadeInTime);\n\t\t}\n\t} else {\n\t\tthis._gainNode.gain.setValueAtTime(gain, time);\n\t}\n\n\tthis._startTime = time;\n\n\t//if a duration is given, schedule a stop\n\tif (Tone.isDefined(duration)){\n\t\tvar computedDur = this.toSeconds(duration);\n\t\t//make sure it's never negative\n\t\tcomputedDur = Math.max(computedDur, 0);\n\n\t\tthis.stop(time + computedDur);\n\t}\n\n\t//start the buffer source\n\tif (this.loop){\n\t\t//modify the offset if it's greater than the loop time\n\t\tvar loopEnd = this.loopEnd || this.buffer.duration;\n\t\tvar loopStart = this.loopStart;\n\t\tvar loopDuration = loopEnd - loopStart;\n\t\t//move the offset back\n\t\tif (offset >= loopEnd){\n\t\t\toffset = ((offset - loopStart) % loopDuration) + loopStart;\n\t\t}\n\t}\n\tthis._source.buffer = this.buffer.get();\n\tthis._source.loopEnd = this.loopEnd || this.buffer.duration;\n\tif (offset < this.buffer.duration){\n\t\tthis._sourceStarted = true;\n\t\tthis._source.start(time, offset);\n\t}\n\n\treturn this;\n};\n\n/**\n * Stop the buffer. \n * @param {Time=} time The time the buffer should stop.\n * @return {Tone.BufferSource} this\n */\nTone.BufferSource.prototype.stop = function(time){\n\tthis.log(\"stop\", time);\n\tthis.assert(this.buffer.loaded, \"buffer is either not set or not loaded\");\n\tthis.assert(!this._sourceStopped, \"source is already stopped\");\n\n\ttime = this.toSeconds(time);\n\n\t//if the event has already been scheduled, clear it\n\tif (this._stopTime !== -1){\n\t\tthis.cancelStop();\n\t}\n\n\t//the fadeOut time\n\tvar fadeOutTime = this.toSeconds(this.fadeOut);\n\n\t//cancel the previous curve\n\tthis._stopTime = time + fadeOutTime;\n\n\tif (fadeOutTime > 0){\n\t\t//start the fade out curve at the given time\n\t\tif (this.curve === \"linear\"){\n\t\t\tthis._gainNode.gain.linearRampTo(0, fadeOutTime, time);\n\t\t} else {\n\t\t\tthis._gainNode.gain.targetRampTo(0, fadeOutTime, time);\n\t\t}\n\t} else {\n\t\t//stop any ongoing ramps, and set the value to 0\n\t\tthis._gainNode.gain.cancelAndHoldAtTime(time);\n\t\tthis._gainNode.gain.setValueAtTime(0, time);\n\t}\n\n\tTone.context.clearTimeout(this._onendedTimeout);\n\tthis._onendedTimeout = Tone.context.setTimeout(this._onended.bind(this), this._stopTime - this.now());\n\n\treturn this;\n};\n\n/**\n * Cancel a scheduled stop event\n * @return {Tone.BufferSource} this\n */\nTone.BufferSource.prototype.cancelStop = function(){\n\tif (this._startTime !== -1 && !this._sourceStopped){\n\t\t//cancel the stop envelope\n\t\tvar fadeInTime = this.toSeconds(this.fadeIn);\n\t\tthis._gainNode.gain.cancelScheduledValues(this._startTime + fadeInTime + this.sampleTime);\n\t\tthis.context.clearTimeout(this._onendedTimeout);\n\t\tthis._stopTime = -1;\n\t}\n\treturn this;\n};\n\n/**\n * Internal callback when the buffer is ended.\n * Invokes `onended` and disposes the node.\n * @private\n */\nTone.BufferSource.prototype._onended = function(){\n\tif (!this._sourceStopped){\n\t\tthis._sourceStopped = true;\n\t\t//allow additional time for the exponential curve to fully decay\n\t\tvar additionalTail = this.curve === \"exponential\" ? this.fadeOut * 2 : 0;\n\t\tif (this._sourceStarted && this._stopTime !== -1){\n\t\t\tthis._source.stop(this._stopTime + additionalTail);\n\t\t}\n\t\tthis.onended(this);\n\n\t\t//dispose the source after it's come to a stop\n\t\tsetTimeout(function(){\n\t\t\t//if it hasn't already been disposed\n\t\t\tif (this._source){\n\t\t\t\tthis._source.disconnect();\n\t\t\t\tthis._gainNode.disconnect();\n\t\t\t}\n\t\t}.bind(this), additionalTail * 1000 + 100);\n\t}\n};\n\n/**\n * If loop is true, the loop will start at this position.\n * @memberOf Tone.BufferSource#\n * @type {Time}\n * @name loopStart\n */\nObject.defineProperty(Tone.BufferSource.prototype, \"loopStart\", {\n\tget : function(){\n\t\treturn this._source.loopStart;\n\t},\n\tset : function(loopStart){\n\t\tthis._source.loopStart = this.toSeconds(loopStart);\n\t}\n});\n\n/**\n * If loop is true, the loop will end at this position.\n * @memberOf Tone.BufferSource#\n * @type {Time}\n * @name loopEnd\n */\nObject.defineProperty(Tone.BufferSource.prototype, \"loopEnd\", {\n\tget : function(){\n\t\treturn this._source.loopEnd;\n\t},\n\tset : function(loopEnd){\n\t\tthis._source.loopEnd = this.toSeconds(loopEnd);\n\t}\n});\n\n/**\n * The audio buffer belonging to the player.\n * @memberOf Tone.BufferSource#\n * @type {Tone.Buffer}\n * @name buffer\n */\nObject.defineProperty(Tone.BufferSource.prototype, \"buffer\", {\n\tget : function(){\n\t\treturn this._buffer;\n\t},\n\tset : function(buffer){\n\t\tthis._buffer.set(buffer);\n\t}\n});\n\n/**\n * If the buffer should loop once it's over.\n * @memberOf Tone.BufferSource#\n * @type {Boolean}\n * @name loop\n */\nObject.defineProperty(Tone.BufferSource.prototype, \"loop\", {\n\tget : function(){\n\t\treturn this._source.loop;\n\t},\n\tset : function(loop){\n\t\tthis._source.loop = loop;\n\t\tthis.cancelStop();\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.BufferSource} this\n */\nTone.BufferSource.prototype.dispose = function(){\n\tif (!this._wasDisposed){\n\t\tthis._wasDisposed = true;\n\t\tTone.AudioNode.prototype.dispose.call(this);\n\t\tthis.onended = null;\n\t\tthis._source.onended = null;\n\t\tthis._source.disconnect();\n\t\tthis._source = null;\n\t\tthis._gainNode.dispose();\n\t\tthis._gainNode = null;\n\t\tthis._buffer.dispose();\n\t\tthis._buffer = null;\n\t\tthis._startTime = -1;\n\t\tthis.playbackRate = null;\n\t\tTone.context.clearTimeout(this._onendedTimeout);\n\t}\n\treturn this;\n};\n\nexport default Tone.BufferSource;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../signal/Signal\";\nimport \"../signal/Multiply\";\nimport \"../core/Gain\";\n\n/**\n * \t@class Tone.FeedbackEffect provides a loop between an \n * \t audio source and its own output. This is a base-class\n * \t for feedback effects. \n *\n * @constructor\n * @extends {Tone.Effect}\n * @param {NormalRange|Object} [feedback] The initial feedback value.\n */\nTone.FeedbackEffect = function(){\n\n\tvar options = Tone.defaults(arguments, [\"feedback\"], Tone.FeedbackEffect);\n\tTone.Effect.call(this, options);\n\t\n\t/**\n\t * the gain which controls the feedback\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._feedbackGain = new Tone.Gain(options.feedback, Tone.Type.NormalRange);\n\n\t/**\n\t * The amount of signal which is fed back into the effect input. \n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.feedback = this._feedbackGain.gain;\n\n\t//the feedback loop\n\tthis.effectReturn.chain(this._feedbackGain, this.effectSend);\n\tthis._readOnly([\"feedback\"]);\n};\n\nTone.extend(Tone.FeedbackEffect, Tone.Effect);\n\n/**\n * @static\n * @type {Object}\n */\nTone.FeedbackEffect.defaults = {\n\t\"feedback\" : 0.125\n};\n\n/**\n * Clean up. \n * @returns {Tone.FeedbackEffect} this\n */\nTone.FeedbackEffect.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._writable([\"feedback\"]);\n\tthis._feedbackGain.dispose();\n\tthis._feedbackGain = null;\n\tthis.feedback = null;\n\treturn this;\n};\n\nexport default Tone.FeedbackEffect;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Timeline\";\nimport \"../type/Type\";\n\n/**\n * @class A Timeline State. Provides the methods: setStateAtTime(\"state\", time)
\n * and getValueAtTime(time)
.\n *\n * @extends {Tone.Timeline}\n * @param {String} initial The initial state of the TimelineState. \n * Defaults to undefined
\n */\nTone.TimelineState = function(initial){\n\n\tTone.Timeline.call(this);\n\n\t/**\n\t * The initial state\n\t * @private\n\t * @type {String}\n\t */\n\tthis._initial = initial;\n};\n\nTone.extend(Tone.TimelineState, Tone.Timeline);\n\n/**\n * Returns the scheduled state scheduled before or at\n * the given time.\n * @param {Number} time The time to query.\n * @return {String} The name of the state input in setStateAtTime.\n */\nTone.TimelineState.prototype.getValueAtTime = function(time){\n\tvar event = this.get(time);\n\tif (event !== null){\n\t\treturn event.state;\n\t} else {\n\t\treturn this._initial;\n\t}\n};\n\n/**\n * Add a state to the timeline.\n * @param {String} state The name of the state to set.\n * @param {Number} time The time to query.\n * @returns {Tone.TimelineState} this\n */\nTone.TimelineState.prototype.setStateAtTime = function(state, time){\n\t//all state changes need to be >= the previous state time\n\t//TODO throw error if time < the previous event time\n\tthis.add({\n\t\t\"state\" : state,\n\t\t\"time\" : time\n\t});\n\treturn this;\n};\n\n/**\n * Return the event before the time with the given state\n * @param {Tone.State} state The state to look for\n * @param {Time} time When to check before\t\t\t\n * @return {Object} The event with the given state before the time\n */\nTone.TimelineState.prototype.getLastState = function(state, time){\n\ttime = this.toSeconds(time);\n\tvar index = this._search(time);\n\tfor (var i = index; i >= 0; i--){\n\t\tvar event = this._timeline[i];\n\t\tif (event.state === state){\n\t\t\treturn event;\n\t\t}\n\t}\n};\n\n/**\n * Return the event after the time with the given state\n * @param {Tone.State} state The state to look for\n * @param {Time} time When to check from\n * @return {Object} The event with the given state after the time\n */\nTone.TimelineState.prototype.getNextState = function(state, time){\n\ttime = this.toSeconds(time);\n\tvar index = this._search(time);\n\tif (index !== -1){\n\t\tfor (var i = index; i < this._timeline.length; i++){\n\t\t\tvar event = this._timeline[i];\n\t\t\tif (event.state === state){\n\t\t\t\treturn event;\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport default Tone.TimelineState;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * @class Tone.Emitter gives classes which extend it\n * the ability to listen for and emit events.\n * Inspiration and reference from Jerome Etienne's [MicroEvent](https://github.com/jeromeetienne/microevent.js).\n * MIT (c) 2011 Jerome Etienne.\n *\n * @extends {Tone}\n */\nTone.Emitter = function(){\n\tTone.call(this);\n\t/**\n\t * Contains all of the events.\n\t * @private\n\t * @type {Object}\n\t */\n\tthis._events = {};\n};\n\nTone.extend(Tone.Emitter);\n\n/**\n * Bind a callback to a specific event.\n * @param {String} event The name of the event to listen for.\n * @param {Function} callback The callback to invoke when the\n * event is emitted\n * @return {Tone.Emitter} this\n */\nTone.Emitter.prototype.on = function(event, callback){\n\t//split the event\n\tvar events = event.split(/\\W+/);\n\tfor (var i = 0; i < events.length; i++){\n\t\tvar eventName = events[i];\n\t\tif (!this._events.hasOwnProperty(eventName)){\n\t\t\tthis._events[eventName] = [];\n\t\t}\n\t\tthis._events[eventName].push(callback);\n\t}\n\treturn this;\n};\n\n/**\n * Bind a callback which is only invoked once\n * @param {String} event The name of the event to listen for.\n * @param {Function} callback The callback to invoke when the\n * event is emitted\n * @return {Tone.Emitter} this\n */\nTone.Emitter.prototype.once = function(event, callback){\n\tvar boundCallback = function(){\n\t\t//invoke the callback\n\t\tcallback.apply(this, arguments);\n\t\tthis.off(event, boundCallback);\n\t}.bind(this);\n\tthis.on(event, boundCallback);\n\treturn this;\n};\n\n/**\n * Remove the event listener.\n * @param {String} event The event to stop listening to.\n * @param {Function=} callback The callback which was bound to\n * the event with Tone.Emitter.on.\n * If no callback is given, all callbacks\n * events are removed.\n * @return {Tone.Emitter} this\n */\nTone.Emitter.prototype.off = function(event, callback){\n\tvar events = event.split(/\\W+/);\n\tfor (var ev = 0; ev < events.length; ev++){\n\t\tevent = events[ev];\n\t\tif (this._events.hasOwnProperty(event)){\n\t\t\tif (Tone.isUndef(callback)){\n\t\t\t\tthis._events[event] = [];\n\t\t\t} else {\n\t\t\t\tvar eventList = this._events[event];\n\t\t\t\tfor (var i = 0; i < eventList.length; i++){\n\t\t\t\t\tif (eventList[i] === callback){\n\t\t\t\t\t\teventList.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Invoke all of the callbacks bound to the event\n * with any arguments passed in.\n * @param {String} event The name of the event.\n * @param {...*} args The arguments to pass to the functions listening.\n * @return {Tone.Emitter} this\n */\nTone.Emitter.prototype.emit = function(event){\n\tif (this._events){\n\t\tvar args = Array.apply(null, arguments).slice(1);\n\t\tif (this._events.hasOwnProperty(event)){\n\t\t\tvar eventList = this._events[event].slice(0);\n\t\t\tfor (var i = 0, len = eventList.length; i < len; i++){\n\t\t\t\teventList[i].apply(this, args);\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Add Emitter functions (on/off/emit) to the object\n * @param {Object|Function} object The object or class to extend.\n * @returns {Tone.Emitter}\n */\nTone.Emitter.mixin = function(object){\n\tvar functions = [\"on\", \"once\", \"off\", \"emit\"];\n\tobject._events = {};\n\tfor (var i = 0; i < functions.length; i++){\n\t\tvar func = functions[i];\n\t\tvar emitterFunc = Tone.Emitter.prototype[func];\n\t\tobject[func] = emitterFunc;\n\t}\n\treturn Tone.Emitter;\n};\n\n/**\n * Clean up\n * @return {Tone.Emitter} this\n */\nTone.Emitter.prototype.dispose = function(){\n\tTone.prototype.dispose.call(this);\n\tthis._events = null;\n\treturn this;\n};\n\nexport default Tone.Emitter;\n\n","import Tone from \"../core/Tone\";\nimport \"../shim/AudioContext\";\n\n/**\n * AnalyserNode.getFloatTimeDomainData polyfill\n * @private\n */\nif (Tone.supported){\n\tif (!AnalyserNode.prototype.getFloatTimeDomainData){\n\t\t//referenced https://github.com/mohayonao/get-float-time-domain-data\n\t\tAnalyserNode.prototype.getFloatTimeDomainData = function(array){\n\t\t\tvar uint8 = new Uint8Array(array.length);\n\t\t\tthis.getByteTimeDomainData(uint8);\n\t\t\tfor (var i = 0; i < uint8.length; i++){\n\t\t\t\tarray[i] = (uint8[i] - 128) / 128;\n\t\t\t}\n\t\t};\n\t}\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../core/AudioNode\";\nimport \"../shim/AnalyserNode\";\n\n/**\n * @class Wrapper around the native Web Audio's\n * [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).\n * Extracts FFT or Waveform data from the incoming signal.\n * @extends {Tone.AudioNode}\n * @param {String=} type The return type of the analysis, either \"fft\", or \"waveform\".\n * @param {Number=} size The size of the FFT. Value must be a power of\n * two in the range 16 to 16384.\n */\nTone.Analyser = function(){\n\n\tvar options = Tone.defaults(arguments, [\"type\", \"size\"], Tone.Analyser);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The analyser node.\n\t * @private\n\t * @type {AnalyserNode}\n\t */\n\tthis._analyser = this.input = this.output = this.context.createAnalyser();\n\n\t/**\n\t * The analysis type\n\t * @type {String}\n\t * @private\n\t */\n\tthis._type = options.type;\n\n\t/**\n\t * The buffer that the FFT data is written to\n\t * @type {TypedArray}\n\t * @private\n\t */\n\tthis._buffer = null;\n\n\t//set the values initially\n\tthis.size = options.size;\n\tthis.type = options.type;\n};\n\nTone.extend(Tone.Analyser, Tone.AudioNode);\n\n/**\n * The default values.\n * @type {Object}\n * @const\n */\nTone.Analyser.defaults = {\n\t\"size\" : 1024,\n\t\"type\" : \"fft\",\n\t\"smoothing\" : 0.8\n};\n\n/**\n * Possible return types of analyser.getValue()\n * @enum {String}\n */\nTone.Analyser.Type = {\n\tWaveform : \"waveform\",\n\tFFT : \"fft\"\n};\n\n/**\n * Run the analysis given the current settings and return the\n * result as a TypedArray of length [size](#size).\n * @returns {TypedArray}\n */\nTone.Analyser.prototype.getValue = function(){\n\tif (this._type === Tone.Analyser.Type.FFT){\n\t\tthis._analyser.getFloatFrequencyData(this._buffer);\n\t} else if (this._type === Tone.Analyser.Type.Waveform){\n\t\tthis._analyser.getFloatTimeDomainData(this._buffer);\n\t}\n\treturn this._buffer;\n};\n\n/**\n * The size of analysis. This must be a power of two in the range 16 to 16384.\n * @memberOf Tone.Analyser#\n * @type {Number}\n * @name size\n */\nObject.defineProperty(Tone.Analyser.prototype, \"size\", {\n\tget : function(){\n\t\treturn this._analyser.frequencyBinCount;\n\t},\n\tset : function(size){\n\t\t// fftSize is double frequencyBinCount\n\t\tthis._analyser.fftSize = size * 2;\n\t\tthis._buffer = new Float32Array(size);\n\t}\n});\n\n/**\n * The analysis function returned by analyser.getValue(), either \"fft\" or \"waveform\".\n * @memberOf Tone.Analyser#\n * @type {String}\n * @name type\n */\nObject.defineProperty(Tone.Analyser.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._type;\n\t},\n\tset : function(type){\n\t\tif (type !== Tone.Analyser.Type.Waveform && type !== Tone.Analyser.Type.FFT){\n\t\t\tthrow new TypeError(\"Tone.Analyser: invalid type: \"+type);\n\t\t}\n\t\tthis._type = type;\n\t}\n});\n\n/**\n * 0 represents no time averaging with the last analysis frame.\n * @memberOf Tone.Analyser#\n * @type {NormalRange}\n * @name smoothing\n */\nObject.defineProperty(Tone.Analyser.prototype, \"smoothing\", {\n\tget : function(){\n\t\treturn this._analyser.smoothingTimeConstant;\n\t},\n\tset : function(val){\n\t\tthis._analyser.smoothingTimeConstant = val;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.Analyser} this\n */\nTone.Analyser.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._analyser.disconnect();\n\tthis._analyser = null;\n\tthis._buffer = null;\n};\n\nexport default Tone.Analyser;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../source/Oscillator\";\nimport \"../source/PulseOscillator\";\nimport \"../source/PWMOscillator\";\nimport \"../source/FMOscillator\";\nimport \"../source/AMOscillator\";\nimport \"../source/FatOscillator\";\n\n/**\n * @class Tone.OmniOscillator aggregates Tone.Oscillator, Tone.PulseOscillator,\n * Tone.PWMOscillator, Tone.FMOscillator, Tone.AMOscillator, and Tone.FatOscillator\n * into one class. The oscillator class can be changed by setting the `type`.\n * `omniOsc.type = \"pwm\"` will set it to the Tone.PWMOscillator. Prefixing\n * any of the basic types (\"sine\", \"square4\", etc.) with \"fm\", \"am\", or \"fat\"\n * will use the FMOscillator, AMOscillator or FatOscillator respectively.\n * For example: `omniOsc.type = \"fatsawtooth\"` will create set the oscillator\n * to a FatOscillator of type \"sawtooth\".\n *\n * @extends {Tone.Source}\n * @constructor\n * @param {Frequency} frequency The initial frequency of the oscillator.\n * @param {String} type The type of the oscillator.\n * @example\n * var omniOsc = new Tone.OmniOscillator(\"C#4\", \"pwm\");\n */\nTone.OmniOscillator = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\"], Tone.OmniOscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The detune control\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\n\t/**\n\t * the type of the oscillator source\n\t * @type {String}\n\t * @private\n\t */\n\tthis._sourceType = undefined;\n\n\t/**\n\t * the oscillator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._oscillator = null;\n\n\t//set the oscillator\n\tthis.type = options.type;\n\tthis._readOnly([\"frequency\", \"detune\"]);\n\t//set the options\n\tthis.set(options);\n};\n\nTone.extend(Tone.OmniOscillator, Tone.Source);\n\n/**\n * default values\n * @static\n * @type {Object}\n * @const\n */\nTone.OmniOscillator.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"type\" : \"sine\",\n\t\"phase\" : 0\n};\n\n/**\n * @enum {String}\n * @private\n */\nvar OmniOscType = {\n\tPulse : \"PulseOscillator\",\n\tPWM : \"PWMOscillator\",\n\tOsc : \"Oscillator\",\n\tFM : \"FMOscillator\",\n\tAM : \"AMOscillator\",\n\tFat : \"FatOscillator\"\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now] the time to start the oscillator\n * @private\n */\nTone.OmniOscillator.prototype._start = function(time){\n\tthis._oscillator.start(time);\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now] the time to start the oscillator\n * @private\n */\nTone.OmniOscillator.prototype._stop = function(time){\n\tthis._oscillator.stop(time);\n};\n\nTone.OmniOscillator.prototype.restart = function(time){\n\tthis._oscillator.restart(time);\n};\n\n/**\n * The type of the oscillator. Can be any of the basic types: sine, square, triangle, sawtooth. Or\n * prefix the basic types with \"fm\", \"am\", or \"fat\" to use the FMOscillator, AMOscillator or FatOscillator\n * types. The oscillator could also be set to \"pwm\" or \"pulse\". All of the parameters of the\n * oscillator's class are accessible when the oscillator is set to that type, but throws an error\n * when it's not.\n *\n * @memberOf Tone.OmniOscillator#\n * @type {String}\n * @name type\n * @example\n * omniOsc.type = \"pwm\";\n * //modulationFrequency is parameter which is available\n * //only when the type is \"pwm\".\n * omniOsc.modulationFrequency.value = 0.5;\n * @example\n * //an square wave frequency modulated by a sawtooth\n * omniOsc.type = \"fmsquare\";\n * omniOsc.modulationType = \"sawtooth\";\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"type\", {\n\tget : function(){\n\t\tvar prefix = \"\";\n\t\tif (this._sourceType === OmniOscType.FM){\n\t\t\tprefix = \"fm\";\n\t\t} else if (this._sourceType === OmniOscType.AM){\n\t\t\tprefix = \"am\";\n\t\t} else if (this._sourceType === OmniOscType.Fat){\n\t\t\tprefix = \"fat\";\n\t\t}\n\t\treturn prefix + this._oscillator.type;\n\t},\n\tset : function(type){\n\t\tif (type.substr(0, 2) === \"fm\"){\n\t\t\tthis._createNewOscillator(OmniOscType.FM);\n\t\t\tthis._oscillator.type = type.substr(2);\n\t\t} else if (type.substr(0, 2) === \"am\"){\n\t\t\tthis._createNewOscillator(OmniOscType.AM);\n\t\t\tthis._oscillator.type = type.substr(2);\n\t\t} else if (type.substr(0, 3) === \"fat\"){\n\t\t\tthis._createNewOscillator(OmniOscType.Fat);\n\t\t\tthis._oscillator.type = type.substr(3);\n\t\t} else if (type === \"pwm\"){\n\t\t\tthis._createNewOscillator(OmniOscType.PWM);\n\t\t} else if (type === \"pulse\"){\n\t\t\tthis._createNewOscillator(OmniOscType.Pulse);\n\t\t} else {\n\t\t\tthis._createNewOscillator(OmniOscType.Osc);\n\t\t\tthis._oscillator.type = type;\n\t\t}\n\t}\n});\n\n/**\n * The partials of the waveform. A partial represents\n * the amplitude at a harmonic. The first harmonic is the\n * fundamental frequency, the second is the octave and so on\n * following the harmonic series.\n * Setting this value will automatically set the type to \"custom\".\n * The value is an empty array when the type is not \"custom\".\n * This is not available on \"pwm\" and \"pulse\" oscillator types.\n * @memberOf Tone.OmniOscillator#\n * @type {Array}\n * @name partials\n * @example\n * osc.partials = [1, 0.2, 0.01];\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn this._oscillator.partials;\n\t},\n\tset : function(partials){\n\t\tthis._oscillator.partials = partials;\n\t}\n});\n\n/**\n * The partial count of the oscillator. This is not available on \"pwm\" and \"pulse\" oscillator types.\n * @memberOf Tone.OmniOscillator#\n * @type {Number}\n * @name partialCount\n * @example\n * //set the maximum number of partials\n * osc.partialCount = 0;\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"partialCount\", {\n\tget : function(){\n\t\treturn this._oscillator.partialCount;\n\t},\n\tset : function(partialCount){\n\t\tthis._oscillator.partialCount = partialCount;\n\t}\n});\n\n/**\n * Set a member/attribute of the oscillator.\n * @param {Object|String} params\n * @param {number=} value\n * @param {Time=} rampTime\n * @returns {Tone.OmniOscillator} this\n */\nTone.OmniOscillator.prototype.set = function(params, value){\n\t//make sure the type is set first\n\tif (params === \"type\"){\n\t\tthis.type = value;\n\t} else if (Tone.isObject(params) && params.hasOwnProperty(\"type\")){\n\t\tthis.type = params.type;\n\t}\n\t//then set the rest\n\tTone.prototype.set.apply(this, arguments);\n\treturn this;\n};\n\n/**\n * Get the object's attributes. Given no arguments get\n * will return all available object properties and their corresponding\n * values. Pass in a single attribute to retrieve or an array\n * of attributes. The attribute strings can also include a \".\"\n * to access deeper properties.\n * @param {Array=|string|undefined} params the parameters to get, otherwise will return\n * \t\t\t\t\t all available.\n * @returns {Object}\n */\nTone.OmniOscillator.prototype.get = function(params){\n\tvar options = this._oscillator.get(params);\n\toptions.type = this.type;\n\treturn options;\n};\n\n/**\n * connect the oscillator to the frequency and detune signals\n * @private\n */\nTone.OmniOscillator.prototype._createNewOscillator = function(oscType){\n\tif (oscType !== this._sourceType){\n\t\tthis._sourceType = oscType;\n\t\tvar OscillatorConstructor = Tone[oscType];\n\t\t//short delay to avoid clicks on the change\n\t\tvar now = this.now();\n\t\tif (this._oscillator !== null){\n\t\t\tvar oldOsc = this._oscillator;\n\t\t\toldOsc.stop(now);\n\t\t\t//dispose the old one\n\t\t\tthis.context.setTimeout(function(){\n\t\t\t\toldOsc.dispose();\n\t\t\t\toldOsc = null;\n\t\t\t}, this.blockTime);\n\t\t}\n\t\tthis._oscillator = new OscillatorConstructor();\n\t\tthis.frequency.connect(this._oscillator.frequency);\n\t\tthis.detune.connect(this._oscillator.detune);\n\t\tthis._oscillator.connect(this.output);\n\t\tif (this.state === Tone.State.Started){\n\t\t\tthis._oscillator.start(now);\n\t\t}\n\t}\n};\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.OmniOscillator#\n * @type {Degrees}\n * @name phase\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._oscillator.phase;\n\t},\n\tset : function(phase){\n\t\tthis._oscillator.phase = phase;\n\t}\n});\n\n/**\n * The source type names\n * @private\n * @type {Object}\n */\nvar SourceTypeNames = {\n\tPulseOscillator : \"pulse\",\n\tPWMOscillator : \"pwm\",\n\tOscillator : \"oscillator\",\n\tFMOscillator : \"fm\",\n\tAMOscillator : \"am\",\n\tFatOscillator : \"fat\"\n};\n\n/**\n * The source type of the oscillator. \n * @memberOf Tone.OmniOscillator#\n * @type {String}\n * @name sourceType\n * @example\n * var omniOsc = new Tone.OmniOscillator(440, \"fmsquare\");\n * omniOsc.sourceType // 'fm'\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"sourceType\", {\n\tget : function(){\n\t\treturn SourceTypeNames[this._sourceType];\n\t},\n\tset : function(sType){\n\t\t//the basetype defaults to sine\n\t\tvar baseType = \"sine\";\n\t\tif (this._oscillator.type !== \"pwm\" && this._oscillator.type !== \"pulse\"){\n\t\t\tbaseType = this._oscillator.type;\n\t\t} \n\n\t\t//set the type\n\t\tif (sType === SourceTypeNames.FMOscillator){\n\t\t\tthis.type = \"fm\" + baseType;\n\t\t} else if (sType === SourceTypeNames.AMOscillator){\n\t\t\tthis.type = \"am\" + baseType;\n\t\t} else if (sType === SourceTypeNames.FatOscillator){\n\t\t\tthis.type = \"fat\" + baseType;\n\t\t} else if (sType === SourceTypeNames.Oscillator){\n\t\t\tthis.type = baseType;\n\t\t} else if (sType === SourceTypeNames.PulseOscillator){\n\t\t\tthis.type = \"pulse\";\n\t\t} else if (sType === SourceTypeNames.PWMOscillator){\n\t\t\tthis.type = \"pwm\";\n\t\t}\n\t}\n});\n\n/**\n * The base type of the oscillator.\n * @memberOf Tone.OmniOscillator#\n * @type {String}\n * @name baseType\n * @example\n * var omniOsc = new Tone.OmniOscillator(440, \"fmsquare4\");\n * omniOsc.sourceType // 'fm'\n * omniOsc.baseType //'square'\n * omniOsc.partialCount //4\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn this._oscillator.baseType;\n\t},\n\tset : function(baseType){\n\t\tif (this.sourceType !== SourceTypeNames.PulseOscillator && this.sourceType !== SourceTypeNames.PWMOscillator){\n\t\t\tthis._oscillator.baseType = baseType;\n\t\t}\n\t}\n});\n\n/**\n * The width of the oscillator (only if the oscillator is set to \"pulse\")\n * @memberOf Tone.OmniOscillator#\n * @type {NormalRange}\n * @signal\n * @name width\n * @example\n * var omniOsc = new Tone.OmniOscillator(440, \"pulse\");\n * //can access the width attribute only if type === \"pulse\"\n * omniOsc.width.value = 0.2;\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"width\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.Pulse){\n\t\t\treturn this._oscillator.width;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n});\n\n/**\n * The number of detuned oscillators\n * @memberOf Tone.OmniOscillator#\n * @type {Number}\n * @name count\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"count\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.Fat){\n\t\t\treturn this._oscillator.count;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t},\n\tset : function(count){\n\t\tif (this._sourceType === OmniOscType.Fat){\n\t\t\tthis._oscillator.count = count;\n\t\t}\n\t}\n});\n\n/**\n * The detune spread between the oscillators. If \"count\" is\n * set to 3 oscillators and the \"spread\" is set to 40,\n * the three oscillators would be detuned like this: [-20, 0, 20]\n * for a total detune spread of 40 cents. See Tone.FatOscillator\n * for more info.\n * @memberOf Tone.OmniOscillator#\n * @type {Cents}\n * @name spread\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"spread\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.Fat){\n\t\t\treturn this._oscillator.spread;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t},\n\tset : function(spread){\n\t\tif (this._sourceType === OmniOscType.Fat){\n\t\t\tthis._oscillator.spread = spread;\n\t\t}\n\t}\n});\n\n/**\n * The type of the modulator oscillator. Only if the oscillator\n * is set to \"am\" or \"fm\" types. see. Tone.AMOscillator or Tone.FMOscillator\n * for more info.\n * @memberOf Tone.OmniOscillator#\n * @type {String}\n * @name modulationType\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"modulationType\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM){\n\t\t\treturn this._oscillator.modulationType;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t},\n\tset : function(mType){\n\t\tif (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM){\n\t\t\tthis._oscillator.modulationType = mType;\n\t\t}\n\t}\n});\n\n/**\n * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n * modulating signal (ma) -- as in ma/mf.\n * See Tone.FMOscillator for more info.\n * @type {Positive}\n * @signal\n * @name modulationIndex\n * @memberof Tone.OmniOscillator#\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"modulationIndex\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.FM){\n\t\t\treturn this._oscillator.modulationIndex;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n});\n\n/**\n * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n * A harmonicity of 1 gives both oscillators the same frequency.\n * Harmonicity = 2 means a change of an octave. See Tone.AMOscillator or Tone.FMOscillator\n * for more info.\n * @memberOf Tone.OmniOscillator#\n * @signal\n * @type {Positive}\n * @name harmonicity\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"harmonicity\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.FM || this._sourceType === OmniOscType.AM){\n\t\t\treturn this._oscillator.harmonicity;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n});\n\n/**\n * The modulationFrequency Signal of the oscillator\n * (only if the oscillator type is set to pwm). See\n * Tone.PWMOscillator for more info.\n * @memberOf Tone.OmniOscillator#\n * @type {Frequency}\n * @signal\n * @name modulationFrequency\n * @example\n * var omniOsc = new Tone.OmniOscillator(440, \"pwm\");\n * //can access the modulationFrequency attribute only if type === \"pwm\"\n * omniOsc.modulationFrequency.value = 0.2;\n */\nObject.defineProperty(Tone.OmniOscillator.prototype, \"modulationFrequency\", {\n\tget : function(){\n\t\tif (this._sourceType === OmniOscType.PWM){\n\t\t\treturn this._oscillator.modulationFrequency;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.OmniOscillator} this\n */\nTone.OmniOscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"detune\"]);\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis._oscillator.dispose();\n\tthis._oscillator = null;\n\tthis._sourceType = null;\n\treturn this;\n};\n\nexport default Tone.OmniOscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/AmplitudeEnvelope\";\nimport \"../source/OmniOscillator\";\nimport \"../instrument/Monophonic\";\n\n/**\n * @class Tone.Synth is composed simply of a Tone.OmniOscillator\n * routed through a Tone.AmplitudeEnvelope.\n *
\n *\n * @constructor\n * @extends {Tone.Monophonic}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var synth = new Tone.Synth().toMaster();\n * synth.triggerAttackRelease(\"C4\", \"8n\");\n */\nTone.Synth = function(options){\n\n\t//get the defaults\n\toptions = Tone.defaultArg(options, Tone.Synth.defaults);\n\tTone.Monophonic.call(this, options);\n\n\t/**\n\t * The oscillator.\n\t * @type {Tone.OmniOscillator}\n\t */\n\tthis.oscillator = new Tone.OmniOscillator(options.oscillator);\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this.oscillator.frequency;\n\n\t/**\n\t * The detune control.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = this.oscillator.detune;\n\n\t/**\n\t * The amplitude envelope.\n\t * @type {Tone.AmplitudeEnvelope}\n\t */\n\tthis.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\n\t//connect the oscillators to the output\n\tthis.oscillator.chain(this.envelope, this.output);\n\tthis._readOnly([\"oscillator\", \"frequency\", \"detune\", \"envelope\"]);\n};\n\nTone.extend(Tone.Synth, Tone.Monophonic);\n\n/**\n * @const\n * @static\n * @type {Object}\n */\nTone.Synth.defaults = {\n\t\"oscillator\" : {\n\t\t\"type\" : \"triangle\"\n\t},\n\t\"envelope\" : {\n\t\t\"attack\" : 0.005,\n\t\t\"decay\" : 0.1,\n\t\t\"sustain\" : 0.3,\n\t\t\"release\" : 1\n\t}\n};\n\n/**\n * start the attack portion of the envelope\n * @param {Time} [time=now] the time the attack should start\n * @param {number} [velocity=1] the velocity of the note (0-1)\n * @returns {Tone.Synth} this\n * @private\n */\nTone.Synth.prototype._triggerEnvelopeAttack = function(time, velocity){\n\t//the envelopes\n\tthis.envelope.triggerAttack(time, velocity);\n\tthis.oscillator.start(time);\n\t//if there is no release portion, stop the oscillator\n\tif (this.envelope.sustain === 0){\n\t\tthis.oscillator.stop(time + this.toSeconds(this.envelope.attack) + this.toSeconds(this.envelope.decay));\n\t}\n\treturn this;\n};\n\n/**\n * start the release portion of the envelope\n * @param {Time} [time=now] the time the release should start\n * @returns {Tone.Synth} this\n * @private\n */\nTone.Synth.prototype._triggerEnvelopeRelease = function(time){\n\ttime = this.toSeconds(time);\n\tthis.envelope.triggerRelease(time);\n\tthis.oscillator.stop(time + this.toSeconds(this.envelope.release));\n\treturn this;\n};\n\n/**\n * clean up\n * @returns {Tone.Synth} this\n */\nTone.Synth.prototype.dispose = function(){\n\tTone.Monophonic.prototype.dispose.call(this);\n\tthis._writable([\"oscillator\", \"frequency\", \"detune\", \"envelope\"]);\n\tthis.oscillator.dispose();\n\tthis.oscillator = null;\n\tthis.envelope.dispose();\n\tthis.envelope = null;\n\tthis.frequency = null;\n\tthis.detune = null;\n\treturn this;\n};\n\nexport default Tone.Synth;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../core/Buffer\";\nimport \"../source/BufferSource\";\n\n/**\n * @class Tone.Noise is a noise generator. It uses looped noise buffers to save on performance.\n * Tone.Noise supports the noise types: \"pink\", \"white\", and \"brown\". Read more about\n * colors of noise on [Wikipedia](https://en.wikipedia.org/wiki/Colors_of_noise).\n *\n * @constructor\n * @extends {Tone.Source}\n * @param {string} type the noise type (white|pink|brown)\n * @example\n * //initialize the noise and start\n * var noise = new Tone.Noise(\"pink\").start();\n *\n * //make an autofilter to shape the noise\n * var autoFilter = new Tone.AutoFilter({\n * \t\"frequency\" : \"8m\",\n * \t\"min\" : 800,\n * \t\"max\" : 15000\n * }).connect(Tone.Master);\n *\n * //connect the noise\n * noise.connect(autoFilter);\n * //start the autofilter LFO\n * autoFilter.start()\n */\nTone.Noise = function(){\n\n\tvar options = Tone.defaults(arguments, [\"type\"], Tone.Noise);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * @private\n\t * @type {AudioBufferSourceNode}\n\t */\n\tthis._source = null;\n\n\t/**\n\t * the buffer\n\t * @private\n\t * @type {AudioBuffer}\n\t */\n\tthis._type = options.type;\n\n\t/**\n\t * The playback rate of the noise. Affects\n\t * the \"frequency\" of the noise.\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis._playbackRate = options.playbackRate;\n};\n\nTone.extend(Tone.Noise, Tone.Source);\n\n/**\n * the default parameters\n *\n * @static\n * @const\n * @type {Object}\n */\nTone.Noise.defaults = {\n\t\"type\" : \"white\",\n\t\"playbackRate\" : 1\n};\n\n/**\n * The type of the noise. Can be \"white\", \"brown\", or \"pink\".\n * @memberOf Tone.Noise#\n * @type {string}\n * @name type\n * @example\n * noise.type = \"white\";\n */\nObject.defineProperty(Tone.Noise.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._type;\n\t},\n\tset : function(type){\n\t\tif (this._type !== type){\n\t\t\tif (type in _noiseBuffers){\n\t\t\t\tthis._type = type;\n\t\t\t\t//if it's playing, stop and restart it\n\t\t\t\tif (this.state === Tone.State.Started){\n\t\t\t\t\tvar now = this.now();\n\t\t\t\t\tthis._stop(now);\n\t\t\t\t\tthis._start(now);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new TypeError(\"Tone.Noise: invalid type: \"+type);\n\t\t\t}\n\t\t}\n\t}\n});\n\n/**\n * The playback rate of the noise. Affects\n * the \"frequency\" of the noise.\n * @type {Positive}\n * @signal\n */\nObject.defineProperty(Tone.Noise.prototype, \"playbackRate\", {\n\tget : function(){\n\t\treturn this._playbackRate;\n\t},\n\tset : function(rate){\n\t\tthis._playbackRate = rate;\n\t\tif (this._source){\n\t\t\tthis._source.playbackRate.value = rate;\n\t\t}\n\t}\n});\n\n/**\n * internal start method\n *\n * @param {Time} time\n * @private\n */\nTone.Noise.prototype._start = function(time){\n\tvar buffer = _noiseBuffers[this._type];\n\tthis._source = new Tone.BufferSource(buffer).connect(this.output);\n\tthis._source.loop = true;\n\tthis._source.playbackRate.value = this._playbackRate;\n\tthis._source.start(this.toSeconds(time), Math.random() * (buffer.duration - 0.001));\n};\n\n/**\n * internal stop method\n *\n * @param {Time} time\n * @private\n */\nTone.Noise.prototype._stop = function(time){\n\tif (this._source){\n\t\tthis._source.stop(this.toSeconds(time));\n\t\tthis._source = null;\n\t}\n};\n\n/**\n * Restarts the noise.\n * @param {Time} time When to restart the noise.\n * @return {Tone.Noise} this\n */\nTone.Noise.prototype.restart = function(time){\n\t//TODO could be optimized by cancelling the buffer source 'stop'\n\t//stop and restart\n\tthis._stop(time);\n\tthis._start(time);\n\treturn this;\n};\n\n/**\n * Clean up.\n * @returns {Tone.Noise} this\n */\nTone.Noise.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tif (this._source !== null){\n\t\tthis._source.disconnect();\n\t\tthis._source = null;\n\t}\n\tthis._buffer = null;\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////\n// THE BUFFERS\n///////////////////////////////////////////////////////////////////////////\n\n//Noise buffer stats\nvar bufferLength = 44100 * 5;\nvar channels = 2;\n\n/**\n *\tThe noise arrays. Generated on initialization.\n * borrowed heavily from https://github.com/zacharydenton/noise.js\n * (c) 2013 Zach Denton (MIT)\n * @static\n * @private\n * @type {Array}\n */\nvar _noiseBuffers = {};\nvar _noiseCache = {};\n\nObject.defineProperty(_noiseBuffers, \"pink\", {\n\tget : function(){\n\t\tif (!_noiseCache.pink){\n\t\t\tvar buffer = [];\n\t\t\tfor (var channelNum = 0; channelNum < channels; channelNum++){\n\t\t\t\tvar channel = new Float32Array(bufferLength);\n\t\t\t\tbuffer[channelNum] = channel;\n\t\t\t\tvar b0, b1, b2, b3, b4, b5, b6;\n\t\t\t\tb0 = b1 = b2 = b3 = b4 = b5 = b6 = 0.0;\n\t\t\t\tfor (var i = 0; i < bufferLength; i++){\n\t\t\t\t\tvar white = Math.random() * 2 - 1;\n\t\t\t\t\tb0 = 0.99886 * b0 + white * 0.0555179;\n\t\t\t\t\tb1 = 0.99332 * b1 + white * 0.0750759;\n\t\t\t\t\tb2 = 0.96900 * b2 + white * 0.1538520;\n\t\t\t\t\tb3 = 0.86650 * b3 + white * 0.3104856;\n\t\t\t\t\tb4 = 0.55000 * b4 + white * 0.5329522;\n\t\t\t\t\tb5 = -0.7616 * b5 - white * 0.0168980;\n\t\t\t\t\tchannel[i] = b0 + b1 + b2 + b3 + b4 + b5 + b6 + white * 0.5362;\n\t\t\t\t\tchannel[i] *= 0.11; // (roughly) compensate for gain\n\t\t\t\t\tb6 = white * 0.115926;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_noiseCache.pink = new Tone.Buffer().fromArray(buffer);\n\t\t}\n\t\treturn _noiseCache.pink;\n\t}\n});\n\nObject.defineProperty(_noiseBuffers, \"brown\", {\n\tget : function(){\n\t\tif (!_noiseCache.brown){\n\t\t\tvar buffer = [];\n\t\t\tfor (var channelNum = 0; channelNum < channels; channelNum++){\n\t\t\t\tvar channel = new Float32Array(bufferLength);\n\t\t\t\tbuffer[channelNum] = channel;\n\t\t\t\tvar lastOut = 0.0;\n\t\t\t\tfor (var i = 0; i < bufferLength; i++){\n\t\t\t\t\tvar white = Math.random() * 2 - 1;\n\t\t\t\t\tchannel[i] = (lastOut + (0.02 * white)) / 1.02;\n\t\t\t\t\tlastOut = channel[i];\n\t\t\t\t\tchannel[i] *= 3.5; // (roughly) compensate for gain\n\t\t\t\t}\n\t\t\t}\n\t\t\t_noiseCache.brown = new Tone.Buffer().fromArray(buffer);\n\t\t}\n\t\treturn _noiseCache.brown;\n\t}\n});\n\nObject.defineProperty(_noiseBuffers, \"white\", {\n\tget : function(){\n\t\tif (!_noiseCache.white){\n\t\t\tvar buffer = [];\n\t\t\tfor (var channelNum = 0; channelNum < channels; channelNum++){\n\t\t\t\tvar channel = new Float32Array(bufferLength);\n\t\t\t\tbuffer[channelNum] = channel;\n\t\t\t\tfor (var i = 0; i < bufferLength; i++){\n\t\t\t\t\tchannel[i] = Math.random() * 2 - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_noiseCache.white = new Tone.Buffer().fromArray(buffer);\n\t\t}\n\t\treturn _noiseCache.white;\n\t}\n});\n\nexport default Tone.Noise;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Volume\";\nimport \"../core/Context\";\nimport \"../core/AudioNode\";\n\n/**\n * @class A single master output which is connected to the\n * AudioDestinationNode (aka your speakers).\n * It provides useful conveniences such as the ability\n * to set the volume and mute the entire application.\n * It also gives you the ability to apply master effects to your application.\n *
\n * Like Tone.Transport, A single Tone.Master is created\n * on initialization and you do not need to explicitly construct one.\n *\n * @constructor\n * @extends {Tone}\n * @singleton\n * @example\n * //the audio will go from the oscillator to the speakers\n * oscillator.connect(Tone.Master);\n * //a convenience for connecting to the master output is also provided:\n * oscillator.toMaster();\n * //the above two examples are equivalent.\n */\nTone.Master = function(){\n\n\tTone.AudioNode.call(this);\n\tTone.getContext(function(){\n\t\tthis.createInsOuts(1, 0);\n\n\t\t/**\n\t\t * The private volume node\n\t\t * @type {Tone.Volume}\n\t\t * @private\n\t\t */\n\t\tthis._volume = this.output = new Tone.Volume();\n\n\t\t/**\n\t\t * The volume of the master output.\n\t\t * @type {Decibels}\n\t\t * @signal\n\t\t */\n\t\tthis.volume = this._volume.volume;\n\n\t\tthis._readOnly(\"volume\");\n\t\t//connections\n\t\tTone.connectSeries(this.input, this.output, this.context.destination);\n\n\t\t//master is a singleton so it adds itself to the context\n\t\tthis.context.master = this;\n\t}.bind(this));\n};\n\nTone.extend(Tone.Master, Tone.AudioNode);\n\n/**\n * @type {Object}\n * @const\n */\nTone.Master.defaults = {\n\t\"volume\" : 0,\n\t\"mute\" : false\n};\n\n/**\n * Is an instanceof Tone.Master\n * @type {Boolean}\n */\nTone.Master.prototype.isMaster = true;\n\n/**\n * Mute the output.\n * @memberOf Tone.Master#\n * @type {boolean}\n * @name mute\n * @example\n * //mute the output\n * Tone.Master.mute = true;\n */\nObject.defineProperty(Tone.Master.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._volume.mute;\n\t},\n\tset : function(mute){\n\t\tthis._volume.mute = mute;\n\t}\n});\n\n/**\n * Add a master effects chain. NOTE: this will disconnect any nodes which were previously\n * chained in the master effects chain.\n * @param {...(AudioNode|Tone)} nodes All arguments will be connected in a row\n * and the Master will be routed through it.\n * @return {Tone.Master} this\n * @example\n * //some overall compression to keep the levels in check\n * var masterCompressor = new Tone.Compressor({\n * \t\"threshold\" : -6,\n * \t\"ratio\" : 3,\n * \t\"attack\" : 0.5,\n * \t\"release\" : 0.1\n * });\n * //give a little boost to the lows\n * var lowBump = new Tone.Filter(200, \"lowshelf\");\n * //route everything through the filter\n * //and compressor before going to the speakers\n * Tone.Master.chain(lowBump, masterCompressor);\n */\nTone.Master.prototype.chain = function(){\n\tthis.input.disconnect();\n\tvar args = Array.from(arguments);\n\targs.unshift(this.input);\n\targs.push(this.output);\n\tTone.connectSeries.apply(undefined, args);\n};\n\n/**\n * Clean up\n * @return {Tone.Master} this\n */\nTone.Master.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable(\"volume\");\n\tthis._volume.dispose();\n\tthis._volume = null;\n\tthis.volume = null;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tAUGMENT TONE's PROTOTYPE\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)\n * @returns {Tone.AudioNode} this\n * @example\n * //connect an oscillator to the master output\n * var osc = new Tone.Oscillator().toMaster();\n */\nTone.AudioNode.prototype.toMaster = function(){\n\tthis.connect(this.context.master);\n\treturn this;\n};\n\n/**\n * initialize the module and listen for new audio contexts\n * @private\n */\nvar MasterConstructor = Tone.Master;\nTone.Master = new MasterConstructor();\n\nTone.Context.on(\"init\", function(context){\n\t// if it already exists, just restore it\n\tif (context.master && context.master.isMaster){\n\t\tTone.Master = context.master;\n\t} else {\n\t\tTone.Master = new MasterConstructor();\n\t}\n});\n\nTone.Context.on(\"close\", function(context){\n\tif (context.master && context.master.isMaster){\n\t\tcontext.master.dispose();\n\t}\n});\n\nexport default Tone.Master;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/ScaledEnvelope\";\nimport \"../component/Envelope\";\n\n/**\n * @class Tone.FrequencyEnvelope is a Tone.ScaledEnvelope, but instead of `min` and `max`\n * it's got a `baseFrequency` and `octaves` parameter.\n *\n * @extends {Tone.Envelope}\n * @constructor\n * @param {Time|Object} [attack]\tthe attack time in seconds\n * @param {Time} [decay]\tthe decay time in seconds\n * @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n * @param {Time} [release]\tthe release time in seconds\n * @example\n * var freqEnv = new Tone.FrequencyEnvelope({\n * \t\"attack\" : 0.2,\n * \t\"baseFrequency\" : \"C2\",\n * \t\"octaves\" : 4\n * });\n * freqEnv.connect(oscillator.frequency);\n */\nTone.FrequencyEnvelope = function(){\n\n\tvar options = Tone.defaults(arguments, [\"attack\", \"decay\", \"sustain\", \"release\"], Tone.Envelope);\n\t//merge it with the frequency envelope defaults\n\toptions = Tone.defaultArg(options, Tone.FrequencyEnvelope.defaults);\n\tTone.ScaledEnvelope.call(this, options);\n\n\t/**\n\t * Stores the octave value\n\t * @type {Positive}\n\t * @private\n\t */\n\tthis._octaves = options.octaves;\n\n\t//setup\n\tthis.baseFrequency = options.baseFrequency;\n\tthis.octaves = options.octaves;\n\tthis.exponent = options.exponent;\n};\n\nTone.extend(Tone.FrequencyEnvelope, Tone.Envelope);\n\n/**\n * the default parameters\n * @static\n */\nTone.FrequencyEnvelope.defaults = {\n\t\"baseFrequency\" : 200,\n\t\"octaves\" : 4,\n\t\"exponent\" : 1\n};\n\n/**\n * The envelope's mininum output value. This is the value which it\n * starts at.\n * @memberOf Tone.FrequencyEnvelope#\n * @type {Frequency}\n * @name baseFrequency\n */\nObject.defineProperty(Tone.FrequencyEnvelope.prototype, \"baseFrequency\", {\n\tget : function(){\n\t\treturn this._scale.min;\n\t},\n\tset : function(min){\n\t\tthis._scale.min = this.toFrequency(min);\n\t\t//also update the octaves\n\t\tthis.octaves = this._octaves;\n\t}\n});\n\n/**\n * The number of octaves above the baseFrequency that the\n * envelope will scale to.\n * @memberOf Tone.FrequencyEnvelope#\n * @type {Positive}\n * @name octaves\n */\nObject.defineProperty(Tone.FrequencyEnvelope.prototype, \"octaves\", {\n\tget : function(){\n\t\treturn this._octaves;\n\t},\n\tset : function(octaves){\n\t\tthis._octaves = octaves;\n\t\tthis._scale.max = this.baseFrequency * Math.pow(2, octaves);\n\t}\n});\n\n/**\n * The envelope's exponent value.\n * @memberOf Tone.FrequencyEnvelope#\n * @type {number}\n * @name exponent\n */\nObject.defineProperty(Tone.FrequencyEnvelope.prototype, \"exponent\", {\n\tget : function(){\n\t\treturn this._exp.value;\n\t},\n\tset : function(exp){\n\t\tthis._exp.value = exp;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.FrequencyEnvelope} this\n */\nTone.FrequencyEnvelope.prototype.dispose = function(){\n\tTone.ScaledEnvelope.prototype.dispose.call(this);\n\treturn this;\n};\n\nexport default Tone.FrequencyEnvelope;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Scale\";\nimport \"../signal/Pow\";\n\n/**\n * @class Performs an exponential scaling on an input signal.\n * Scales a NormalRange value [0,1] exponentially\n * to the output range of outputMin to outputMax.\n *\n * @constructor\n * @extends {Tone.SignalBase}\n * @param {number} [outputMin=0] The output value when the input is 0.\n * @param {number} [outputMax=1]\tThe output value when the input is 1.\n * @param {number} [exponent=2] The exponent which scales the incoming signal.\n * @example\n * var scaleExp = new Tone.ScaleExp(0, 100, 2);\n * var signal = new Tone.Signal(0.5).connect(scaleExp);\n */\nTone.ScaleExp = function(outputMin, outputMax, exponent){\n\n\tTone.SignalBase.call(this);\n\n\t/**\n\t * scale the input to the output range\n\t * @type {Tone.Scale}\n\t * @private\n\t */\n\tthis._scale = this.output = new Tone.Scale(outputMin, outputMax);\n\n\t/**\n\t * @private\n\t * @type {Tone.Pow}\n\t * @private\n\t */\n\tthis._exp = this.input = new Tone.Pow(Tone.defaultArg(exponent, 2));\n\n\tthis._exp.connect(this._scale);\n};\n\nTone.extend(Tone.ScaleExp, Tone.SignalBase);\n\n/**\n * Instead of interpolating linearly between the min
and\n * max
values, setting the exponent will interpolate between\n * the two values with an exponential curve.\n * @memberOf Tone.ScaleExp#\n * @type {number}\n * @name exponent\n */\nObject.defineProperty(Tone.ScaleExp.prototype, \"exponent\", {\n\tget : function(){\n\t\treturn this._exp.value;\n\t},\n\tset : function(exp){\n\t\tthis._exp.value = exp;\n\t}\n});\n\n/**\n * The minimum output value. This number is output when\n * the value input value is 0.\n * @memberOf Tone.ScaleExp#\n * @type {number}\n * @name min\n */\nObject.defineProperty(Tone.ScaleExp.prototype, \"min\", {\n\tget : function(){\n\t\treturn this._scale.min;\n\t},\n\tset : function(min){\n\t\tthis._scale.min = min;\n\t}\n});\n\n/**\n * The maximum output value. This number is output when\n * the value input value is 1.\n * @memberOf Tone.ScaleExp#\n * @type {number}\n * @name max\n */\nObject.defineProperty(Tone.ScaleExp.prototype, \"max\", {\n\tget : function(){\n\t\treturn this._scale.max;\n\t},\n\tset : function(max){\n\t\tthis._scale.max = max;\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.ScaleExp} this\n */\nTone.ScaleExp.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._scale.dispose();\n\tthis._scale = null;\n\tthis._exp.dispose();\n\tthis._exp = null;\n\treturn this;\n};\n\nexport default Tone.ScaleExp;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Param\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Compressor is a thin wrapper around the Web Audio\n * [DynamicsCompressorNode](http://webaudio.github.io/web-audio-api/#the-dynamicscompressornode-interface).\n * Compression reduces the volume of loud sounds or amplifies quiet sounds\n * by narrowing or \"compressing\" an audio signal's dynamic range.\n * Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.\n * @param {Positive} [ratio] The gain reduction ratio.\n * @example\n * var comp = new Tone.Compressor(-30, 3);\n */\nTone.Compressor = function(){\n\n\tvar options = Tone.defaults(arguments, [\"threshold\", \"ratio\"], Tone.Compressor);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * the compressor node\n\t * @type {DynamicsCompressorNode}\n\t * @private\n\t */\n\tthis._compressor = this.input = this.output = this.context.createDynamicsCompressor();\n\n\t/**\n\t * the threshold vaue\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.threshold = new Tone.Param({\n\t\t\"param\" : this._compressor.threshold,\n\t\t\"units\" : Tone.Type.Decibels,\n\t\t\"convert\" : false\n\t});\n\n\t/**\n\t * The attack parameter\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.attack = new Tone.Param(this._compressor.attack, Tone.Type.Time);\n\n\t/**\n\t * The release parameter\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.release = new Tone.Param(this._compressor.release, Tone.Type.Time);\n\n\t/**\n\t * The knee parameter\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.knee = new Tone.Param({\n\t\t\"param\" : this._compressor.knee,\n\t\t\"units\" : Tone.Type.Decibels,\n\t\t\"convert\" : false\n\t});\n\n\t/**\n\t * The ratio value\n\t * @type {Number}\n\t * @signal\n\t */\n\tthis.ratio = new Tone.Param({\n\t\t\"param\" : this._compressor.ratio,\n\t\t\"convert\" : false\n\t});\n\n\t//set the defaults\n\tthis._readOnly([\"knee\", \"release\", \"attack\", \"ratio\", \"threshold\"]);\n\tthis.set(options);\n};\n\nTone.extend(Tone.Compressor, Tone.AudioNode);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.Compressor.defaults = {\n\t\"ratio\" : 12,\n\t\"threshold\" : -24,\n\t\"release\" : 0.25,\n\t\"attack\" : 0.003,\n\t\"knee\" : 30\n};\n\n/**\n * clean up\n * @returns {Tone.Compressor} this\n */\nTone.Compressor.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"knee\", \"release\", \"attack\", \"ratio\", \"threshold\"]);\n\tthis._compressor.disconnect();\n\tthis._compressor = null;\n\tthis.attack.dispose();\n\tthis.attack = null;\n\tthis.release.dispose();\n\tthis.release = null;\n\tthis.threshold.dispose();\n\tthis.threshold = null;\n\tthis.ratio.dispose();\n\tthis.ratio = null;\n\tthis.knee.dispose();\n\tthis.knee = null;\n\treturn this;\n};\n\nexport default Tone.Compressor;\n\n","import Tone from \"../core/Tone\";\nimport \"../shim/OfflineAudioContext\";\n\nif (Tone.supported){\n\tif (!Tone.global.hasOwnProperty(\"AudioContext\") && Tone.global.hasOwnProperty(\"webkitAudioContext\")){\n\t\tTone.global.AudioContext = Tone.global.webkitAudioContext;\n\t}\n\n\t//not functionally equivalent, but only an API placeholder\n\tif (!AudioContext.prototype.close){\n\t\tAudioContext.prototype.close = function(){\n\t\t\tif (Tone.isFunction(this.suspend)){\n\t\t\t\tthis.suspend();\n\t\t\t}\n\t\t\treturn Promise.resolve();\n\t\t};\n\t}\n\n\t//not functionally equivalent\n\tif (!AudioContext.prototype.resume){\n\t\tAudioContext.prototype.resume = function(){\n\t\t\t//play some silent audio to jumpstart the context\n\t\t\tvar buffer = this.createBuffer(1, 1, this.sampleRate);\n\t\t\tvar source = this.createBufferSource();\n\t\t\tsource.buffer = buffer;\n\t\t\tsource.connect(this.destination);\n\t\t\tsource.start(0);\n\t\t\treturn Promise.resolve();\n\t\t};\n\t}\n\n\t//createGain\n\tif (!AudioContext.prototype.createGain && AudioContext.prototype.createGainNode){\n\t\tAudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\n\t}\n\n\t//createDelay\n\tif (!AudioContext.prototype.createDelay && AudioContext.prototype.createDelayNode){\n\t\tAudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\n\t}\n\n\t//test decodeAudioData returns a promise\n\t// https://github.com/mohayonao/web-audio-api-shim/blob/master/src/AudioContext.js\n\t// MIT License (c) 2015 @mohayonao\n\tvar decodeAudioDataPromise = false;\n\tvar offlineContext = new OfflineAudioContext(1, 1, 44100);\n\tvar audioData = new Uint32Array([1179011410, 48, 1163280727, 544501094, 16, 131073, 44100, 176400, 1048580, 1635017060, 8, 0, 0, 0, 0]).buffer;\n\ttry {\n\t\tvar ret = offlineContext.decodeAudioData(audioData);\n\t\tif (ret && Tone.isFunction(ret.then)){\n\t\t\tdecodeAudioDataPromise = true;\n\t\t}\n\t} catch (e){\n\t\tdecodeAudioDataPromise = false;\n\t}\n\n\tif (!decodeAudioDataPromise){\n\t\tAudioContext.prototype._native_decodeAudioData = AudioContext.prototype.decodeAudioData;\n\t\tAudioContext.prototype.decodeAudioData = function(audioData){\n\t\t\treturn new Promise(function(success, error){\n\t\t\t\tthis._native_decodeAudioData(audioData, success, error);\n\t\t\t}.bind(this));\n\t\t};\n\t}\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Time\";\n\n/**\n * @class Tone.TransportTime is a the time along the Transport's\n * timeline. It is similar to Tone.Time, but instead of evaluating\n * against the AudioContext's clock, it is evaluated against\n * the Transport's position. See [TransportTime wiki](https://github.com/Tonejs/Tone.js/wiki/TransportTime).\n * @constructor\n * @param {Time} val The time value as a number or string\n * @param {String=} units Unit values\n * @extends {Tone.Time}\n */\nTone.TransportTime = function(val, units){\n\tif (this instanceof Tone.TransportTime){\n\n\t\tTone.Time.call(this, val, units);\n\n\t} else {\n\t\treturn new Tone.TransportTime(val, units);\n\t}\n};\n\nTone.extend(Tone.TransportTime, Tone.Time);\n\n/**\n * Return the current time in whichever context is relevant\n * @type {Number}\n * @private\n */\nTone.TransportTime.prototype._now = function(){\n\treturn Tone.Transport.seconds;\n};\n\nexport default Tone.TransportTime;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/TimeBase\";\n\n/**\n * @class Tone.Frequency is a primitive type for encoding Frequency values.\n * Eventually all time values are evaluated to hertz\n * using the `eval` method.\n * @constructor\n * @extends {Tone.TimeBase}\n * @param {String|Number} val The time value.\n * @param {String=} units The units of the value.\n * @example\n * Tone.Frequency(\"C3\") // 261\n * Tone.Frequency(38, \"midi\") //\n * Tone.Frequency(\"C3\").transpose(4);\n */\nTone.Frequency = function(val, units){\n\tif (this instanceof Tone.Frequency){\n\n\t\tTone.TimeBase.call(this, val, units);\n\n\t} else {\n\t\treturn new Tone.Frequency(val, units);\n\t}\n};\n\nTone.extend(Tone.Frequency, Tone.TimeBase);\n\n///////////////////////////////////////////////////////////////////////////\n//\tAUGMENT BASE EXPRESSIONS\n///////////////////////////////////////////////////////////////////////////\n\nTone.Frequency.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t\"midi\" : {\n\t\tregexp : /^(\\d+(?:\\.\\d+)?midi)/,\n\t\tmethod : function(value){\n\t\t\tif (this._defaultUnits === \"midi\"){\n\t\t\t\treturn value;\n\t\t\t} else {\n\t\t\t\treturn Tone.Frequency.mtof(value);\n\t\t\t}\n\t\t}\n\t},\n\t\"note\" : {\n\t\tregexp : /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,\n\t\tmethod : function(pitch, octave){\n\t\t\tvar index = noteToScaleIndex[pitch.toLowerCase()];\n\t\t\tvar noteNumber = index + (parseInt(octave) + 1) * 12;\n\t\t\tif (this._defaultUnits === \"midi\"){\n\t\t\t\treturn noteNumber;\n\t\t\t} else {\n\t\t\t\treturn Tone.Frequency.mtof(noteNumber);\n\t\t\t}\n\t\t}\n\t},\n\t\"tr\" : {\n\t\tregexp : /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?/,\n\t\tmethod : function(m, q, s){\n\t\t\tvar total = 1;\n\t\t\tif (m && m !== \"0\"){\n\t\t\t\ttotal *= this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t\t\t}\n\t\t\tif (q && q !== \"0\"){\n\t\t\t\ttotal *= this._beatsToUnits(parseFloat(q));\n\t\t\t}\n\t\t\tif (s && s !== \"0\"){\n\t\t\t\ttotal *= this._beatsToUnits(parseFloat(s) / 4);\n\t\t\t}\n\t\t\treturn total;\n\t\t}\n\t}\n});\n\n///////////////////////////////////////////////////////////////////////////\n//\tEXPRESSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Transposes the frequency by the given number of semitones.\n * @param {Interval} interval\n * @return {Tone.Frequency} A new transposed frequency\n * @example\n * Tone.Frequency(\"A4\").transpose(3); //\"C5\"\n */\nTone.Frequency.prototype.transpose = function(interval){\n\treturn new this.constructor(this.valueOf() * Tone.intervalToFrequencyRatio(interval));\n};\n\n/**\n * Takes an array of semitone intervals and returns\n * an array of frequencies transposed by those intervals.\n * @param {Array} intervals\n * @return {Array} Returns an array of Frequencies\n * @example\n * Tone.Frequency(\"A4\").harmonize([0, 3, 7]); //[\"A4\", \"C5\", \"E5\"]\n */\nTone.Frequency.prototype.harmonize = function(intervals){\n\treturn intervals.map(function(interval){\n\t\treturn this.transpose(interval);\n\t}.bind(this));\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tUNIT CONVERSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Return the value of the frequency as a MIDI note\n * @return {MIDI}\n * @example\n * Tone.Frequency(\"C4\").toMidi(); //60\n */\nTone.Frequency.prototype.toMidi = function(){\n\treturn Tone.Frequency.ftom(this.valueOf());\n};\n\n/**\n * Return the value of the frequency in Scientific Pitch Notation\n * @return {Note}\n * @example\n * Tone.Frequency(69, \"midi\").toNote(); //\"A4\"\n */\nTone.Frequency.prototype.toNote = function(){\n\tvar freq = this.toFrequency();\n\tvar log = Math.log2(freq / Tone.Frequency.A4);\n\tvar noteNumber = Math.round(12 * log) + 57;\n\tvar octave = Math.floor(noteNumber/12);\n\tif (octave < 0){\n\t\tnoteNumber += -12 * octave;\n\t}\n\tvar noteName = scaleIndexToNote[noteNumber % 12];\n\treturn noteName + octave.toString();\n};\n\n/**\n * Return the duration of one cycle in seconds.\n * @return {Seconds}\n */\nTone.Frequency.prototype.toSeconds = function(){\n\treturn 1 / Tone.TimeBase.prototype.toSeconds.call(this);\n};\n\n/**\n * Return the value in Hertz\n * @return {Frequency}\n */\nTone.Frequency.prototype.toFrequency = function(){\n\treturn Tone.TimeBase.prototype.toFrequency.call(this);\n};\n\n/**\n * Return the duration of one cycle in ticks\n * @return {Ticks}\n */\nTone.Frequency.prototype.toTicks = function(){\n\tvar quarterTime = this._beatsToUnits(1);\n\tvar quarters = this.valueOf() / quarterTime;\n\treturn Math.floor(quarters * Tone.Transport.PPQ);\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tUNIT CONVERSIONS HELPERS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * With no arguments, return 0\n * @return {Number}\n * @private\n */\nTone.Frequency.prototype._noArg = function(){\n\treturn 0;\n};\n\n/**\n * Returns the value of a frequency in the current units\n * @param {Frequency} freq\n * @return {Number}\n * @private\n */\nTone.Frequency.prototype._frequencyToUnits = function(freq){\n\treturn freq;\n};\n\n/**\n * Returns the value of a tick in the current time units\n * @param {Ticks} ticks\n * @return {Number}\n * @private\n */\nTone.Frequency.prototype._ticksToUnits = function(ticks){\n\treturn 1 / ((ticks * 60) / (Tone.Transport.bpm.value * Tone.Transport.PPQ));\n};\n\n/**\n * Return the value of the beats in the current units\n * @param {Number} beats\n * @return {Number}\n * @private\n */\nTone.Frequency.prototype._beatsToUnits = function(beats){\n\treturn 1 / Tone.TimeBase.prototype._beatsToUnits.call(this, beats);\n};\n\n/**\n * Returns the value of a second in the current units\n * @param {Seconds} seconds\n * @return {Number}\n * @private\n */\nTone.Frequency.prototype._secondsToUnits = function(seconds){\n\treturn 1 / seconds;\n};\n\n/**\n * The default units if none are given.\n * @private\n */\nTone.Frequency.prototype._defaultUnits = \"hz\";\n\n///////////////////////////////////////////////////////////////////////////\n//\tFREQUENCY CONVERSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Note to scale index\n * @type {Object}\n * @private\n */\nvar noteToScaleIndex = {\n\t\"cbb\" : -2, \"cb\" : -1, \"c\" : 0, \"c#\" : 1, \"cx\" : 2,\n\t\"dbb\" : 0, \"db\" : 1, \"d\" : 2, \"d#\" : 3, \"dx\" : 4,\n\t\"ebb\" : 2, \"eb\" : 3, \"e\" : 4, \"e#\" : 5, \"ex\" : 6,\n\t\"fbb\" : 3, \"fb\" : 4, \"f\" : 5, \"f#\" : 6, \"fx\" : 7,\n\t\"gbb\" : 5, \"gb\" : 6, \"g\" : 7, \"g#\" : 8, \"gx\" : 9,\n\t\"abb\" : 7, \"ab\" : 8, \"a\" : 9, \"a#\" : 10, \"ax\" : 11,\n\t\"bbb\" : 9, \"bb\" : 10, \"b\" : 11, \"b#\" : 12, \"bx\" : 13,\n};\n\n/**\n * scale index to note (sharps)\n * @type {Array}\n * @private\n */\nvar scaleIndexToNote = [\"C\", \"C#\", \"D\", \"D#\", \"E\", \"F\", \"F#\", \"G\", \"G#\", \"A\", \"A#\", \"B\"];\n\n/**\n * The [concert pitch](https://en.wikipedia.org/wiki/Concert_pitch)\n * A4's values in Hertz.\n * @type {Frequency}\n * @static\n */\nTone.Frequency.A4 = 440;\n\n/**\n * Convert a MIDI note to frequency value.\n * @param {MIDI} midi The midi number to convert.\n * @return {Frequency} the corresponding frequency value\n * @static\n * @example\n * Tone.Frequency.mtof(69); // returns 440\n */\nTone.Frequency.mtof = function(midi){\n\treturn Tone.Frequency.A4 * Math.pow(2, (midi - 69) / 12);\n};\n\n/**\n * Convert a frequency value to a MIDI note.\n * @param {Frequency} frequency The value to frequency value to convert.\n * @returns {MIDI}\n * @static\n * @example\n * Tone.Frequency.ftom(440); // returns 69\n */\nTone.Frequency.ftom = function(frequency){\n\treturn 69 + Math.round(12 * Math.log2(frequency / Tone.Frequency.A4));\n};\n\nexport default Tone.Frequency;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../signal/Pow\";\nimport \"../type/Type\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Envelope is an [ADSR](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope)\n * envelope generator. Tone.Envelope outputs a signal which\n * can be connected to an AudioParam or Tone.Signal.\n *
\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Time} [attack] The amount of time it takes for the envelope to go from\n * 0 to it's maximum value.\n * @param {Time} [decay]\tThe period of time after the attack that it takes for the envelope\n * \tto fall to the sustain value. Value must be greater than 0.\n * @param {NormalRange} [sustain]\tThe percent of the maximum value that the envelope rests at until\n * \tthe release is triggered.\n * @param {Time} [release]\tThe amount of time after the release is triggered it takes to reach 0.\n * \tValue must be greater than 0.\n * @example\n * //an amplitude envelope\n * var gainNode = Tone.context.createGain();\n * var env = new Tone.Envelope({\n * \t\"attack\" : 0.1,\n * \t\"decay\" : 0.2,\n * \t\"sustain\" : 1,\n * \t\"release\" : 0.8,\n * });\n * env.connect(gainNode.gain);\n */\nTone.Envelope = function(){\n\n\t//get all of the defaults\n\tvar options = Tone.defaults(arguments, [\"attack\", \"decay\", \"sustain\", \"release\"], Tone.Envelope);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * When triggerAttack is called, the attack time is the amount of\n\t * time it takes for the envelope to reach it's maximum value.\n\t * @type {Time}\n\t */\n\tthis.attack = options.attack;\n\n\t/**\n\t * After the attack portion of the envelope, the value will fall\n\t * over the duration of the decay time to it's sustain value.\n\t * @type {Time}\n\t */\n\tthis.decay = options.decay;\n\n\t/**\n\t * \tThe sustain value is the value\n\t * \twhich the envelope rests at after triggerAttack is\n\t * \tcalled, but before triggerRelease is invoked.\n\t * @type {NormalRange}\n\t */\n\tthis.sustain = options.sustain;\n\n\t/**\n\t * After triggerRelease is called, the envelope's\n\t * value will fall to it's miminum value over the\n\t * duration of the release time.\n\t * @type {Time}\n\t */\n\tthis.release = options.release;\n\n\t/**\n\t * the next time the envelope is at standby\n\t * @type {number}\n\t * @private\n\t */\n\tthis._attackCurve = \"linear\";\n\n\t/**\n\t * the next time the envelope is at standby\n\t * @type {number}\n\t * @private\n\t */\n\tthis._releaseCurve = \"exponential\";\n\n\t/**\n\t * the signal\n\t * @type {Tone.Signal}\n\t * @private\n\t */\n\tthis._sig = this.output = new Tone.Signal(0);\n\n\t//set the attackCurve initially\n\tthis.attackCurve = options.attackCurve;\n\tthis.releaseCurve = options.releaseCurve;\n\tthis.decayCurve = options.decayCurve;\n};\n\nTone.extend(Tone.Envelope, Tone.AudioNode);\n\n/**\n * the default parameters\n * @static\n * @const\n */\nTone.Envelope.defaults = {\n\t\"attack\" : 0.01,\n\t\"decay\" : 0.1,\n\t\"sustain\" : 0.5,\n\t\"release\" : 1,\n\t\"attackCurve\" : \"linear\",\n\t\"decayCurve\" : \"exponential\",\n\t\"releaseCurve\" : \"exponential\",\n};\n\n/**\n * Read the current value of the envelope. Useful for\n * syncronizing visual output to the envelope.\n * @memberOf Tone.Envelope#\n * @type {Number}\n * @name value\n * @readOnly\n */\nObject.defineProperty(Tone.Envelope.prototype, \"value\", {\n\tget : function(){\n\t\treturn this.getValueAtTime(this.now());\n\t}\n});\n\n/**\n * Get the curve\n * @param {Array|String} curve\n * @param {String} direction In/Out\n * @return {String} The curve name\n * @private\n */\nTone.Envelope.prototype._getCurve = function(curve, direction){\n\tif (Tone.isString(curve)){\n\t\treturn curve;\n\t} else if (Tone.isArray(curve)){\n\t\t//look up the name in the curves array\n\t\tfor (var t in Tone.Envelope.Type){\n\t\t\tif (Tone.Envelope.Type[t][direction] === curve){\n\t\t\t\treturn t;\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * Assign a the curve to the given name using the direction\n * @param {String} name\n * @param {String} direction In/Out\n * @param {Array} curve\n * @private\n */\nTone.Envelope.prototype._setCurve = function(name, direction, curve){\n\t//check if it's a valid type\n\tif (Tone.Envelope.Type.hasOwnProperty(curve)){\n\t\tvar curveDef = Tone.Envelope.Type[curve];\n\t\tif (Tone.isObject(curveDef)){\n\t\t\tthis[name] = curveDef[direction];\n\t\t} else {\n\t\t\tthis[name] = curveDef;\n\t\t}\n\t} else if (Tone.isArray(curve)){\n\t\tthis[name] = curve;\n\t} else {\n\t\tthrow new Error(\"Tone.Envelope: invalid curve: \" + curve);\n\t}\n};\n\n/**\n * The shape of the attack.\n * Can be any of these strings:\n * \n * - linear
\n * - exponential
\n * - sine
\n * - cosine
\n * - bounce
\n * - ripple
\n * - step
\n *
\n * Can also be an array which describes the curve. Values\n * in the array are evenly subdivided and linearly\n * interpolated over the duration of the attack.\n * @memberOf Tone.Envelope#\n * @type {String|Array}\n * @name attackCurve\n * @example\n * env.attackCurve = \"linear\";\n * @example\n * //can also be an array\n * env.attackCurve = [0, 0.2, 0.3, 0.4, 1]\n */\nObject.defineProperty(Tone.Envelope.prototype, \"attackCurve\", {\n\tget : function(){\n\t\treturn this._getCurve(this._attackCurve, \"In\");\n\t},\n\tset : function(curve){\n\t\tthis._setCurve(\"_attackCurve\", \"In\", curve);\n\t}\n});\n\n/**\n * The shape of the release. See the attack curve types.\n * @memberOf Tone.Envelope#\n * @type {String|Array}\n * @name releaseCurve\n * @example\n * env.releaseCurve = \"linear\";\n */\nObject.defineProperty(Tone.Envelope.prototype, \"releaseCurve\", {\n\tget : function(){\n\t\treturn this._getCurve(this._releaseCurve, \"Out\");\n\t},\n\tset : function(curve){\n\t\tthis._setCurve(\"_releaseCurve\", \"Out\", curve);\n\t}\n});\n\n/**\n * The shape of the decay either \"linear\" or \"exponential\"\n * @memberOf Tone.Envelope#\n * @type {String}\n * @name decayCurve\n * @example\n * env.decayCurve = \"linear\";\n */\nObject.defineProperty(Tone.Envelope.prototype, \"decayCurve\", {\n\tget : function(){\n\t\treturn this._decayCurve;\n\t},\n\tset : function(curve){\n\t\tvar curves = [\"linear\", \"exponential\"];\n\t\tif (!curves.includes(curve)){\n\t\t\tthrow new Error(\"Tone.Envelope: invalid curve: \" + curve);\n\t\t} else {\n\t\t\tthis._decayCurve = curve;\n\t\t}\n\t}\n});\n\n/**\n * Trigger the attack/decay portion of the ADSR envelope.\n * @param {Time} [time=now] When the attack should start.\n * @param {NormalRange} [velocity=1] The velocity of the envelope scales the vales.\n * number between 0-1\n * @returns {Tone.Envelope} this\n * @example\n * //trigger the attack 0.5 seconds from now with a velocity of 0.2\n * env.triggerAttack(\"+0.5\", 0.2);\n */\nTone.Envelope.prototype.triggerAttack = function(time, velocity){\n\tthis.log(\"triggerAttack\", time, velocity);\n\ttime = this.toSeconds(time);\n\tvar originalAttack = this.toSeconds(this.attack);\n\tvar attack = originalAttack;\n\tvar decay = this.toSeconds(this.decay);\n\tvelocity = Tone.defaultArg(velocity, 1);\n\t//check if it's not a complete attack\n\tvar currentValue = this.getValueAtTime(time);\n\tif (currentValue > 0){\n\t\t//subtract the current value from the attack time\n\t\tvar attackRate = 1 / attack;\n\t\tvar remainingDistance = 1 - currentValue;\n\t\t//the attack is now the remaining time\n\t\tattack = remainingDistance / attackRate;\n\t}\n\t//attack\n\tif (attack === 0){\n\t\t//case where the attack time is 0 should set instantly\n\t\tthis._sig.setValueAtTime(velocity, time);\n\t} else if (this._attackCurve === \"linear\"){\n\t\tthis._sig.linearRampTo(velocity, attack, time);\n\t} else if (this._attackCurve === \"exponential\"){\n\t\tthis._sig.targetRampTo(velocity, attack, time);\n\t} else if (attack > 0){\n\t\tthis._sig.cancelAndHoldAtTime(time);\n\t\tvar curve = this._attackCurve;\n\t\t//find the starting position in the curve\n\t\tfor (var i = 1; i < curve.length; i++){\n\t\t\t//the starting index is between the two values\n\t\t\tif (curve[i-1] <= currentValue && currentValue <= curve[i]){\n\t\t\t\tcurve = this._attackCurve.slice(i);\n\t\t\t\t//the first index is the current value\n\t\t\t\tcurve[0] = currentValue;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tthis._sig.setValueCurveAtTime(curve, time, attack, velocity);\n\t}\n\t//decay\n\tif (decay){\n\t\tvar decayValue = velocity * this.sustain;\n\t\tvar decayStart = time + attack;\n\t\tthis.log(\"decay\", decayStart);\n\t\tif (this._decayCurve === \"linear\"){\n\t\t\tthis._sig.linearRampTo(decayValue, decay, decayStart+this.sampleTime);\n\t\t} else if (this._decayCurve === \"exponential\"){\n\t\t\tthis._sig.exponentialApproachValueAtTime(decayValue, decayStart, decay);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Triggers the release of the envelope.\n * @param {Time} [time=now] When the release portion of the envelope should start.\n * @returns {Tone.Envelope} this\n * @example\n * //trigger release immediately\n * env.triggerRelease();\n */\nTone.Envelope.prototype.triggerRelease = function(time){\n\tthis.log(\"triggerRelease\", time);\n\ttime = this.toSeconds(time);\n\tvar currentValue = this.getValueAtTime(time);\n\tif (currentValue > 0){\n\t\tvar release = this.toSeconds(this.release);\n\t\tif (this._releaseCurve === \"linear\"){\n\t\t\tthis._sig.linearRampTo(0, release, time);\n\t\t} else if (this._releaseCurve === \"exponential\"){\n\t\t\tthis._sig.targetRampTo(0, release, time);\n\t\t} else {\n\t\t\tvar curve = this._releaseCurve;\n\t\t\tif (Tone.isArray(curve)){\n\t\t\t\tthis._sig.cancelAndHoldAtTime(time);\n\t\t\t\tthis._sig.setValueCurveAtTime(curve, time, release, currentValue);\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Get the scheduled value at the given time. This will\n * return the unconverted (raw) value.\n * @param {Number} time The time in seconds.\n * @return {Number} The scheduled value at the given time.\n */\nTone.Envelope.prototype.getValueAtTime = function(time){\n\treturn this._sig.getValueAtTime(time);\n};\n\n/**\n * triggerAttackRelease is shorthand for triggerAttack, then waiting\n * some duration, then triggerRelease.\n * @param {Time} duration The duration of the sustain.\n * @param {Time} [time=now] When the attack should be triggered.\n * @param {number} [velocity=1] The velocity of the envelope.\n * @returns {Tone.Envelope} this\n * @example\n * //trigger the attack and then the release after 0.6 seconds.\n * env.triggerAttackRelease(0.6);\n */\nTone.Envelope.prototype.triggerAttackRelease = function(duration, time, velocity){\n\ttime = this.toSeconds(time);\n\tthis.triggerAttack(time, velocity);\n\tthis.triggerRelease(time + this.toSeconds(duration));\n\treturn this;\n};\n\n/**\n * Cancels all scheduled envelope changes after the given time.\n * @param {Time} after\n * @returns {Tone.Envelope} this\n */\nTone.Envelope.prototype.cancel = function(after){\n\tthis._sig.cancelScheduledValues(after);\n\treturn this;\n};\n\n/**\n * Borrows the connect method from Tone.Signal.\n * @function\n * @private\n */\nTone.Envelope.prototype.connect = Tone.SignalBase.prototype.connect;\n\n/**\n \t * Generate some complex envelope curves.\n \t */\n(function _createCurves(){\n\n\tvar curveLen = 128;\n\n\tvar i, k;\n\n\t//cosine curve\n\tvar cosineCurve = [];\n\tfor (i = 0; i < curveLen; i++){\n\t\tcosineCurve[i] = Math.sin((i / (curveLen - 1)) * (Math.PI / 2));\n\t}\n\n\t//ripple curve\n\tvar rippleCurve = [];\n\tvar rippleCurveFreq = 6.4;\n\tfor (i = 0; i < curveLen - 1; i++){\n\t\tk = (i / (curveLen - 1));\n\t\tvar sineWave = Math.sin(k * (Math.PI * 2) * rippleCurveFreq - Math.PI / 2) + 1;\n\t\trippleCurve[i] = sineWave/10 + k * 0.83;\n\t}\n\trippleCurve[curveLen - 1] = 1;\n\n\t//stairs curve\n\tvar stairsCurve = [];\n\tvar steps = 5;\n\tfor (i = 0; i < curveLen; i++){\n\t\tstairsCurve[i] = Math.ceil((i / (curveLen - 1)) * steps) / steps;\n\t}\n\n\t//in-out easing curve\n\tvar sineCurve = [];\n\tfor (i = 0; i < curveLen; i++){\n\t\tk = i / (curveLen - 1);\n\t\tsineCurve[i] = 0.5 * (1 - Math.cos(Math.PI * k));\n\t}\n\n\t//a bounce curve\n\tvar bounceCurve = [];\n\tfor (i = 0; i < curveLen; i++){\n\t\tk = i / (curveLen - 1);\n\t\tvar freq = Math.pow(k, 3) * 4 + 0.2;\n\t\tvar val = Math.cos(freq * Math.PI * 2 * k);\n\t\tbounceCurve[i] = Math.abs(val * (1 - k));\n\t}\n\n\t/**\n\t * Invert a value curve to make it work for the release\n\t * @private\n\t */\n\tfunction invertCurve(curve){\n\t\tvar out = new Array(curve.length);\n\t\tfor (var j = 0; j < curve.length; j++){\n\t\t\tout[j] = 1 - curve[j];\n\t\t}\n\t\treturn out;\n\t}\n\n\t/**\n\t * reverse the curve\n\t * @private\n\t */\n\tfunction reverseCurve(curve){\n\t\treturn curve.slice(0).reverse();\n\t}\n\n\t/**\n\t * attack and release curve arrays\n\t * @type {Object}\n\t * @private\n\t */\n\tTone.Envelope.Type = {\n\t\t\"linear\" : \"linear\",\n\t\t\"exponential\" : \"exponential\",\n\t\t\"bounce\" : {\n\t\t\tIn : invertCurve(bounceCurve),\n\t\t\tOut : bounceCurve\n\t\t},\n\t\t\"cosine\" : {\n\t\t\tIn : cosineCurve,\n\t\t\tOut : reverseCurve(cosineCurve)\n\t\t},\n\t\t\"step\" : {\n\t\t\tIn : stairsCurve,\n\t\t\tOut : invertCurve(stairsCurve)\n\t\t},\n\t\t\"ripple\" : {\n\t\t\tIn : rippleCurve,\n\t\t\tOut : invertCurve(rippleCurve)\n\t\t},\n\t\t\"sine\" : {\n\t\t\tIn : sineCurve,\n\t\t\tOut : invertCurve(sineCurve)\n\t\t}\n\t};\n\n})();\n\n/**\n * Disconnect and dispose.\n * @returns {Tone.Envelope} this\n */\nTone.Envelope.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._sig.dispose();\n\tthis._sig = null;\n\tthis._attackCurve = null;\n\tthis._releaseCurve = null;\n\treturn this;\n};\n\nexport default Tone.Envelope;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\nimport \"../component/Merge\";\nimport \"../signal/Zero\";\nimport \"../component/Split\";\nimport \"../core/Gain\";\nimport \"../signal/Signal\";\nimport \"../core/Context\";\n\nif (Tone.supported && !Tone.global.AudioContext.prototype.createStereoPanner){\n\n\t/**\n\t * @class Shimmed StereoPannerNode\n\t * @param {AudioContext} context\n\t * @private\n\t */\n\tvar StereoPannerNode = function(context){\n\n\t\t/**\n\t\t * The audio context\n\t\t * @type {AudioContext}\n\t\t */\n\t\tthis.context = context;\n\n\t\t/**\n\t\t * The left/right panning. [-1, 1]\n\t\t * @type {AudioRange}\n\t\t * @signal\n\t\t */\n\t\tthis.pan = new Tone.Signal(0, Tone.Type.AudioRange);\n\n\t\t/**\n\t\t * Equal power scaling of the right gain\n\t\t * @type {Tone.WaveShaper}\n\t\t */\n\t\tvar rightWaveShaper = new Tone.WaveShaper(function(val){\n\t\t\treturn Tone.equalPowerScale((val+1)/2);\n\t\t}, 4096);\n\n\t\t/**\n\t\t * Equal power scaling of the left gain\n\t\t * @type {Tone.WaveShaper}\n\t\t * @private\n\t\t */\n\t\tvar leftWaveShaper = new Tone.WaveShaper(function(val){\n\t\t\treturn Tone.equalPowerScale(1 - (val+1)/2);\n\t\t}, 4096);\n\n\t\t/**\n\t\t * The left gain value\n\t\t * @type {Tone.Gain}\n\t\t * @private\n\t\t */\n\t\tvar leftGain = new Tone.Gain();\n\n\t\t/**\n\t\t * The right gain value\n\t\t * @type {Tone.Gain}\n\t\t * @private\n\t\t */\n\t\tvar rightGain = new Tone.Gain();\n\n\t\t/**\n\t\t * Split the incoming signal\n\t\t * @type {Tone.Split}\n\t\t * @private\n\t\t */\n\t\tvar split = this.input = new Tone.Split();\n\t\t//fixes safari issue with splitting audio\n\t\tsplit._splitter.channelCountMode = \"explicit\";\n\n\t\t/**\n\t\t * Keeps the waveshapers from optimizing 0s\n\t\t * @type {Tone.Zero}\n\t\t * @private\n\t\t */\n\t\tvar zero = new Tone.Zero();\n\t\tzero.fan(rightWaveShaper, leftWaveShaper);\n\n\t\t/**\n\t\t * Merge the outgoing signal\n\t\t * @type {Tone.Merge}\n\t\t * @private\n\t\t */\n\t\tvar merge = this.output = new Tone.Merge();\n\n\t\t//connections\n\t\tsplit.left.chain(leftGain, merge.left);\n\t\tsplit.right.chain(rightGain, merge.right);\n\t\tthis.pan.chain(leftWaveShaper, leftGain.gain);\n\t\tthis.pan.chain(rightWaveShaper, rightGain.gain);\n\t};\n\n\tStereoPannerNode.prototype.disconnect = function(){\n\t\tthis.output.disconnect.apply(this.output, arguments);\n\t};\n\n\tStereoPannerNode.prototype.connect = function(){\n\t\tthis.output.connect.apply(this.output, arguments);\n\t};\n\n\t//add it to the AudioContext\n\tAudioContext.prototype.createStereoPanner = function(){\n\t\treturn new StereoPannerNode(this);\n\t};\n\tTone.Context.prototype.createStereoPanner = function(){\n\t\treturn new StereoPannerNode(this);\n\t};\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../component/CrossFade\";\nimport \"../component/Merge\";\nimport \"../component/Split\";\nimport \"../shim/StereoPannerNode\";\nimport \"../signal/Signal\";\nimport \"../signal/AudioToGain\";\nimport \"../signal/Zero\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Panner is an equal power Left/Right Panner and does not\n * support 3D. Panner uses the StereoPannerNode when available.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {NormalRange} [initialPan=0] The initail panner value (center).\n * @example\n * //pan the input signal hard right.\n * var panner = new Tone.Panner(1);\n */\nTone.Panner = function(){\n\n\tvar options = Tone.defaults(arguments, [\"pan\"], Tone.Panner);\n\tTone.AudioNode.call(this);\n\t/**\n\t* the panner node\n\t* @type {StereoPannerNode}\n\t* @private\n\t*/\n\tthis._panner = this.input = this.output = this.context.createStereoPanner();\n\n\t/**\n\t* The pan control. -1 = hard left, 1 = hard right.\n\t* @type {AudioRange}\n\t* @signal\n\t*/\n\tthis.pan = this._panner.pan;\n\n\t//initial value\n\tthis.pan.value = options.pan;\n\tthis._readOnly(\"pan\");\n};\n\nTone.extend(Tone.Panner, Tone.AudioNode);\n\n/**\n * Defaults\n * @type {Object}\n * @const\n * @static\n */\nTone.Panner.defaults = {\n\t\"pan\" : 0\n};\n\n/**\n * Clean up.\n * @returns {Tone.Panner} this\n */\nTone.Panner.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable(\"pan\");\n\tthis._panner.disconnect();\n\tthis._panner = null;\n\tthis.pan = null;\n\treturn this;\n};\n\nexport default Tone.Panner;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../source/Oscillator\";\nimport \"../signal/Multiply\";\nimport \"../core/Gain\";\n\n/**\n * @class Tone.FMOscillator\n *\n * @extends {Tone.Source}\n * @constructor\n * @param {Frequency} frequency The starting frequency of the oscillator.\n * @param {String} type The type of the carrier oscillator.\n * @param {String} modulationType The type of the modulator oscillator.\n * @example\n * //a sine oscillator frequency-modulated by a square wave\n * var fmOsc = new Tone.FMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n */\nTone.FMOscillator = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\", \"modulationType\"], Tone.FMOscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * The carrier oscillator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._carrier = new Tone.Oscillator(options.frequency, options.type);\n\n\t/**\n\t * The oscillator's frequency\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The detune control signal.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = this._carrier.detune;\n\tthis.detune.value = options.detune;\n\n\t/**\n\t * The modulation index which is in essence the depth or amount of the modulation. In other terms it is the\n\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t * modulating signal (ma) -- as in ma/mf.\n\t *\t@type {Positive}\n\t *\t@signal\n\t */\n\tthis.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\tthis.modulationIndex.units = Tone.Type.Positive;\n\n\t/**\n\t * The modulating oscillator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\n\t/**\n\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t * Harmonicity = 2 means a change of an octave.\n\t * @type {Positive}\n\t * @signal\n\t * @example\n\t * //pitch the modulator an octave below carrier\n\t * synth.harmonicity.value = 0.5;\n\t */\n\tthis.harmonicity = new Tone.Multiply(options.harmonicity);\n\tthis.harmonicity.units = Tone.Type.Positive;\n\n\t/**\n\t * the node where the modulation happens\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._modulationNode = new Tone.Gain(0);\n\n\t//connections\n\tthis.frequency.connect(this._carrier.frequency);\n\tthis.frequency.chain(this.harmonicity, this._modulator.frequency);\n\tthis.frequency.chain(this.modulationIndex, this._modulationNode);\n\tthis._modulator.connect(this._modulationNode.gain);\n\tthis._modulationNode.connect(this._carrier.frequency);\n\tthis._carrier.connect(this.output);\n\tthis.detune.connect(this._modulator.detune);\n\n\tthis.phase = options.phase;\n\n\tthis._readOnly([\"modulationIndex\", \"frequency\", \"detune\", \"harmonicity\"]);\n};\n\nTone.extend(Tone.FMOscillator, Tone.Source);\n\n/**\n * default values\n * @static\n * @type {Object}\n * @const\n */\nTone.FMOscillator.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"phase\" : 0,\n\t\"type\" : \"sine\",\n\t\"modulationIndex\" : 2,\n\t\"modulationType\" : \"square\",\n\t\"harmonicity\" : 1\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now]\n * @private\n */\nTone.FMOscillator.prototype._start = function(time){\n\tthis._modulator.start(time);\n\tthis._carrier.start(time);\n};\n\n/**\n * stop the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.FMOscillator.prototype._stop = function(time){\n\tthis._modulator.stop(time);\n\tthis._carrier.stop(time);\n};\n\n/**\n * stop the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.FMOscillator.prototype.restart = function(time){\n\tthis._modulator.restart(time);\n\tthis._carrier.restart(time);\n};\n\n/**\n * The type of the carrier oscillator\n * @memberOf Tone.FMOscillator#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.FMOscillator.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._carrier.type;\n\t},\n\tset : function(type){\n\t\tthis._carrier.type = type;\n\t}\n});\n\n/**\n * The oscillator type without the partialsCount appended to the end\n * @memberOf Tone.FMOscillator#\n * @type {string}\n * @name baseType\n * @example\n * osc.type = 'sine2'\n * osc.baseType //'sine'\n * osc.partialCount = 2\n */\nObject.defineProperty(Tone.FMOscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn this._carrier.baseType;\n\t},\n\tset : function(baseType){\n\t\tthis._carrier.baseType = baseType;\n\t}\n});\n\n/**\n * 'partialCount' offers an alternative way to set the number of used partials. \n * When partialCount is 0, the maximum number of partials are used when representing\n * the waveform using the periodicWave. When 'partials' is set, this value is \n * not settable, but equals the length of the partials array.\n * @memberOf Tone.FMOscillator#\n * @type {Number}\n * @name partialCount\n */\nObject.defineProperty(Tone.FMOscillator.prototype, \"partialCount\", {\n\tget : function(){\n\t\treturn this._carrier.partialCount;\n\t},\n\tset : function(partialCount){\n\t\tthis._carrier.partialCount = partialCount;\n\t}\n});\n\n/**\n * The type of the modulator oscillator\n * @memberOf Tone.FMOscillator#\n * @type {String}\n * @name modulationType\n */\nObject.defineProperty(Tone.FMOscillator.prototype, \"modulationType\", {\n\tget : function(){\n\t\treturn this._modulator.type;\n\t},\n\tset : function(type){\n\t\tthis._modulator.type = type;\n\t}\n});\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.FMOscillator#\n * @type {number}\n * @name phase\n */\nObject.defineProperty(Tone.FMOscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._carrier.phase;\n\t},\n\tset : function(phase){\n\t\tthis._carrier.phase = phase;\n\t\tthis._modulator.phase = phase;\n\t}\n});\n\n/**\n * The partials of the carrier waveform. A partial represents\n * the amplitude at a harmonic. The first harmonic is the\n * fundamental frequency, the second is the octave and so on\n * following the harmonic series.\n * Setting this value will automatically set the type to \"custom\".\n * The value is an empty array when the type is not \"custom\".\n * @memberOf Tone.FMOscillator#\n * @type {Array}\n * @name partials\n * @example\n * osc.partials = [1, 0.2, 0.01];\n */\nObject.defineProperty(Tone.FMOscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn this._carrier.partials;\n\t},\n\tset : function(partials){\n\t\tthis._carrier.partials = partials;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.FMOscillator} this\n */\nTone.FMOscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis._writable([\"modulationIndex\", \"frequency\", \"detune\", \"harmonicity\"]);\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis.detune = null;\n\tthis.harmonicity.dispose();\n\tthis.harmonicity = null;\n\tthis._carrier.dispose();\n\tthis._carrier = null;\n\tthis._modulator.dispose();\n\tthis._modulator = null;\n\tthis._modulationNode.dispose();\n\tthis._modulationNode = null;\n\tthis.modulationIndex.dispose();\n\tthis.modulationIndex = null;\n\treturn this;\n};\n\nexport default Tone.FMOscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../source/Oscillator\";\nimport \"../signal/Signal\";\nimport \"../signal/WaveShaper\";\nimport \"../core/Gain\";\n\n/**\n * @class Tone.PulseOscillator is a pulse oscillator with control over pulse width,\n * also known as the duty cycle. At 50% duty cycle (width = 0.5) the wave is\n * a square and only odd-numbered harmonics are present. At all other widths\n * even-numbered harmonics are present. Read more\n * [here](https://wigglewave.wordpress.com/2014/08/16/pulse-waveforms-and-harmonics/).\n *\n * @constructor\n * @extends {Tone.Source}\n * @param {Frequency} [frequency] The frequency of the oscillator\n * @param {NormalRange} [width] The width of the pulse\n * @example\n * var pulse = new Tone.PulseOscillator(\"E5\", 0.4).toMaster().start();\n */\nTone.PulseOscillator = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"width\"], Tone.Oscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * The width of the pulse.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\n\t/**\n\t * gate the width amount\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._widthGate = new Tone.Gain(0);\n\n\t/**\n\t * the sawtooth oscillator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._sawtooth = new Tone.Oscillator({\n\t\tfrequency : options.frequency,\n\t\tdetune : options.detune,\n\t\ttype : \"sawtooth\",\n\t\tphase : options.phase\n\t});\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._sawtooth.frequency;\n\n\t/**\n\t * The detune in cents.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = this._sawtooth.detune;\n\n\t/**\n\t * Threshold the signal to turn it into a square\n\t * @type {Tone.WaveShaper}\n\t * @private\n\t */\n\tthis._thresh = new Tone.WaveShaper(function(val){\n\t\tif (val < 0){\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t});\n\n\t//connections\n\tthis._sawtooth.chain(this._thresh, this.output);\n\tthis.width.chain(this._widthGate, this._thresh);\n\tthis._readOnly([\"width\", \"frequency\", \"detune\"]);\n};\n\nTone.extend(Tone.PulseOscillator, Tone.Source);\n\n/**\n * The default parameters.\n * @static\n * @const\n * @type {Object}\n */\nTone.PulseOscillator.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"phase\" : 0,\n\t\"width\" : 0.2,\n};\n\n/**\n * start the oscillator\n * @param {Time} time\n * @private\n */\nTone.PulseOscillator.prototype._start = function(time){\n\ttime = this.toSeconds(time);\n\tthis._sawtooth.start(time);\n\tthis._widthGate.gain.setValueAtTime(1, time);\n};\n\n/**\n * stop the oscillator\n * @param {Time} time\n * @private\n */\nTone.PulseOscillator.prototype._stop = function(time){\n\ttime = this.toSeconds(time);\n\tthis._sawtooth.stop(time);\n\t//the width is still connected to the output.\n\t//that needs to be stopped also\n\tthis._widthGate.gain.setValueAtTime(0, time);\n};\n\n/**\n * restart the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.PulseOscillator.prototype.restart = function(time){\n\tthis._sawtooth.restart(time);\n\tthis._widthGate.gain.cancelScheduledValues(time);\n\tthis._widthGate.gain.setValueAtTime(1, time);\n};\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.PulseOscillator#\n * @type {Degrees}\n * @name phase\n */\nObject.defineProperty(Tone.PulseOscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._sawtooth.phase;\n\t},\n\tset : function(phase){\n\t\tthis._sawtooth.phase = phase;\n\t}\n});\n\n/**\n * The type of the oscillator. Always returns \"pulse\".\n * @readOnly\n * @memberOf Tone.PulseOscillator#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.PulseOscillator.prototype, \"type\", {\n\tget : function(){\n\t\treturn \"pulse\";\n\t}\n});\n\n/**\n * The baseType of the oscillator. Always returns \"pulse\".\n * @readOnly\n * @memberOf Tone.PulseOscillator#\n * @type {string}\n * @name baseType\n */\nObject.defineProperty(Tone.PulseOscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn \"pulse\";\n\t}\n});\n\n/**\n * The partials of the waveform. Cannot set partials for this waveform type\n * @memberOf Tone.PulseOscillator#\n * @type {Array}\n * @name partials\n * @private\n */\nObject.defineProperty(Tone.PulseOscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn [];\n\t}\n});\n\n/**\n * Clean up method.\n * @return {Tone.PulseOscillator} this\n */\nTone.PulseOscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis._sawtooth.dispose();\n\tthis._sawtooth = null;\n\tthis._writable([\"width\", \"frequency\", \"detune\"]);\n\tthis.width.dispose();\n\tthis.width = null;\n\tthis._widthGate.dispose();\n\tthis._widthGate = null;\n\tthis._thresh.dispose();\n\tthis._thresh = null;\n\tthis.frequency = null;\n\tthis.detune = null;\n\treturn this;\n};\n\nexport default Tone.PulseOscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Transport\";\nimport \"../type/Type\";\nimport \"../core/TimelineState\";\n\n/**\n * @class Tone.Event abstracts away Tone.Transport.schedule and provides a schedulable\n * callback for a single or repeatable events along the timeline.\n *\n * @extends {Tone}\n * @param {function} callback The callback to invoke at the time.\n * @param {*} value The value or values which should be passed to\n * the callback function on invocation.\n * @example\n * var chord = new Tone.Event(function(time, chord){\n * \t//the chord as well as the exact time of the event\n * \t//are passed in as arguments to the callback function\n * }, [\"D4\", \"E4\", \"F4\"]);\n * //start the chord at the beginning of the transport timeline\n * chord.start();\n * //loop it every measure for 8 measures\n * chord.loop = 8;\n * chord.loopEnd = \"1m\";\n */\nTone.Event = function(){\n\n\tvar options = Tone.defaults(arguments, [\"callback\", \"value\"], Tone.Event);\n\tTone.call(this);\n\n\t/**\n\t * Loop value\n\t * @type {Boolean|Positive}\n\t * @private\n\t */\n\tthis._loop = options.loop;\n\n\t/**\n\t * The callback to invoke.\n\t * @type {Function}\n\t */\n\tthis.callback = options.callback;\n\n\t/**\n\t * The value which is passed to the\n\t * callback function.\n\t * @type {*}\n\t * @private\n\t */\n\tthis.value = options.value;\n\n\t/**\n\t * When the note is scheduled to start.\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._loopStart = this.toTicks(options.loopStart);\n\n\t/**\n\t * When the note is scheduled to start.\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._loopEnd = this.toTicks(options.loopEnd);\n\n\t/**\n\t * Tracks the scheduled events\n\t * @type {Tone.TimelineState}\n\t * @private\n\t */\n\tthis._state = new Tone.TimelineState(Tone.State.Stopped);\n\n\t/**\n\t * The playback speed of the note. A speed of 1\n\t * is no change.\n\t * @private\n\t * @type {Positive}\n\t */\n\tthis._playbackRate = 1;\n\n\t/**\n\t * A delay time from when the event is scheduled to start\n\t * @type {Ticks}\n\t * @private\n\t */\n\tthis._startOffset = 0;\n\n\t/**\n\t * private holder of probability value\n\t * @type {NormalRange}\n\t * @private\n\t */\n\tthis._probability = options.probability;\n\n\t/**\n\t * the amount of variation from the\n\t * given time.\n\t * @type {Boolean|Time}\n\t * @private\n\t */\n\tthis._humanize = options.humanize;\n\n\t/**\n\t * If mute is true, the callback won't be\n\t * invoked.\n\t * @type {Boolean}\n\t */\n\tthis.mute = options.mute;\n\n\t//set the initial values\n\tthis.playbackRate = options.playbackRate;\n};\n\nTone.extend(Tone.Event);\n\n/**\n * The default values\n * @type {Object}\n * @const\n */\nTone.Event.defaults = {\n\t\"callback\" : Tone.noOp,\n\t\"loop\" : false,\n\t\"loopEnd\" : \"1m\",\n\t\"loopStart\" : 0,\n\t\"playbackRate\" : 1,\n\t\"value\" : null,\n\t\"probability\" : 1,\n\t\"mute\" : false,\n\t\"humanize\" : false,\n};\n\n/**\n * Reschedule all of the events along the timeline\n * with the updated values.\n * @param {Time} after Only reschedules events after the given time.\n * @return {Tone.Event} this\n * @private\n */\nTone.Event.prototype._rescheduleEvents = function(after){\n\t//if no argument is given, schedules all of the events\n\tafter = Tone.defaultArg(after, -1);\n\tthis._state.forEachFrom(after, function(event){\n\t\tvar duration;\n\t\tif (event.state === Tone.State.Started){\n\t\t\tif (Tone.isDefined(event.id)){\n\t\t\t\tTone.Transport.clear(event.id);\n\t\t\t}\n\t\t\tvar startTick = event.time + Math.round(this.startOffset / this._playbackRate);\n\t\t\tif (this._loop === true || Tone.isNumber(this._loop) && this._loop > 1){\n\t\t\t\tduration = Infinity;\n\t\t\t\tif (Tone.isNumber(this._loop)){\n\t\t\t\t\tduration = (this._loop) * this._getLoopDuration();\n\t\t\t\t}\n\t\t\t\tvar nextEvent = this._state.getAfter(startTick);\n\t\t\t\tif (nextEvent !== null){\n\t\t\t\t\tduration = Math.min(duration, nextEvent.time - startTick);\n\t\t\t\t}\n\t\t\t\tif (duration !== Infinity){\n\t\t\t\t\t//schedule a stop since it's finite duration\n\t\t\t\t\tthis._state.setStateAtTime(Tone.State.Stopped, startTick + duration + 1);\n\t\t\t\t\tduration = Tone.Ticks(duration);\n\t\t\t\t}\n\t\t\t\tvar interval = Tone.Ticks(this._getLoopDuration());\n\t\t\t\tevent.id = Tone.Transport.scheduleRepeat(this._tick.bind(this), interval, Tone.Ticks(startTick), duration);\n\t\t\t} else {\n\t\t\t\tevent.id = Tone.Transport.schedule(this._tick.bind(this), Tone.Ticks(startTick));\n\t\t\t}\n\t\t}\n\t}.bind(this));\n\treturn this;\n};\n\n/**\n * Returns the playback state of the note, either \"started\" or \"stopped\".\n * @type {String}\n * @readOnly\n * @memberOf Tone.Event#\n * @name state\n */\nObject.defineProperty(Tone.Event.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._state.getValueAtTime(Tone.Transport.ticks);\n\t}\n});\n\n/**\n * The start from the scheduled start time\n * @type {Ticks}\n * @memberOf Tone.Event#\n * @name startOffset\n * @private\n */\nObject.defineProperty(Tone.Event.prototype, \"startOffset\", {\n\tget : function(){\n\t\treturn this._startOffset;\n\t},\n\tset : function(offset){\n\t\tthis._startOffset = offset;\n\t}\n});\n\n/**\n * The probability of the notes being triggered.\n * @memberOf Tone.Event#\n * @type {NormalRange}\n * @name probability\n */\nObject.defineProperty(Tone.Event.prototype, \"probability\", {\n\tget : function(){\n\t\treturn this._probability;\n\t},\n\tset : function(prob){\n\t\tthis._probability = prob;\n\t}\n});\n\n/**\n * If set to true, will apply small random variation\n * to the callback time. If the value is given as a time, it will randomize\n * by that amount.\n * @type {Boolean|Time}\n * @name humanize\n * @memberof Tone.Event#\n * @example\n * event.humanize = true;\n */\nObject.defineProperty(Tone.Event.prototype, \"humanize\", {\n\tget : function(){\n\t\treturn this._humanize;\n\t},\n\tset : function(variation){\n\t\tthis._humanize = variation;\n\t}\n});\n\n/**\n * Start the note at the given time.\n * @param {TimelinePosition} time When the note should start.\n * @return {Tone.Event} this\n */\nTone.Event.prototype.start = function(time){\n\ttime = this.toTicks(time);\n\tif (this._state.getValueAtTime(time) === Tone.State.Stopped){\n\t\tthis._state.add({\n\t\t\t\"state\" : Tone.State.Started,\n\t\t\t\"time\" : time,\n\t\t\t\"id\" : undefined,\n\t\t});\n\t\tthis._rescheduleEvents(time);\n\t}\n\treturn this;\n};\n\n/**\n * Stop the Event at the given time.\n * @param {TimelinePosition} time When the note should stop.\n * @return {Tone.Event} this\n */\nTone.Event.prototype.stop = function(time){\n\tthis.cancel(time);\n\ttime = this.toTicks(time);\n\tif (this._state.getValueAtTime(time) === Tone.State.Started){\n\t\tthis._state.setStateAtTime(Tone.State.Stopped, time);\n\t\tvar previousEvent = this._state.getBefore(time);\n\t\tvar reschedulTime = time;\n\t\tif (previousEvent !== null){\n\t\t\treschedulTime = previousEvent.time;\n\t\t}\n\t\tthis._rescheduleEvents(reschedulTime);\n\t}\n\treturn this;\n};\n\n/**\n * Cancel all scheduled events greater than or equal to the given time\n * @param {TimelinePosition} [time=0] The time after which events will be cancel.\n * @return {Tone.Event} this\n */\nTone.Event.prototype.cancel = function(time){\n\ttime = Tone.defaultArg(time, -Infinity);\n\ttime = this.toTicks(time);\n\tthis._state.forEachFrom(time, function(event){\n\t\tTone.Transport.clear(event.id);\n\t});\n\tthis._state.cancel(time);\n\treturn this;\n};\n\n/**\n * The callback function invoker. Also\n * checks if the Event is done playing\n * @param {Number} time The time of the event in seconds\n * @private\n */\nTone.Event.prototype._tick = function(time){\n\tvar ticks = Tone.Transport.getTicksAtTime(time);\n\tif (!this.mute && this._state.getValueAtTime(ticks) === Tone.State.Started){\n\t\tif (this.probability < 1 && Math.random() > this.probability){\n\t\t\treturn;\n\t\t}\n\t\tif (this.humanize){\n\t\t\tvar variation = 0.02;\n\t\t\tif (!Tone.isBoolean(this.humanize)){\n\t\t\t\tvariation = this.toSeconds(this.humanize);\n\t\t\t}\n\t\t\ttime += (Math.random() * 2 - 1) * variation;\n\t\t}\n\t\tthis.callback(time, this.value);\n\t}\n};\n\n/**\n * Get the duration of the loop.\n * @return {Ticks}\n * @private\n */\nTone.Event.prototype._getLoopDuration = function(){\n\treturn Math.round((this._loopEnd - this._loopStart) / this._playbackRate);\n};\n\n/**\n * If the note should loop or not\n * between Tone.Event.loopStart and\n * Tone.Event.loopEnd. If set to true,\n * the event will loop indefinitely,\n * if set to a number greater than 1\n * it will play a specific number of\n * times, if set to false, 0 or 1, the\n * part will only play once.\n * @memberOf Tone.Event#\n * @type {Boolean|Positive}\n * @name loop\n */\nObject.defineProperty(Tone.Event.prototype, \"loop\", {\n\tget : function(){\n\t\treturn this._loop;\n\t},\n\tset : function(loop){\n\t\tthis._loop = loop;\n\t\tthis._rescheduleEvents();\n\t}\n});\n\n/**\n * \tThe playback rate of the note. Defaults to 1.\n * @memberOf Tone.Event#\n * @type {Positive}\n * @name playbackRate\n * @example\n * note.loop = true;\n * //repeat the note twice as fast\n * note.playbackRate = 2;\n */\nObject.defineProperty(Tone.Event.prototype, \"playbackRate\", {\n\tget : function(){\n\t\treturn this._playbackRate;\n\t},\n\tset : function(rate){\n\t\tthis._playbackRate = rate;\n\t\tthis._rescheduleEvents();\n\t}\n});\n\n/**\n * The loopEnd point is the time the event will loop\n * if Tone.Event.loop is true.\n * @memberOf Tone.Event#\n * @type {Time}\n * @name loopEnd\n */\nObject.defineProperty(Tone.Event.prototype, \"loopEnd\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._loopEnd).toSeconds();\n\t},\n\tset : function(loopEnd){\n\t\tthis._loopEnd = this.toTicks(loopEnd);\n\t\tif (this._loop){\n\t\t\tthis._rescheduleEvents();\n\t\t}\n\t}\n});\n\n/**\n * The time when the loop should start.\n * @memberOf Tone.Event#\n * @type {Time}\n * @name loopStart\n */\nObject.defineProperty(Tone.Event.prototype, \"loopStart\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._loopStart).toSeconds();\n\t},\n\tset : function(loopStart){\n\t\tthis._loopStart = this.toTicks(loopStart);\n\t\tif (this._loop){\n\t\t\tthis._rescheduleEvents();\n\t\t}\n\t}\n});\n\n/**\n * The current progress of the loop interval.\n * Returns 0 if the event is not started yet or\n * it is not set to loop.\n * @memberOf Tone.Event#\n * @type {NormalRange}\n * @name progress\n * @readOnly\n */\nObject.defineProperty(Tone.Event.prototype, \"progress\", {\n\tget : function(){\n\t\tif (this._loop){\n\t\t\tvar ticks = Tone.Transport.ticks;\n\t\t\tvar lastEvent = this._state.get(ticks);\n\t\t\tif (lastEvent !== null && lastEvent.state === Tone.State.Started){\n\t\t\t\tvar loopDuration = this._getLoopDuration();\n\t\t\t\tvar progress = (ticks - lastEvent.time) % loopDuration;\n\t\t\t\treturn progress / loopDuration;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n});\n\n/**\n * Clean up\n * @return {Tone.Event} this\n */\nTone.Event.prototype.dispose = function(){\n\tthis.cancel();\n\tthis._state.dispose();\n\tthis._state = null;\n\tthis.callback = null;\n\tthis.value = null;\n};\n\nexport default Tone.Event;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../signal/Subtract\";\nimport \"../signal/Add\";\nimport \"../component/Merge\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Mid/Side processing separates the the 'mid' signal\n * (which comes out of both the left and the right channel)\n * and the 'side' (which only comes out of the the side channels).\n * MidSideMerge merges the mid and side signal after they've been seperated\n * by Tone.MidSideSplit.
\n * \n * Left = (Mid+Side)/sqrt(2); // obtain left signal from mid and side
\n * Right = (Mid-Side)/sqrt(2); // obtain right signal from mid and side
\n *
\n *\n * @extends {Tone.AudioNode}\n * @constructor\n */\nTone.MidSideMerge = function(){\n\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(2, 0);\n\n\t/**\n\t * The mid signal input. Alias for\n\t * input[0]
\n\t * @type {Tone.Gain}\n\t */\n\tthis.mid = this.input[0] = new Tone.Gain();\n\n\t/**\n\t * recombine the mid/side into Left\n\t * @type {Tone.Add}\n\t * @private\n\t */\n\tthis._left = new Tone.Add();\n\n\t/**\n\t * Multiply the left by sqrt(1/2)\n\t * @type {Tone.Multiply}\n\t */\n\tthis._timesTwoLeft = new Tone.Multiply(Math.SQRT1_2);\n\n\t/**\n\t * The side signal input. Alias for\n\t * input[1]
\n\t * @type {Tone.Gain}\n\t */\n\tthis.side = this.input[1] = new Tone.Gain();\n\n\t/**\n\t * recombine the mid/side into Right\n\t * @type {Tone.Subtract}\n\t * @private\n\t */\n\tthis._right = new Tone.Subtract(/*\"($0 - $1) * $2\"*/);\n\n\t/**\n\t * Multiply the right by sqrt(1/2)\n\t * @type {Tone.Multiply}\n\t */\n\tthis._timesTwoRight = new Tone.Multiply(Math.SQRT1_2);\n\n\t/**\n\t * Merge the left/right signal back into a stereo signal.\n\t * @type {Tone.Merge}\n\t * @private\n\t */\n\tthis._merge = this.output = new Tone.Merge();\n\n\tthis.mid.connect(this._left, 0, 0);\n\tthis.side.connect(this._left, 0, 1);\n\tthis.mid.connect(this._right, 0, 0);\n\tthis.side.connect(this._right, 0, 1);\n\tthis._left.connect(this._timesTwoLeft);\n\tthis._right.connect(this._timesTwoRight);\n\tthis._timesTwoLeft.connect(this._merge, 0, 0);\n\tthis._timesTwoRight.connect(this._merge, 0, 1);\n};\n\nTone.extend(Tone.MidSideMerge, Tone.AudioNode);\n\n/**\n * clean up\n * @returns {Tone.MidSideMerge} this\n */\nTone.MidSideMerge.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis.mid.dispose();\n\tthis.mid = null;\n\tthis.side.dispose();\n\tthis.side = null;\n\tthis._left.dispose();\n\tthis._left = null;\n\tthis._timesTwoLeft.dispose();\n\tthis._timesTwoLeft = null;\n\tthis._right.dispose();\n\tthis._right = null;\n\tthis._timesTwoRight.dispose();\n\tthis._timesTwoRight = null;\n\tthis._merge.dispose();\n\tthis._merge = null;\n\treturn this;\n};\n\nexport default Tone.MidSideMerge;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Add\";\nimport \"../signal/Subtract\";\nimport \"../signal/Signal\";\nimport \"../component/Split\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Mid/Side processing separates the the 'mid' signal\n * (which comes out of both the left and the right channel)\n * and the 'side' (which only comes out of the the side channels).
\n * \n * Mid = (Left+Right)/sqrt(2); // obtain mid-signal from left and right
\n * Side = (Left-Right)/sqrt(2); // obtain side-signal from left and righ
\n *
\n *\n * @extends {Tone.AudioNode}\n * @constructor\n */\nTone.MidSideSplit = function(){\n\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(0, 2);\n\n\t/**\n\t * split the incoming signal into left and right channels\n\t * @type {Tone.Split}\n\t * @private\n\t */\n\tthis._split = this.input = new Tone.Split();\n\n\t/**\n\t * The mid send. Connect to mid processing. Alias for\n\t * output[0]
\n\t * @type {Tone.Add}\n\t */\n\tthis._midAdd = new Tone.Add();\n\n\t/**\n\t * Multiply the _midAdd by sqrt(1/2)\n\t * @type {Tone.Multiply}\n\t */\n\tthis.mid = this.output[0] = new Tone.Multiply(Math.SQRT1_2);\n\n\t/**\n\t * The side output. Connect to side processing. Also Output 1\n\t * @type {Tone.Subtract}\n\t */\n\tthis._sideSubtract = new Tone.Subtract();\n\n\t/**\n\t * Multiply the _midAdd by sqrt(1/2)\n\t * @type {Tone.Multiply}\n\t */\n\tthis.side = this.output[1] = new Tone.Multiply(Math.SQRT1_2);\n\n\tthis._split.connect(this._midAdd, 0, 0);\n\tthis._split.connect(this._midAdd, 1, 1);\n\tthis._split.connect(this._sideSubtract, 0, 0);\n\tthis._split.connect(this._sideSubtract, 1, 1);\n\tthis._midAdd.connect(this.mid);\n\tthis._sideSubtract.connect(this.side);\n};\n\nTone.extend(Tone.MidSideSplit, Tone.AudioNode);\n\n/**\n * clean up\n * @returns {Tone.MidSideSplit} this\n */\nTone.MidSideSplit.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis.mid.dispose();\n\tthis.mid = null;\n\tthis.side.dispose();\n\tthis.side = null;\n\tthis._midAdd.dispose();\n\tthis._midAdd = null;\n\tthis._sideSubtract.dispose();\n\tthis._sideSubtract = null;\n\tthis._split.dispose();\n\tthis._split = null;\n\treturn this;\n};\n\nexport default Tone.MidSideSplit;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../component/Filter\";\nimport \"../core/AudioNode\";\nimport \"../component/FeedbackCombFilter\";\n\n/**\n * @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to\n * Tone.FeedbackCombFilter, but includes a lowpass filter.\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Time|Object} [delayTime] The delay time of the comb filter\n * @param {NormalRange=} resonance The resonance (feedback) of the comb filter\n * @param {Frequency=} dampening The cutoff of the lowpass filter dampens the\n * signal as it is fedback.\n */\nTone.LowpassCombFilter = function(){\n\n\tvar options = Tone.defaults(arguments, [\"delayTime\", \"resonance\", \"dampening\"], Tone.LowpassCombFilter);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * the delay node\n\t * @type {DelayNode}\n\t * @private\n\t */\n\tthis._combFilter = this.output = new Tone.FeedbackCombFilter(options.delayTime, options.resonance);\n\n\t/**\n\t * The delayTime of the comb filter.\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.delayTime = this._combFilter.delayTime;\n\n\t/**\n\t * the lowpass filter\n\t * @type {BiquadFilterNode}\n\t * @private\n\t */\n\tthis._lowpass = this.input = new Tone.Filter({\n\t\t\"frequency\" : options.dampening,\n\t\t\"type\" : \"lowpass\",\n\t\t\"Q\" : 0,\n\t\t\"rolloff\" : -12\n\t});\n\n\t/**\n\t * The dampening control of the feedback\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.dampening = this._lowpass.frequency;\n\t\n\t/**\n\t * The amount of feedback of the delayed signal.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.resonance = this._combFilter.resonance;\n\n\t//connections\n\tthis._lowpass.connect(this._combFilter);\n\tthis._readOnly([\"dampening\", \"resonance\", \"delayTime\"]);\n};\n\nTone.extend(Tone.LowpassCombFilter, Tone.AudioNode);\n\n/**\n * the default parameters\n * @static\n * @const\n * @type {Object}\n */\nTone.LowpassCombFilter.defaults = {\n\t\"delayTime\" : 0.1,\n\t\"resonance\" : 0.5,\n\t\"dampening\" : 3000\n};\n\n/**\n * Clean up.\n * @returns {Tone.LowpassCombFilter} this\n */\nTone.LowpassCombFilter.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"dampening\", \"resonance\", \"delayTime\"]);\n\tthis._combFilter.dispose();\n\tthis._combFilter = null;\n\tthis.resonance = null;\n\tthis.delayTime = null;\n\tthis._lowpass.dispose();\n\tthis._lowpass = null;\n\tthis.dampening = null;\n\treturn this;\n};\n\nexport default Tone.LowpassCombFilter;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/TransportTime\";\n\n/**\n * @class Tone.Ticks is a primitive type for encoding Time values.\n * Tone.Ticks can be constructed with or without the `new` keyword. Tone.Ticks can be passed\n * into the parameter of any method which takes time as an argument.\n * @constructor\n * @extends {Tone.TransportTime}\n * @param {String|Number} val The time value.\n * @param {String=} units The units of the value.\n * @example\n * var t = Tone.Ticks(\"4n\");//a quarter note\n */\nTone.Ticks = function(val, units){\n\tif (this instanceof Tone.Ticks){\n\n\t\tTone.TransportTime.call(this, val, units);\n\n\t} else {\n\t\treturn new Tone.Ticks(val, units);\n\t}\n};\n\nTone.extend(Tone.Ticks, Tone.TransportTime);\n\n/**\n * The default units if none are given.\n * @type {String}\n * @private\n */\nTone.Ticks.prototype._defaultUnits = \"i\";\n\n/**\n * Get the current time in the given units\n * @return {Ticks}\n * @private\n */\nTone.Ticks.prototype._now = function(){\n\treturn Tone.Transport.ticks;\n};\n\n/**\n * Return the value of the beats in the current units\n * @param {Number} beats\n * @return {Number}\n * @private\n */\nTone.Ticks.prototype._beatsToUnits = function(beats){\n\treturn this._getPPQ() * beats;\n};\n\n/**\n * Returns the value of a second in the current units\n * @param {Seconds} seconds\n * @return {Number}\n * @private\n */\nTone.Ticks.prototype._secondsToUnits = function(seconds){\n\treturn Math.floor(seconds / (60 / this._getBpm()) * this._getPPQ());\n};\n\n/**\n * Returns the value of a tick in the current time units\n * @param {Ticks} ticks\n * @return {Number}\n * @private\n */\nTone.Ticks.prototype._ticksToUnits = function(ticks){\n\treturn ticks;\n};\n\n/**\n * Return the time in ticks\n * @return {Ticks}\n */\nTone.Ticks.prototype.toTicks = function(){\n\treturn this.valueOf();\n};\n\n/**\n * Return the time in ticks\n * @return {Ticks}\n */\nTone.Ticks.prototype.toSeconds = function(){\n\treturn (this.valueOf() / this._getPPQ()) * (60 / this._getBpm());\n};\n\nexport default Tone.Ticks;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Ticks\";\n\n/**\n * @class Tone.TransportEvent is an internal class used by (Tone.Transport)[Transport]\n * to schedule events. Do no invoke this class directly, it is\n * handled from within Tone.Transport.\n * @extends {Tone}\n * @param {Object} options\n */\nTone.TransportEvent = function(Transport, options){\n\n\toptions = Tone.defaultArg(options, Tone.TransportEvent.defaults);\n\tTone.call(this);\n\n\t/**\n\t * Reference to the Transport that created it\n\t * @type {Tone.Transport}\n\t */\n\tthis.Transport = Transport;\n\n\t/**\n\t * The unique id of the event\n\t * @type {Number}\n\t */\n\tthis.id = Tone.TransportEvent._eventId++;\n\n\t/**\n\t * The time the event starts\n\t * @type {Ticks}\n\t */\n\tthis.time = Tone.Ticks(options.time);\n\n\t/**\n\t * The callback to invoke\n\t * @type {Function}\n\t */\n\tthis.callback = options.callback;\n\n\t/**\n\t * If the event should be removed after being created.\n\t * @type {Boolean}\n\t * @private\n\t */\n\tthis._once = options.once;\n};\n\nTone.extend(Tone.TransportEvent);\n\n/**\n * The defaults\n * @static\n * @type {Object}\n */\nTone.TransportEvent.defaults = {\n\t\"once\" : false,\n\t\"callback\" : Tone.noOp,\n};\n\n/**\n * Current ID counter\n * @private\n * @static\n * @type {Number}\n */\nTone.TransportEvent._eventId = 0;\n\n/**\n * Invoke the event callback.\n * @param {Time} time The AudioContext time in seconds of the event\n */\nTone.TransportEvent.prototype.invoke = function(time){\n\tif (this.callback){\n\t\tthis.callback(time);\n\t\tif (this._once && this.Transport){\n\t\t\tthis.Transport.clear(this.id);\n\t\t}\n\t}\n};\n\n/**\n * Clean up\n * @return {Tone.TransportEvent} this\n */\nTone.TransportEvent.prototype.dispose = function(){\n\tTone.prototype.dispose.call(this);\n\tthis.Transport = null;\n\tthis.callback = null;\n\tthis.time = null;\n\treturn this;\n};\n\nexport default Tone.TransportEvent;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/TickSignal\";\nimport \"../core/TimelineState\";\nimport \"../core/Timeline\";\nimport \"../core/Param\";\n\n/**\n * @class Uses [Tone.TickSignal](TickSignal) to track elapsed ticks with\n * \t\tcomplex automation curves.\n *\n * \t@constructor\n * @extends {Tone}\n * @param {Frequency} frequency The initial frequency that the signal ticks at\n * @param {Tone.Param=} param A parameter to control (such as playbackRate)\n */\nTone.TickSource = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\"], Tone.TickSource);\n\n\t/**\n\t * The frequency the callback function should be invoked.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.TickSignal(options.frequency);\n\tthis._readOnly(\"frequency\");\n\n\t/**\n\t * The state timeline\n\t * @type {Tone.TimelineState}\n\t * @private\n\t */\n\tthis._state = new Tone.TimelineState(Tone.State.Stopped);\n\tthis._state.setStateAtTime(Tone.State.Stopped, 0);\n\n\t/**\n\t * The offset values of the ticks\n\t * @type {Tone.Timeline}\n\t * @private\n\t */\n\tthis._tickOffset = new Tone.Timeline();\n\t//add the first event\n\tthis.setTicksAtTime(0, 0);\n};\n\nTone.extend(Tone.TickSource);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.TickSource.defaults = {\n\t\"frequency\" : 1,\n};\n\n/**\n * Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.TickSource#\n * @name state\n */\nObject.defineProperty(Tone.TickSource.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._state.getValueAtTime(this.now());\n\t}\n});\n\n/**\n * Start the clock at the given time. Optionally pass in an offset\n * of where to start the tick counter from.\n * @param {Time=} time The time the clock should start\n * @param {Ticks} [offset=0] The number of ticks to start the source at\n * @return {Tone.TickSource} this\n */\nTone.TickSource.prototype.start = function(time, offset){\n\ttime = this.toSeconds(time);\n\tif (this._state.getValueAtTime(time) !== Tone.State.Started){\n\t\tthis._state.setStateAtTime(Tone.State.Started, time);\n\t\tif (Tone.isDefined(offset)){\n\t\t\tthis.setTicksAtTime(offset, time);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Stop the clock. Stopping the clock resets the tick counter to 0.\n * @param {Time} [time=now] The time when the clock should stop.\n * @returns {Tone.TickSource} this\n * @example\n * clock.stop();\n */\nTone.TickSource.prototype.stop = function(time){\n\ttime = this.toSeconds(time);\n\t//cancel the previous stop\n\tif (this._state.getValueAtTime(time) === Tone.State.Stopped){\n\t\tvar event = this._state.get(time);\n\t\tif (event.time > 0){\n\t\t\tthis._tickOffset.cancel(event.time);\n\t\t\tthis._state.cancel(event.time);\n\t\t}\n\t}\n\tthis._state.cancel(time);\n\tthis._state.setStateAtTime(Tone.State.Stopped, time);\n\tthis.setTicksAtTime(0, time);\n\treturn this;\n};\n\n/**\n * Pause the clock. Pausing does not reset the tick counter.\n * @param {Time} [time=now] The time when the clock should stop.\n * @returns {Tone.TickSource} this\n */\nTone.TickSource.prototype.pause = function(time){\n\ttime = this.toSeconds(time);\n\tif (this._state.getValueAtTime(time) === Tone.State.Started){\n\t\tthis._state.setStateAtTime(Tone.State.Paused, time);\n\t}\n\treturn this;\n};\n\n/**\n * Cancel start/stop/pause and setTickAtTime events scheduled after the given time.\n * @param {Time} [time=now] When to clear the events after\n * @returns {Tone.TickSource} this\n */\nTone.TickSource.prototype.cancel = function(time){\n\ttime = this.toSeconds(time);\n\tthis._state.cancel(time);\n\tthis._tickOffset.cancel(time);\n\treturn this;\n};\n\n/**\n * Get the elapsed ticks at the given time\n * @param {Time} time When to get the tick value\n * @return {Ticks} The number of ticks\n */\nTone.TickSource.prototype.getTicksAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tvar stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t//this event allows forEachBetween to iterate until the current time\n\tvar tmpEvent = { state : Tone.State.Paused, time : time };\n\tthis._state.add(tmpEvent);\n\n\t//keep track of the previous offset event\n\tvar lastState = stopEvent;\n\tvar elapsedTicks = 0;\n\n\t//iterate through all the events since the last stop\n\tthis._state.forEachBetween(stopEvent.time, time + this.sampleTime, function(e){\n\t\tvar periodStartTime = lastState.time;\n\t\t//if there is an offset event in this period use that\n\t\tvar offsetEvent = this._tickOffset.get(e.time);\n\t\tif (offsetEvent.time >= lastState.time){\n\t\t\telapsedTicks = offsetEvent.ticks;\n\t\t\tperiodStartTime = offsetEvent.time;\n\t\t}\n\t\tif (lastState.state === Tone.State.Started && e.state !== Tone.State.Started){\n\t\t\telapsedTicks += this.frequency.getTicksAtTime(e.time) - this.frequency.getTicksAtTime(periodStartTime);\n\t\t} \n\t\tlastState = e;\n\t}.bind(this));\n\n\t//remove the temporary event\n\tthis._state.remove(tmpEvent);\n\n\t//return the ticks\n\treturn elapsedTicks;\n};\n\n/**\n * The number of times the callback was invoked. Starts counting at 0\n * and increments after the callback was invoked. Returns -1 when stopped.\n * @memberOf Tone.TickSource#\n * @name ticks\n * @type {Ticks}\n */\nObject.defineProperty(Tone.TickSource.prototype, \"ticks\", {\n\tget : function(){\n\t\treturn this.getTicksAtTime(this.now());\n\t},\n\tset : function(t){\n\t\tthis.setTicksAtTime(t, this.now());\n\t}\n});\n\n/**\n * The time since ticks=0 that the TickSource has been running. Accounts\n * for tempo curves\n * @memberOf Tone.TickSource#\n * @name seconds\n * @type {Seconds}\n */\nObject.defineProperty(Tone.TickSource.prototype, \"seconds\", {\n\tget : function(){\n\t\treturn this.getSecondsAtTime(this.now());\n\t},\n\tset : function(s){\n\t\tvar now = this.now();\n\t\tvar ticks = this.frequency.timeToTicks(s, now);\n\t\tthis.setTicksAtTime(ticks, now);\n\t}\n});\n\n/**\n * Return the elapsed seconds at the given time.\n * @param {Time} time When to get the elapsed seconds\n * @return {Seconds} The number of elapsed seconds\n */\nTone.TickSource.prototype.getSecondsAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tvar stopEvent = this._state.getLastState(Tone.State.Stopped, time);\n\t//this event allows forEachBetween to iterate until the current time\n\tvar tmpEvent = { state : Tone.State.Paused, time : time };\n\tthis._state.add(tmpEvent);\n\n\t//keep track of the previous offset event\n\tvar lastState = stopEvent;\n\tvar elapsedSeconds = 0;\n\n\t//iterate through all the events since the last stop\n\tthis._state.forEachBetween(stopEvent.time, time + this.sampleTime, function(e){\n\t\tvar periodStartTime = lastState.time;\n\t\t//if there is an offset event in this period use that\n\t\tvar offsetEvent = this._tickOffset.get(e.time);\n\t\tif (offsetEvent.time >= lastState.time){\n\t\t\telapsedSeconds = offsetEvent.seconds;\n\t\t\tperiodStartTime = offsetEvent.time;\n\t\t}\n\t\tif (lastState.state === Tone.State.Started && e.state !== Tone.State.Started){\n\t\t\telapsedSeconds += e.time - periodStartTime;\n\t\t} \n\t\tlastState = e;\n\t}.bind(this));\n\n\t//remove the temporary event\n\tthis._state.remove(tmpEvent);\n\n\t//return the ticks\n\treturn elapsedSeconds;\n};\n\n/**\n * Set the clock's ticks at the given time.\n * @param {Ticks} ticks The tick value to set\n * @param {Time} time When to set the tick value\n * @return {Tone.TickSource} this\n */\nTone.TickSource.prototype.setTicksAtTime = function(ticks, time){\n\ttime = this.toSeconds(time);\n\tthis._tickOffset.cancel(time);\n\tthis._tickOffset.add({\n\t\t\"time\" : time,\n\t\t\"ticks\" : ticks,\n\t\t\"seconds\" : this.frequency.getDurationOfTicks(ticks, time)\n\t});\n\treturn this;\n};\n\n/**\n * Returns the scheduled state at the given time.\n * @param {Time} time The time to query.\n * @return {String} The name of the state input in setStateAtTime.\n * @example\n * source.start(\"+0.1\");\n * source.getStateAtTime(\"+0.1\"); //returns \"started\"\n */\nTone.TickSource.prototype.getStateAtTime = function(time){\n\ttime = this.toSeconds(time);\n\treturn this._state.getValueAtTime(time);\n};\n\n/**\n * Get the time of the given tick. The second argument\n * is when to test before. Since ticks can be set (with setTicksAtTime)\n * there may be multiple times for a given tick value. \n * @param {Ticks} ticks The tick number.\n * @param {Time=} before When to measure the tick value from. \n * @return {Time} The time of the tick\n */\nTone.TickSource.prototype.getTimeOfTick = function(tick, before){\n\tbefore = Tone.defaultArg(before, this.now());\n\tvar offset = this._tickOffset.get(before);\n\tvar event = this._state.get(before);\n\tvar startTime = Math.max(offset.time, event.time);\n\tvar absoluteTicks = this.frequency.getTicksAtTime(startTime) + tick - offset.ticks;\n\treturn this.frequency.getTimeOfTick(absoluteTicks);\n};\n\n/**\n * @callback forEachTickBetween\n * @param {Time} when\n * @param {Ticks} when\n */\n\n/**\n * Invoke the callback event at all scheduled ticks between the \n * start time and the end time\n * @param {Time} startTime The beginning of the search range\n * @param {Time} endTime The end of the search range\n * @param {ForEachCallback} callback The callback to invoke with each tick\n * @return {Tone.TickSource} this\n */\nTone.TickSource.prototype.forEachTickBetween = function(startTime, endTime, callback){\n\n\t//only iterate through the sections where it is \"started\"\n\tvar lastStateEvent = this._state.get(startTime);\n\tthis._state.forEachBetween(startTime, endTime, function(event){\n\t\tif (lastStateEvent.state === Tone.State.Started && event.state !== Tone.State.Started){\n\t\t\tthis.forEachTickBetween(Math.max(lastStateEvent.time, startTime), event.time - this.sampleTime, callback);\n\t\t}\n\t\tlastStateEvent = event;\n\t}.bind(this));\n\n\tstartTime = Math.max(lastStateEvent.time, startTime);\n\n\tif (lastStateEvent.state === Tone.State.Started && this._state){\n\t\t//figure out the difference between the frequency ticks and the \n\t\tvar startTicks = this.frequency.getTicksAtTime(startTime);\n\t\tvar ticksAtStart = this.frequency.getTicksAtTime(lastStateEvent.time);\n\t\tvar diff = startTicks - ticksAtStart;\n\t\tvar offset = diff % 1;\n\t\tif (offset !== 0){\n\t\t\toffset = 1 - offset;\n\t\t}\n\t\tvar nextTickTime = this.frequency.getTimeOfTick(startTicks + offset);\n\t\tvar error = null;\n\t\twhile (nextTickTime < endTime && this._state){\n\t\t\ttry {\n\t\t\t\tcallback(nextTickTime, Math.round(this.getTicksAtTime(nextTickTime)));\n\t\t\t} catch (e){\n\t\t\t\terror = e;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (this._state){\n\t\t\t\tnextTickTime += this.frequency.getDurationOfTicks(1, nextTickTime);\n\t\t\t} \n\t\t}\n\t}\n\n\tif (error){\n\t\tthrow error;\n\t}\n\t\n\treturn this;\n};\n\n/**\n * Clean up\n * @returns {Tone.TickSource} this\n */\nTone.TickSource.prototype.dispose = function(){\n\tTone.Param.prototype.dispose.call(this);\n\tthis._state.dispose();\n\tthis._state = null;\n\tthis._tickOffset.dispose();\n\tthis._tickOffset = null;\n\tthis._writable(\"frequency\");\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\treturn this;\n};\n\nexport default Tone.TickSource;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Abs\";\nimport \"../signal/Subtract\";\nimport \"../signal/Signal\";\nimport \"../type/Type\";\nimport \"../core/Delay\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Follower is a crude envelope follower which will follow\n * the amplitude of an incoming signal. Read more about envelope followers (also known\n * as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Time} [smoothing=0.05] The rate of change of the follower.\n * @example\n * var follower = new Tone.Follower(0.3);\n */\nTone.Follower = function(){\n\n\tvar options = Tone.defaults(arguments, [\"smoothing\"], Tone.Follower);\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(1, 1);\n\n\t/**\n\t * @type {Tone.Abs}\n\t * @private\n\t */\n\tthis._abs = new Tone.Abs();\n\n\t/**\n\t * the lowpass filter which smooths the input\n\t * @type {BiquadFilterNode}\n\t * @private\n\t */\n\tthis._filter = this.context.createBiquadFilter();\n\tthis._filter.type = \"lowpass\";\n\tthis._filter.frequency.value = 0;\n\tthis._filter.Q.value = 0;\n\n\t/**\n\t * @type {Tone.Subtract}\n\t * @private\n\t */\n\tthis._sub = new Tone.Subtract();\n\n\t/**\n\t * delay node to compare change over time\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._delay = new Tone.Delay(this.blockTime);\n\n\t/**\n\t * the smoothing value\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._smoothing = options.smoothing;\n\n\tTone.connect(this.input, this._delay);\n\tTone.connect(this.input, this._sub, 0, 1);\n\tthis._sub.chain(this._abs, this._filter, this.output);\n\n\t//set the smoothing initially\n\tthis.smoothing = options.smoothing;\n};\n\nTone.extend(Tone.Follower, Tone.AudioNode);\n\n/**\n * @static\n * @type {Object}\n */\nTone.Follower.defaults = {\n\t\"smoothing\" : 0.05,\n};\n\n/**\n * The attack time.\n * @memberOf Tone.Follower#\n * @type {Time}\n * @name smoothing\n */\nObject.defineProperty(Tone.Follower.prototype, \"smoothing\", {\n\tget : function(){\n\t\treturn this._smoothing;\n\t},\n\tset : function(smoothing){\n\t\tthis._smoothing = smoothing;\n\t\tthis._filter.frequency.value = Tone.Time(smoothing).toFrequency() * 0.5;\n\t}\n});\n\n/**\n * Borrows the connect method from Signal so that the output can be used\n * as a Tone.Signal control signal.\n * @function\n */\nTone.Follower.prototype.connect = Tone.SignalBase.prototype.connect;\n\n/**\n * dispose\n * @returns {Tone.Follower} this\n */\nTone.Follower.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._filter.disconnect();\n\tthis._filter = null;\n\tthis._delay.dispose();\n\tthis._delay = null;\n\tthis._sub.disconnect();\n\tthis._sub = null;\n\tthis._abs.dispose();\n\tthis._abs = null;\n\treturn this;\n};\n\nexport default Tone.Follower;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/ScaleExp\";\nimport \"../signal/Signal\";\nimport \"../core/Param\";\nimport \"../core/Delay\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Comb filters are basic building blocks for physical modeling. Read more\n * about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Time|Object} [delayTime] The delay time of the filter.\n * @param {NormalRange=} resonance The amount of feedback the filter has.\n */\nTone.FeedbackCombFilter = function(){\n\n\tvar options = Tone.defaults(arguments, [\"delayTime\", \"resonance\"], Tone.FeedbackCombFilter);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * the delay node\n\t * @type {DelayNode}\n\t * @private\n\t */\n\tthis._delay = this.input = this.output = new Tone.Delay(options.delayTime);\n\n\t/**\n\t * The amount of delay of the comb filter.\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.delayTime = this._delay.delayTime;\n\n\t/**\n\t * the feedback node\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis._feedback = new Tone.Gain(options.resonance, Tone.Type.NormalRange);\n\n\t/**\n\t * The amount of feedback of the delayed signal.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.resonance = this._feedback.gain;\n\n\tthis._delay.chain(this._feedback, this._delay);\n\tthis._readOnly([\"resonance\", \"delayTime\"]);\n};\n\nTone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);\n\n/**\n * the default parameters\n * @static\n * @const\n * @type {Object}\n */\nTone.FeedbackCombFilter.defaults = {\n\t\"delayTime\" : 0.1,\n\t\"resonance\" : 0.5\n};\n\n/**\n * clean up\n * @returns {Tone.FeedbackCombFilter} this\n */\nTone.FeedbackCombFilter.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"resonance\", \"delayTime\"]);\n\tthis._delay.dispose();\n\tthis._delay = null;\n\tthis.delayTime = null;\n\tthis._feedback.dispose();\n\tthis._feedback = null;\n\tthis.resonance = null;\n\treturn this;\n};\n\nexport default Tone.FeedbackCombFilter;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Filter\";\nimport \"../signal/Signal\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Split the incoming signal into three bands (low, mid, high)\n * with two crossover frequency controls.\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency\n * @param {Frequency} [highFrequency] the mid/high crossover frequency\n */\nTone.MultibandSplit = function(){\n\n\tvar options = Tone.defaults(arguments, [\"lowFrequency\", \"highFrequency\"], Tone.MultibandSplit);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * the input\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis.input = new Tone.Gain();\n\n\t/**\n\t * the outputs\n\t * @type {Array}\n\t * @private\n\t */\n\tthis.output = new Array(3);\n\n\t/**\n\t * The low band. Alias for output[0]
\n\t * @type {Tone.Filter}\n\t */\n\tthis.low = this.output[0] = new Tone.Filter(0, \"lowpass\");\n\n\t/**\n\t * the lower filter of the mid band\n\t * @type {Tone.Filter}\n\t * @private\n\t */\n\tthis._lowMidFilter = new Tone.Filter(0, \"highpass\");\n\n\t/**\n\t * The mid band output. Alias for output[1]
\n\t * @type {Tone.Filter}\n\t */\n\tthis.mid = this.output[1] = new Tone.Filter(0, \"lowpass\");\n\n\t/**\n\t * The high band output. Alias for output[2]
\n\t * @type {Tone.Filter}\n\t */\n\tthis.high = this.output[2] = new Tone.Filter(0, \"highpass\");\n\n\t/**\n\t * The low/mid crossover frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.lowFrequency = new Tone.Signal(options.lowFrequency, Tone.Type.Frequency);\n\n\t/**\n\t * The mid/high crossover frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.highFrequency = new Tone.Signal(options.highFrequency, Tone.Type.Frequency);\n\n\t/**\n\t * The quality of all the filters\n\t * @type {Number}\n\t * @signal\n\t */\n\tthis.Q = new Tone.Signal(options.Q);\n\n\tthis.input.fan(this.low, this.high);\n\tthis.input.chain(this._lowMidFilter, this.mid);\n\t//the frequency control signal\n\tthis.lowFrequency.connect(this.low.frequency);\n\tthis.lowFrequency.connect(this._lowMidFilter.frequency);\n\tthis.highFrequency.connect(this.mid.frequency);\n\tthis.highFrequency.connect(this.high.frequency);\n\t//the Q value\n\tthis.Q.connect(this.low.Q);\n\tthis.Q.connect(this._lowMidFilter.Q);\n\tthis.Q.connect(this.mid.Q);\n\tthis.Q.connect(this.high.Q);\n\n\tthis._readOnly([\"high\", \"mid\", \"low\", \"highFrequency\", \"lowFrequency\"]);\n};\n\nTone.extend(Tone.MultibandSplit, Tone.AudioNode);\n\n/**\n * @private\n * @static\n * @type {Object}\n */\nTone.MultibandSplit.defaults = {\n\t\"lowFrequency\" : 400,\n\t\"highFrequency\" : 2500,\n\t\"Q\" : 1,\n};\n\n/**\n * Clean up.\n * @returns {Tone.MultibandSplit} this\n */\nTone.MultibandSplit.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"high\", \"mid\", \"low\", \"highFrequency\", \"lowFrequency\"]);\n\tthis.low.dispose();\n\tthis.low = null;\n\tthis._lowMidFilter.dispose();\n\tthis._lowMidFilter = null;\n\tthis.mid.dispose();\n\tthis.mid = null;\n\tthis.high.dispose();\n\tthis.high = null;\n\tthis.lowFrequency.dispose();\n\tthis.lowFrequency = null;\n\tthis.highFrequency.dispose();\n\tthis.highFrequency = null;\n\tthis.Q.dispose();\n\tthis.Q = null;\n\treturn this;\n};\n\nexport default Tone.MultibandSplit;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\n\n/**\n * @class Pow applies an exponent to the incoming signal. The incoming signal\n * must be AudioRange.\n *\n * @extends {Tone.SignalBase}\n * @constructor\n * @param {Positive} exp The exponent to apply to the incoming signal, must be at least 2. \n * @example\n * var pow = new Tone.Pow(2);\n * var sig = new Tone.Signal(0.5).connect(pow);\n * //output of pow is 0.25. \n */\nTone.Pow = function(exp){\n\n\tTone.SignalBase.call(this);\n\t\n\t/**\n\t * the exponent\n\t * @private\n\t * @type {number}\n\t */\n\tthis._exp = Tone.defaultArg(exp, 1);\n\n\t/**\n\t * @type {WaveShaperNode}\n\t * @private\n\t */\n\tthis._expScaler = this.input = this.output = new Tone.WaveShaper(this._expFunc(this._exp), 8192);\n};\n\nTone.extend(Tone.Pow, Tone.SignalBase);\n\n/**\n * The value of the exponent.\n * @memberOf Tone.Pow#\n * @type {number}\n * @name value\n */\nObject.defineProperty(Tone.Pow.prototype, \"value\", {\n\tget : function(){\n\t\treturn this._exp;\n\t},\n\tset : function(exp){\n\t\tthis._exp = exp;\n\t\tthis._expScaler.setMap(this._expFunc(this._exp));\n\t}\n});\n\n/**\n * the function which maps the waveshaper\n * @param {number} exp\n * @return {function}\n * @private\n */\nTone.Pow.prototype._expFunc = function(exp){\n\treturn function(val){\n\t\treturn Math.pow(Math.abs(val), exp);\n\t};\n};\n\n/**\n * Clean up.\n * @returns {Tone.Pow} this\n */\nTone.Pow.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._expScaler.dispose();\n\tthis._expScaler = null;\n\treturn this;\n};\n\nexport default Tone.Pow;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * @class Tone.TimeBase is a flexible encoding of time\n * which can be evaluated to and from a string.\n * @extends {Tone}\n * @param {Time} val The time value as a number, string or object\n * @param {String=} units Unit values\n * @example\n * Tone.TimeBase(4, \"n\")\n * Tone.TimeBase(2, \"t\")\n * Tone.TimeBase(\"2t\")\n * Tone.TimeBase({\"2t\" : 2})\n * Tone.TimeBase(\"2t\") + Tone.TimeBase(\"4n\");\n */\nTone.TimeBase = function(val, units){\n\n\t//allows it to be constructed with or without 'new'\n\tif (this instanceof Tone.TimeBase){\n\n\t\t/**\n\t\t * The value\n\t\t * @type {Number|String|Tone.TimeBase}\n\t\t * @private\n\t\t */\n\t\tthis._val = val;\n\n\t\t/**\n\t\t * The units\n\t\t * @type {String?}\n\t\t * @private\n\t\t */\n\t\tthis._units = units;\n\n\t\t//test if the value is a string representation of a number\n\t\tif (Tone.isUndef(this._units) && Tone.isString(this._val) &&\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tparseFloat(this._val) == this._val && this._val.charAt(0) !== \"+\"){\n\t\t\tthis._val = parseFloat(this._val);\n\t\t\tthis._units = this._defaultUnits;\n\t\t} else if (val && val.constructor === this.constructor){\n\t\t\t//if they're the same type, just copy values over\n\t\t\tthis._val = val._val;\n\t\t\tthis._units = val._units;\n\t\t} else if (val instanceof Tone.TimeBase){\n\t\t\tswitch (this._defaultUnits){\n\t\t\t\tcase \"s\" :\n\t\t\t\t\tthis._val = val.toSeconds();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"i\" :\n\t\t\t\t\tthis._val = val.toTicks();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"hz\" :\n\t\t\t\t\tthis._val = val.toFrequency();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"midi\" :\n\t\t\t\t\tthis._val = val.toMidi();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"Unrecognized default units \"+this._defaultUnits);\n\t\t\t}\n\t\t}\n\n\t} else {\n\n\t\treturn new Tone.TimeBase(val, units);\n\t}\n};\n\nTone.extend(Tone.TimeBase);\n\n///////////////////////////////////////////////////////////////////////////\n//\tABSTRACT SYNTAX TREE PARSER\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * All the primary expressions.\n * @private\n * @type {Object}\n */\nTone.TimeBase.prototype._expressions = {\n\t\"n\" : {\n\t\tregexp : /^(\\d+)n(\\.?)$/i,\n\t\tmethod : function(value, dot){\n\t\t\tvalue = parseInt(value);\n\t\t\tvar scalar = dot === \".\" ? 1.5 : 1;\n\t\t\tif (value === 1){\n\t\t\t\treturn this._beatsToUnits(this._getTimeSignature())*scalar;\n\t\t\t} else {\n\t\t\t\treturn this._beatsToUnits(4 / value)*scalar;\n\t\t\t}\n\t\t}\n\t},\n\t\"t\" : {\n\t\tregexp : /^(\\d+)t$/i,\n\t\tmethod : function(value){\n\t\t\tvalue = parseInt(value);\n\t\t\treturn this._beatsToUnits(8 / (parseInt(value) * 3));\n\t\t}\n\t},\n\t\"m\" : {\n\t\tregexp : /^(\\d+)m$/i,\n\t\tmethod : function(value){\n\t\t\treturn this._beatsToUnits(parseInt(value) * this._getTimeSignature());\n\t\t}\n\t},\n\t\"i\" : {\n\t\tregexp : /^(\\d+)i$/i,\n\t\tmethod : function(value){\n\t\t\treturn this._ticksToUnits(parseInt(value));\n\t\t}\n\t},\n\t\"hz\" : {\n\t\tregexp : /^(\\d+(?:\\.\\d+)?)hz$/i,\n\t\tmethod : function(value){\n\t\t\treturn this._frequencyToUnits(parseFloat(value));\n\t\t}\n\t},\n\t\"tr\" : {\n\t\tregexp : /^(\\d+(?:\\.\\d+)?):(\\d+(?:\\.\\d+)?):?(\\d+(?:\\.\\d+)?)?$/,\n\t\tmethod : function(m, q, s){\n\t\t\tvar total = 0;\n\t\t\tif (m && m !== \"0\"){\n\t\t\t\ttotal += this._beatsToUnits(this._getTimeSignature() * parseFloat(m));\n\t\t\t}\n\t\t\tif (q && q !== \"0\"){\n\t\t\t\ttotal += this._beatsToUnits(parseFloat(q));\n\t\t\t}\n\t\t\tif (s && s !== \"0\"){\n\t\t\t\ttotal += this._beatsToUnits(parseFloat(s) / 4);\n\t\t\t}\n\t\t\treturn total;\n\t\t}\n\t},\n\t\"s\" : {\n\t\tregexp : /^(\\d+(?:\\.\\d+)?)s$/,\n\t\tmethod : function(value){\n\t\t\treturn this._secondsToUnits(parseFloat(value));\n\t\t}\n\t},\n\t\"samples\" : {\n\t\tregexp : /^(\\d+)samples$/,\n\t\tmethod : function(value){\n\t\t\treturn parseInt(value) / this.context.sampleRate;\n\t\t}\n\t},\n\t\"default\" : {\n\t\tregexp : /^(\\d+(?:\\.\\d+)?)$/,\n\t\tmethod : function(value){\n\t\t\treturn this._expressions[this._defaultUnits].method.call(this, value);\n\t\t}\n\t}\n};\n\n/**\n * The default units if none are given.\n * @type {String}\n * @private\n */\nTone.TimeBase.prototype._defaultUnits = \"s\";\n\n///////////////////////////////////////////////////////////////////////////\n//\tTRANSPORT FALLBACKS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Return the bpm, or 120 if Transport is not available\n * @type {Number}\n * @private\n */\nTone.TimeBase.prototype._getBpm = function(){\n\tif (Tone.Transport){\n\t\treturn Tone.Transport.bpm.value;\n\t} else {\n\t\treturn 120;\n\t}\n};\n\n/**\n * Return the timeSignature or 4 if Transport is not available\n * @type {Number}\n * @private\n */\nTone.TimeBase.prototype._getTimeSignature = function(){\n\tif (Tone.Transport){\n\t\treturn Tone.Transport.timeSignature;\n\t} else {\n\t\treturn 4;\n\t}\n};\n\n/**\n * Return the PPQ or 192 if Transport is not available\n * @type {Number}\n * @private\n */\nTone.TimeBase.prototype._getPPQ = function(){\n\tif (Tone.Transport){\n\t\treturn Tone.Transport.PPQ;\n\t} else {\n\t\treturn 192;\n\t}\n};\n\n/**\n * Return the current time in whichever context is relevant\n * @type {Number}\n * @private\n */\nTone.TimeBase.prototype._now = function(){\n\treturn this.now();\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tUNIT CONVERSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Returns the value of a frequency in the current units\n * @param {Frequency} freq\n * @return {Number}\n * @private\n */\nTone.TimeBase.prototype._frequencyToUnits = function(freq){\n\treturn 1/freq;\n};\n\n/**\n * Return the value of the beats in the current units\n * @param {Number} beats\n * @return {Number}\n * @private\n */\nTone.TimeBase.prototype._beatsToUnits = function(beats){\n\treturn (60 / this._getBpm()) * beats;\n};\n\n/**\n * Returns the value of a second in the current units\n * @param {Seconds} seconds\n * @return {Number}\n * @private\n */\nTone.TimeBase.prototype._secondsToUnits = function(seconds){\n\treturn seconds;\n};\n\n/**\n * Returns the value of a tick in the current time units\n * @param {Ticks} ticks\n * @return {Number}\n * @private\n */\nTone.TimeBase.prototype._ticksToUnits = function(ticks){\n\treturn ticks * (this._beatsToUnits(1) / this._getPPQ());\n};\n\n/**\n * With no arguments, return 'now'\n * @return {Number}\n * @private\n */\nTone.TimeBase.prototype._noArg = function(){\n\treturn this._now();\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tEXPRESSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Evaluate the time value. Returns the time\n * in seconds.\n * @return {Seconds}\n */\nTone.TimeBase.prototype.valueOf = function(){\n\tif (Tone.isUndef(this._val)){\n\t\treturn this._noArg();\n\t} else if (Tone.isString(this._val) && Tone.isUndef(this._units)){\n\t\tfor (var units in this._expressions){\n\t\t\tif (this._expressions[units].regexp.test(this._val.trim())){\n\t\t\t\tthis._units = units;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} else if (Tone.isObject(this._val)){\n\t\tvar total = 0;\n\t\tfor (var typeName in this._val){\n\t\t\tvar quantity = this._val[typeName];\n\t\t\tvar time = (new this.constructor(typeName)).valueOf() * quantity;\n\t\t\ttotal += time;\n\t\t}\n\t\treturn total;\n\t}\n\tif (Tone.isDefined(this._units)){\n\t\tvar expr = this._expressions[this._units];\n\t\tvar matching = this._val.toString().trim().match(expr.regexp);\n\t\tif (matching){\n\t\t\treturn expr.method.apply(this, matching.slice(1));\n\t\t} else {\n\t\t\treturn expr.method.call(this, parseFloat(this._val));\n\t\t}\n\t} else {\n\t\treturn this._val;\n\t}\n};\n\n/**\n * Return the value in seconds\n * @return {Seconds}\n */\nTone.TimeBase.prototype.toSeconds = function(){\n\treturn this.valueOf();\n};\n\n/**\n * Return the value in hertz\n * @return {Frequency}\n */\nTone.TimeBase.prototype.toFrequency = function(){\n\treturn 1 / this.toSeconds();\n};\n\n/**\n * Return the time in samples\n * @return {Samples}\n */\nTone.TimeBase.prototype.toSamples = function(){\n\treturn this.toSeconds() * this.context.sampleRate;\n};\n\n/**\n * Return the time in milliseconds.\n * @return {Milliseconds}\n */\nTone.TimeBase.prototype.toMilliseconds = function(){\n\treturn this.toSeconds() * 1000;\n};\n\n/**\n * Clean up\n * @return {Tone.TimeBase} this\n */\nTone.TimeBase.prototype.dispose = function(){\n\tthis._val = null;\n\tthis._units = null;\n};\n\nexport default Tone.TimeBase;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/TimeBase\";\nimport \"../type/Frequency\";\n\n/**\n * @class Tone.Time is a primitive type for encoding Time values.\n * Tone.Time can be constructed with or without the `new` keyword. Tone.Time can be passed\n * into the parameter of any method which takes time as an argument.\n * @constructor\n * @extends {Tone.TimeBase}\n * @param {String|Number|Object} val The time value.\n * @param {String=} units The units of the value.\n * @example\n * var t = Tone.Time(\"4n\");//a quarter note\n */\nTone.Time = function(val, units){\n\tif (this instanceof Tone.Time){\n\n\t\tTone.TimeBase.call(this, val, units);\n\n\t} else {\n\t\treturn new Tone.Time(val, units);\n\t}\n};\n\nTone.extend(Tone.Time, Tone.TimeBase);\n\n/**\n * Extend the base expressions\n */\nTone.Time.prototype._expressions = Object.assign({}, Tone.TimeBase.prototype._expressions, {\n\t\"quantize\" : {\n\t\tregexp : /^@(.+)/,\n\t\tmethod : function(capture){\n\t\t\tif (Tone.Transport){\n\t\t\t\tvar quantTo = new this.constructor(capture);\n\t\t\t\treturn this._secondsToUnits(Tone.Transport.nextSubdivision(quantTo));\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t},\n\t\"now\" : {\n\t\tregexp : /^\\+(.+)/,\n\t\tmethod : function(capture){\n\t\t\treturn this._now() + (new this.constructor(capture));\n\t\t}\n\t}\n});\n\n/**\n * Quantize the time by the given subdivision. Optionally add a\n * percentage which will move the time value towards the ideal\n * quantized value by that percentage.\n * @param {Number|Time} val The subdivision to quantize to\n * @param {NormalRange} [percent=1] Move the time value\n * towards the quantized value by\n * a percentage.\n * @return {Number} this\n * @example\n * Tone.Time(21).quantize(2) //returns 22\n * Tone.Time(0.6).quantize(\"4n\", 0.5) //returns 0.55\n */\nTone.Time.prototype.quantize = function(subdiv, percent){\n\tpercent = Tone.defaultArg(percent, 1);\n\tvar subdivision = new this.constructor(subdiv);\n\tvar value = this.valueOf();\n\tvar multiple = Math.round(value / subdivision);\n\tvar ideal = multiple * subdivision;\n\tvar diff = ideal - value;\n\treturn value + diff * percent;\n};\n\n///////////////////////////////////////////////////////////////////////////\n// CONVERSIONS\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Convert a Time to Notation. The notation values are will be the\n * closest representation between 1m to 128th note.\n * @return {Notation}\n * @example\n * //if the Transport is at 120bpm:\n * Tone.Time(2).toNotation();//returns \"1m\"\n */\nTone.Time.prototype.toNotation = function(){\n\tvar time = this.toSeconds();\n\tvar testNotations = [\"1m\"];\n\tfor (var power = 1; power < 8; power++){\n\t\tvar subdiv = Math.pow(2, power);\n\t\ttestNotations.push(subdiv + \"n.\");\n\t\ttestNotations.push(subdiv + \"n\");\n\t\ttestNotations.push(subdiv + \"t\");\n\t}\n\ttestNotations.push(\"0\");\n\t//find the closets notation representation\n\tvar closest = testNotations[0];\n\tvar closestSeconds = Tone.Time(testNotations[0]).toSeconds();\n\ttestNotations.forEach(function(notation){\n\t\tvar notationSeconds = Tone.Time(notation).toSeconds();\n\t\tif (Math.abs(notationSeconds - time) < Math.abs(closestSeconds - time)){\n\t\t\tclosest = notation;\n\t\t\tclosestSeconds = notationSeconds;\n\t\t}\n\t});\n\treturn closest;\n};\n\n/**\n * Return the time encoded as Bars:Beats:Sixteenths.\n * @return {BarsBeatsSixteenths}\n */\nTone.Time.prototype.toBarsBeatsSixteenths = function(){\n\tvar quarterTime = this._beatsToUnits(1);\n\tvar quarters = this.valueOf() / quarterTime;\n\tquarters = parseFloat(quarters.toFixed(4));\n\tvar measures = Math.floor(quarters / this._getTimeSignature());\n\tvar sixteenths = (quarters % 1) * 4;\n\tquarters = Math.floor(quarters) % this._getTimeSignature();\n\tsixteenths = sixteenths.toString();\n\tif (sixteenths.length > 3){\n\t\t// the additional parseFloat removes insignificant trailing zeroes\n\t\tsixteenths = parseFloat(parseFloat(sixteenths).toFixed(3));\n\t}\n\tvar progress = [measures, quarters, sixteenths];\n\treturn progress.join(\":\");\n};\n\n/**\n * Return the time in ticks.\n * @return {Ticks}\n */\nTone.Time.prototype.toTicks = function(){\n\tvar quarterTime = this._beatsToUnits(1);\n\tvar quarters = this.valueOf() / quarterTime;\n\treturn Math.round(quarters * this._getPPQ());\n};\n\n/**\n * Return the time in seconds.\n * @return {Seconds}\n */\nTone.Time.prototype.toSeconds = function(){\n\treturn this.valueOf();\n};\n\n/**\n * Return the value as a midi note.\n * @return {Midi}\n */\nTone.Time.prototype.toMidi = function(){\n\treturn Tone.Frequency.ftom(this.toFrequency());\n};\n\nexport default Tone.Time;\n\n","import Tone from \"../core/Tone\";\n\nif (Tone.supported){\n\tif (!OscillatorNode.prototype.setPeriodicWave){\n\t\tOscillatorNode.prototype.setPeriodicWave = OscillatorNode.prototype.setWaveTable;\n\t}\n\tif (!AudioContext.prototype.createPeriodicWave){\n\t\tAudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\n\t}\n}\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Buffer\";\nimport \"../source/Source\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\nimport \"../shim/OscillatorNode\";\n\n/**\n * @class Wrapper around the native fire-and-forget OscillatorNode. Adds the\n * ability to reschedule the stop method. ***[Tone.Oscillator](Oscillator) is better \n * for most use-cases***\n * @extends {Tone.AudioNode}\n * @param {AudioBuffer|Tone.Buffer} buffer The buffer to play\n * @param {Function} onload The callback to invoke when the\n * buffer is done playing.\n */\nTone.OscillatorNode = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\"], Tone.OscillatorNode);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The callback to invoke after the\n\t * buffer source is done playing.\n\t * @type {Function}\n\t */\n\tthis.onended = options.onended;\n\n\t/**\n\t * The oscillator start time\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._startTime = -1;\n\n\t/**\n\t * The oscillator stop time\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._stopTime = -1;\n\n\t/**\n\t * The gain node which envelopes the OscillatorNode\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._gainNode = this.output = new Tone.Gain(0);\n\n\t/**\n\t * The oscillator\n\t * @type {OscillatorNode}\n\t * @private\n\t */\n\tthis._oscillator = this.context.createOscillator();\n\tTone.connect(this._oscillator, this._gainNode);\n\tthis.type = options.type;\n\n\t/**\n\t * The frequency of the oscillator\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Param({\n\t\tparam : this._oscillator.frequency, \n\t\tunits : Tone.Type.Frequency,\n\t\tvalue : options.frequency\n\t});\n\n\t/**\n\t * The detune of the oscillator\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Param({\n\t\tparam : this._oscillator.detune,\n\t\tunits : Tone.Type.Cents,\n\t\tvalue : options.detune\n\t});\n\n\t/**\n\t * The value that the buffer ramps to\n\t * @type {Gain}\n\t * @private\n\t */\n\tthis._gain = 1;\n};\n\nTone.extend(Tone.OscillatorNode, Tone.AudioNode);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.OscillatorNode.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"type\" : \"sine\",\n\t\"onended\" : Tone.noOp\n};\n\n/**\n * Returns the playback state of the oscillator, either \"started\" or \"stopped\".\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.OscillatorNode#\n * @name state\n */\nObject.defineProperty(Tone.OscillatorNode.prototype, \"state\", {\n\tget : function(){\n\t\treturn this.getStateAtTime(this.now());\n\t}\n});\n\n/**\n * Get the playback state at the given time\n * @param {Time} time The time to test the state at\n * @return {Tone.State} The playback state. \n */\nTone.OscillatorNode.prototype.getStateAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tif (this._startTime !== -1 && time >= this._startTime && (this._stopTime === -1 || time <= this._stopTime)){\n\t\treturn Tone.State.Started;\n\t} else {\n\t\treturn Tone.State.Stopped;\n\t}\n};\n\n/**\n * Start the oscillator node at the given time\n * @param {Time=} time When to start the oscillator\n * @return {OscillatorNode} this\n */\nTone.OscillatorNode.prototype.start = function(time){\n\tthis.log(\"start\", time);\n\tif (this._startTime === -1){\n\t\tthis._startTime = this.toSeconds(time);\n\t\tthis._startTime = Math.max(this._startTime, this.context.currentTime);\n\t\tthis._oscillator.start(this._startTime);\n\t\tthis._gainNode.gain.setValueAtTime(1, this._startTime);\n\t} else {\n\t\tthrow new Error(\"cannot call OscillatorNode.start more than once\");\n\t}\n\treturn this;\n};\n\n/**\n * Sets an arbitrary custom periodic waveform given a PeriodicWave.\n * @param {PeriodicWave} periodicWave PeriodicWave should be created with context.createPeriodicWave\n * @return {OscillatorNode} this\n */\nTone.OscillatorNode.prototype.setPeriodicWave = function(periodicWave){\n\tthis._oscillator.setPeriodicWave(periodicWave);\n\treturn this;\n};\n\n/**\n * Stop the oscillator node at the given time\n * @param {Time=} time When to stop the oscillator\n * @return {OscillatorNode} this\n */\nTone.OscillatorNode.prototype.stop = function(time){\n\tthis.log(\"stop\", time);\n\tthis.assert(this._startTime !== -1, \"'start' must be called before 'stop'\");\n\t//cancel the previous stop\n\tthis.cancelStop();\n\t//reschedule it\n\tthis._stopTime = this.toSeconds(time);\n\tthis._stopTime = Math.max(this._stopTime, this.context.currentTime);\n\tif (this._stopTime > this._startTime){\n\t\tthis._gainNode.gain.setValueAtTime(0, this._stopTime);\n\t\tthis.context.clearTimeout(this._timeout);\n\t\tthis._timeout = this.context.setTimeout(function(){\n\t\t\tthis._oscillator.stop(this.now());\n\t\t\tthis.onended();\n\t\t\t//disconnect the object when it's ended\n\t\t\tsetTimeout(function(){\n\t\t\t\tif (this._oscillator){\n\t\t\t\t\tthis._oscillator.disconnect();\n\t\t\t\t\tthis._gainNode.disconnect();\n\t\t\t\t}\n\t\t\t}.bind(this), 100);\n\t\t}.bind(this), this._stopTime - this.context.currentTime);\n\t} else {\n\t\t//cancel the stop envelope\n\t\tthis._gainNode.gain.cancelScheduledValues(this._startTime);\n\t}\n\treturn this;\n};\n\n/**\n * Cancel a scheduled stop event\n * @return {Tone.OscillatorNode} this\n */\nTone.OscillatorNode.prototype.cancelStop = function(){\n\tif (this._startTime !== -1){\n\t\t//cancel the stop envelope\n\t\tthis._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime);\n\t\tthis.context.clearTimeout(this._timeout);\n\t\tthis._stopTime = -1;\n\t}\n\treturn this;\n};\n\n/**\n * The oscillator type. Either 'sine', 'sawtooth', 'square', or 'triangle'\n * @memberOf Tone.OscillatorNode#\n * @type {Time}\n * @name type\n */\nObject.defineProperty(Tone.OscillatorNode.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._oscillator.type;\n\t},\n\tset : function(type){\n\t\tthis._oscillator.type = type;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.OscillatorNode} this\n */\nTone.OscillatorNode.prototype.dispose = function(){\n\tif (!this._wasDisposed){\n\t\tthis._wasDisposed = true;\n\t\tthis.context.clearTimeout(this._timeout);\n\t\tTone.AudioNode.prototype.dispose.call(this);\n\t\tthis.onended = null;\n\t\tthis._oscillator.disconnect();\n\t\tthis._oscillator = null;\n\t\tthis._gainNode.dispose();\n\t\tthis._gainNode = null;\n\t\tthis.frequency.dispose();\n\t\tthis.frequency = null;\n\t\tthis.detune.dispose();\n\t\tthis.detune = null;\n\t}\n\treturn this;\n};\n\nexport default Tone.OscillatorNode;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Buffer\";\nimport \"../source/Source\";\nimport \"../source/TickSource\";\nimport \"../source/BufferSource\";\n\n/**\n * @class Tone.Player is an audio file player with start, loop, and stop functions.\n *\n * @constructor\n * @extends {Tone.Source}\n * @param {string|AudioBuffer} url Either the AudioBuffer or the url from\n * which to load the AudioBuffer\n * @param {Function=} onload The function to invoke when the buffer is loaded.\n * Recommended to use Tone.Buffer.on('load') instead.\n * @example\n * var player = new Tone.Player(\"./path/to/sample.mp3\").toMaster();\n * //play as soon as the buffer is loaded\n * player.autostart = true;\n */\nTone.Player = function(url){\n\n\tvar options;\n\tif (url instanceof Tone.Buffer && url.loaded){\n\t\turl = url.get();\n\t\toptions = Tone.Player.defaults;\n\t} else {\n\t\toptions = Tone.defaults(arguments, [\"url\", \"onload\"], Tone.Player);\n\t}\n\tTone.Source.call(this, options);\n\n\t/**\n\t * If the file should play as soon\n\t * as the buffer is loaded.\n\t * @type {Boolean}\n\t * @example\n\t * //will play as soon as it's loaded\n\t * var player = new Tone.Player({\n\t * \t\"url\" : \"./path/to/sample.mp3\",\n\t * \t\"autostart\" : true,\n\t * }).toMaster();\n\t */\n\tthis.autostart = options.autostart;\n\n\t/**\n\t * the buffer\n\t * @private\n\t * @type {Tone.Buffer}\n\t */\n\tthis._buffer = new Tone.Buffer({\n\t\t\"url\" : options.url,\n\t\t\"onload\" : this._onload.bind(this, options.onload),\n\t\t\"reverse\" : options.reverse\n\t});\n\tif (url instanceof AudioBuffer){\n\t\tthis._buffer.set(url);\n\t}\n\n\t/**\n\t * if the buffer should loop once it's over\n\t * @type {Boolean}\n\t * @private\n\t */\n\tthis._loop = options.loop;\n\n\t/**\n\t * if 'loop' is true, the loop will start at this position\n\t * @type {Time}\n\t * @private\n\t */\n\tthis._loopStart = options.loopStart;\n\n\t/**\n\t * if 'loop' is true, the loop will end at this position\n\t * @type {Time}\n\t * @private\n\t */\n\tthis._loopEnd = options.loopEnd;\n\n\t/**\n\t * the playback rate\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._playbackRate = options.playbackRate;\n\n\t/**\n\t * All of the active buffer source nodes\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._activeSources = [];\n\n\t/**\n\t * The fadeIn time of the amplitude envelope.\n\t * @type {Time}\n\t */\n\tthis.fadeIn = options.fadeIn;\n\n\t/**\n\t * The fadeOut time of the amplitude envelope.\n\t * @type {Time}\n\t */\n\tthis.fadeOut = options.fadeOut;\n};\n\nTone.extend(Tone.Player, Tone.Source);\n\n/**\n * the default parameters\n * @static\n * @const\n * @type {Object}\n */\nTone.Player.defaults = {\n\t\"onload\" : Tone.noOp,\n\t\"playbackRate\" : 1,\n\t\"loop\" : false,\n\t\"autostart\" : false,\n\t\"loopStart\" : 0,\n\t\"loopEnd\" : 0,\n\t\"reverse\" : false,\n\t\"fadeIn\" : 0,\n\t\"fadeOut\" : 0\n};\n\n/**\n * Load the audio file as an audio buffer.\n * Decodes the audio asynchronously and invokes\n * the callback once the audio buffer loads.\n * Note: this does not need to be called if a url\n * was passed in to the constructor. Only use this\n * if you want to manually load a new url.\n * @param {string} url The url of the buffer to load.\n * Filetype support depends on the\n * browser.\n * @param {Function=} callback The function to invoke once\n * the sample is loaded.\n * @returns {Promise}\n */\nTone.Player.prototype.load = function(url, callback){\n\treturn this._buffer.load(url, this._onload.bind(this, callback));\n};\n\n/**\n * Internal callback when the buffer is loaded.\n * @private\n */\nTone.Player.prototype._onload = function(callback){\n\tcallback = Tone.defaultArg(callback, Tone.noOp);\n\tcallback(this);\n\tif (this.autostart){\n\t\tthis.start();\n\t}\n};\n\n/**\n * Internal callback when the buffer is done playing.\n * @private\n */\nTone.Player.prototype._onSourceEnd = function(source){\n\tvar index = this._activeSources.indexOf(source);\n\tthis._activeSources.splice(index, 1);\n\tif (this._activeSources.length === 0 && !this._synced){\n\t\tthis._state.setStateAtTime(Tone.State.Stopped, Tone.now());\n\t}\n};\n\n/**\n * Play the buffer at the given startTime. Optionally add an offset\n * and/or duration which will play the buffer from a position\n * within the buffer for the given duration.\n *\n * @param {Time} [startTime=now] When the player should start.\n * @param {Time} [offset=0] The offset from the beginning of the sample\n * to start at.\n * @param {Time=} duration How long the sample should play. If no duration\n * is given, it will default to the full length\n * of the sample (minus any offset)\n * @returns {Tone.Player} this\n * @memberOf Tone.Player#\n * @method start\n * @name start\n */\n\n/**\n * Internal start method\n * @private\n */\nTone.Player.prototype._start = function(startTime, offset, duration){\n\t//if it's a loop the default offset is the loopstart point\n\tif (this._loop){\n\t\toffset = Tone.defaultArg(offset, this._loopStart);\n\t} else {\n\t\t//otherwise the default offset is 0\n\t\toffset = Tone.defaultArg(offset, 0);\n\t}\n\n\t//compute the values in seconds\n\toffset = this.toSeconds(offset);\n\t\n\t//if it's synced, it should factor in the playback rate for computing the offset\n\tif (this._synced){\n\t\toffset *= this._playbackRate;\n\t}\n\n\t//compute the duration which is either the passed in duration of the buffer.duration - offset\n\tvar computedDuration = Tone.defaultArg(duration, Math.max(this._buffer.duration - offset, 0));\n\tcomputedDuration = this.toSeconds(computedDuration);\n\n\t//scale it by the playback rate\n\tcomputedDuration = computedDuration / this._playbackRate;\n\n\t//get the start time\n\tstartTime = this.toSeconds(startTime);\n\n\t//make the source\n\tvar source = new Tone.BufferSource({\n\t\t\"buffer\" : this._buffer,\n\t\t\"loop\" : this._loop,\n\t\t\"loopStart\" : this._loopStart,\n\t\t\"loopEnd\" : this._loopEnd,\n\t\t\"onended\" : this._onSourceEnd.bind(this),\n\t\t\"playbackRate\" : this._playbackRate,\n\t\t\"fadeIn\" : this.fadeIn,\n\t\t\"fadeOut\" : this.fadeOut,\n\t}).connect(this.output);\n\n\t//set the looping properties\n\tif (!this._loop && !this._synced){\n\t\t//if it's not looping, set the state change at the end of the sample\n\t\tthis._state.setStateAtTime(Tone.State.Stopped, startTime + computedDuration);\n\t}\n\n\t//add it to the array of active sources\n\tthis._activeSources.push(source);\n\n\t//start it\n\tif (this._loop && Tone.isUndef(duration)){\n\t\tsource.start(startTime, offset);\n\t} else {\n\t\t//subtract the fade out time\n\t\tsource.start(startTime, offset, computedDuration - this.toSeconds(this.fadeOut));\n\t}\n\treturn this;\n};\n\n/**\n * Stop playback.\n * @private\n * @param {Time} [time=now]\n * @returns {Tone.Player} this\n */\nTone.Player.prototype._stop = function(time){\n\ttime = this.toSeconds(time);\n\tthis._activeSources.forEach(function(source){\n\t\tsource.stop(time);\n\t});\n\treturn this;\n};\n\n/**\n * Stop and then restart the player from the beginning (or offset)\n * @param {Time} [startTime=now] When the player should start.\n * @param {Time} [offset=0] The offset from the beginning of the sample\n * to start at.\n * @param {Time=} duration How long the sample should play. If no duration\n * is given, it will default to the full length\n * of the sample (minus any offset)\n * @returns {Tone.Player} this\n */\nTone.Player.prototype.restart = function(time, offset, duration){\n\tthis._stop(time);\n\tthis._start(time, offset, duration);\n\treturn this;\n};\n\n/**\n * Seek to a specific time in the player's buffer. If the\n * source is no longer playing at that time, it will stop.\n * If you seek to a time that\n * @param {Time} offset The time to seek to.\n * @param {Time=} time The time for the seek event to occur.\n * @return {Tone.Player} this\n * @example\n * source.start(0.2);\n * source.stop(0.4);\n */\nTone.Player.prototype.seek = function(offset, time){\n\ttime = this.toSeconds(time);\n\tif (this._state.getValueAtTime(time) === Tone.State.Started){\n\t\toffset = this.toSeconds(offset);\n\t\t// if it's currently playing, stop it\n\t\tthis._stop(time);\n\t\t//restart it at the given time\n\t\tthis._start(time, offset);\n\t}\n\treturn this;\n};\n\n/**\n * Set the loop start and end. Will only loop if loop is\n * set to true.\n * @param {Time} loopStart The loop end time\n * @param {Time} loopEnd The loop end time\n * @returns {Tone.Player} this\n * @example\n * //loop 0.1 seconds of the file.\n * player.setLoopPoints(0.2, 0.3);\n * player.loop = true;\n */\nTone.Player.prototype.setLoopPoints = function(loopStart, loopEnd){\n\tthis.loopStart = loopStart;\n\tthis.loopEnd = loopEnd;\n\treturn this;\n};\n\n/**\n * If loop is true, the loop will start at this position.\n * @memberOf Tone.Player#\n * @type {Time}\n * @name loopStart\n */\nObject.defineProperty(Tone.Player.prototype, \"loopStart\", {\n\tget : function(){\n\t\treturn this._loopStart;\n\t},\n\tset : function(loopStart){\n\t\tthis._loopStart = loopStart;\n\t\t//get the current source\n\t\tthis._activeSources.forEach(function(source){\n\t\t\tsource.loopStart = loopStart;\n\t\t});\n\t}\n});\n\n/**\n * If loop is true, the loop will end at this position.\n * @memberOf Tone.Player#\n * @type {Time}\n * @name loopEnd\n */\nObject.defineProperty(Tone.Player.prototype, \"loopEnd\", {\n\tget : function(){\n\t\treturn this._loopEnd;\n\t},\n\tset : function(loopEnd){\n\t\tthis._loopEnd = loopEnd;\n\t\t//get the current source\n\t\tthis._activeSources.forEach(function(source){\n\t\t\tsource.loopEnd = loopEnd;\n\t\t});\n\t}\n});\n\n/**\n * The audio buffer belonging to the player.\n * @memberOf Tone.Player#\n * @type {Tone.Buffer}\n * @name buffer\n */\nObject.defineProperty(Tone.Player.prototype, \"buffer\", {\n\tget : function(){\n\t\treturn this._buffer;\n\t},\n\tset : function(buffer){\n\t\tthis._buffer.set(buffer);\n\t}\n});\n\n/**\n * If the buffer should loop once it's over.\n * @memberOf Tone.Player#\n * @type {Boolean}\n * @name loop\n */\nObject.defineProperty(Tone.Player.prototype, \"loop\", {\n\tget : function(){\n\t\treturn this._loop;\n\t},\n\tset : function(loop){\n\t\t//if no change, do nothing\n\t\tif (this._loop === loop){\n\t\t\treturn;\n\t\t}\n\t\tthis._loop = loop;\n\t\t//set the loop of all of the sources\n\t\tthis._activeSources.forEach(function(source){\n\t\t\tsource.loop = loop;\n\t\t});\n\t\tif (loop){\n\t\t\t//remove the next stopEvent\n\t\t\tvar stopEvent = this._state.getNextState(Tone.State.Stopped, this.now());\n\t\t\tif (stopEvent){\n\t\t\t\tthis._state.cancel(stopEvent.time);\n\t\t\t}\n\t\t}\n\t}\n});\n\n/**\n * The playback speed. 1 is normal speed. This is not a signal because\n * Safari and iOS currently don't support playbackRate as a signal.\n * @memberOf Tone.Player#\n * @type {Number}\n * @name playbackRate\n */\nObject.defineProperty(Tone.Player.prototype, \"playbackRate\", {\n\tget : function(){\n\t\treturn this._playbackRate;\n\t},\n\tset : function(rate){\n\t\tthis._playbackRate = rate;\n\t\tvar now = this.now();\n\n\t\t//cancel the stop event since it's at a different time now\n\t\tvar stopEvent = this._state.getNextState(Tone.State.Stopped, now);\n\t\tif (stopEvent){\n\t\t\tthis._state.cancel(stopEvent.time);\n\t\t}\n\n\t\t//set all the sources\n\t\tthis._activeSources.forEach(function(source){\n\t\t\tsource.cancelStop();\n\t\t\tsource.playbackRate.setValueAtTime(rate, now);\n\t\t});\n\t}\n});\n\n/**\n * The direction the buffer should play in\n * @memberOf Tone.Player#\n * @type {Boolean}\n * @name reverse\n */\nObject.defineProperty(Tone.Player.prototype, \"reverse\", {\n\tget : function(){\n\t\treturn this._buffer.reverse;\n\t},\n\tset : function(rev){\n\t\tthis._buffer.reverse = rev;\n\t}\n});\n\n/**\n * If all the buffer is loaded\n * @memberOf Tone.Player#\n * @type {Boolean}\n * @name loaded\n * @readOnly\n */\nObject.defineProperty(Tone.Player.prototype, \"loaded\", {\n\tget : function(){\n\t\treturn this._buffer.loaded;\n\t}\n});\n\n/**\n * Dispose and disconnect.\n * @return {Tone.Player} this\n */\nTone.Player.prototype.dispose = function(){\n\t//disconnect all of the players\n\tthis._activeSources.forEach(function(source){\n\t\tsource.dispose();\n\t});\n\tthis._activeSources = null;\n\tTone.Source.prototype.dispose.call(this);\n\tthis._buffer.dispose();\n\tthis._buffer = null;\n\treturn this;\n};\n\nexport default Tone.Player;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/AmplitudeEnvelope\";\nimport \"../component/FrequencyEnvelope\";\nimport \"../source/OmniOscillator\";\nimport \"../signal/Signal\";\nimport \"../component/Filter\";\nimport \"../instrument/Monophonic\";\n\n/**\n * @class Tone.MonoSynth is composed of one oscillator, one filter, and two envelopes.\n * The amplitude of the Tone.Oscillator and the cutoff frequency of the\n * Tone.Filter are controlled by Tone.Envelopes.\n *
\n *\n * @constructor\n * @extends {Tone.Monophonic}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var synth = new Tone.MonoSynth({\n * \t\"oscillator\" : {\n * \t\t\"type\" : \"square\"\n * },\n * \"envelope\" : {\n * \t\"attack\" : 0.1\n * }\n * }).toMaster();\n * synth.triggerAttackRelease(\"C4\", \"8n\");\n */\nTone.MonoSynth = function(options){\n\n\t//get the defaults\n\toptions = Tone.defaultArg(options, Tone.MonoSynth.defaults);\n\tTone.Monophonic.call(this, options);\n\n\t/**\n\t * The oscillator.\n\t * @type {Tone.OmniOscillator}\n\t */\n\tthis.oscillator = new Tone.OmniOscillator(options.oscillator);\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this.oscillator.frequency;\n\n\t/**\n\t * The detune control.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = this.oscillator.detune;\n\n\t/**\n\t * The filter.\n\t * @type {Tone.Filter}\n\t */\n\tthis.filter = new Tone.Filter(options.filter);\n\tthis.filter.frequency.value = 5000;\n\n\t/**\n\t * The filter envelope.\n\t * @type {Tone.FrequencyEnvelope}\n\t */\n\tthis.filterEnvelope = new Tone.FrequencyEnvelope(options.filterEnvelope);\n\n\t/**\n\t * The amplitude envelope.\n\t * @type {Tone.AmplitudeEnvelope}\n\t */\n\tthis.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\n\t//connect the oscillators to the output\n\tthis.oscillator.chain(this.filter, this.envelope, this.output);\n\t//connect the filter envelope\n\tthis.filterEnvelope.connect(this.filter.frequency);\n\tthis._readOnly([\"oscillator\", \"frequency\", \"detune\", \"filter\", \"filterEnvelope\", \"envelope\"]);\n};\n\nTone.extend(Tone.MonoSynth, Tone.Monophonic);\n\n/**\n * @const\n * @static\n * @type {Object}\n */\nTone.MonoSynth.defaults = {\n\t\"frequency\" : \"C4\",\n\t\"detune\" : 0,\n\t\"oscillator\" : {\n\t\t\"type\" : \"square\"\n\t},\n\t\"filter\" : {\n\t\t\"Q\" : 6,\n\t\t\"type\" : \"lowpass\",\n\t\t\"rolloff\" : -24\n\t},\n\t\"envelope\" : {\n\t\t\"attack\" : 0.005,\n\t\t\"decay\" : 0.1,\n\t\t\"sustain\" : 0.9,\n\t\t\"release\" : 1\n\t},\n\t\"filterEnvelope\" : {\n\t\t\"attack\" : 0.06,\n\t\t\"decay\" : 0.2,\n\t\t\"sustain\" : 0.5,\n\t\t\"release\" : 2,\n\t\t\"baseFrequency\" : 200,\n\t\t\"octaves\" : 7,\n\t\t\"exponent\" : 2\n\t}\n};\n\n/**\n * start the attack portion of the envelope\n * @param {Time} [time=now] the time the attack should start\n * @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n * @returns {Tone.MonoSynth} this\n * @private\n */\nTone.MonoSynth.prototype._triggerEnvelopeAttack = function(time, velocity){\n\ttime = this.toSeconds(time);\n\t//the envelopes\n\tthis.envelope.triggerAttack(time, velocity);\n\tthis.filterEnvelope.triggerAttack(time);\n\tthis.oscillator.start(time);\n\tif (this.envelope.sustain === 0){\n\t\tthis.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t}\n\treturn this;\n};\n\n/**\n * start the release portion of the envelope\n * @param {Time} [time=now] the time the release should start\n * @returns {Tone.MonoSynth} this\n * @private\n */\nTone.MonoSynth.prototype._triggerEnvelopeRelease = function(time){\n\tthis.envelope.triggerRelease(time);\n\tthis.filterEnvelope.triggerRelease(time);\n\tthis.oscillator.stop(time + this.envelope.release);\n\treturn this;\n};\n\n/**\n * clean up\n * @returns {Tone.MonoSynth} this\n */\nTone.MonoSynth.prototype.dispose = function(){\n\tTone.Monophonic.prototype.dispose.call(this);\n\tthis._writable([\"oscillator\", \"frequency\", \"detune\", \"filter\", \"filterEnvelope\", \"envelope\"]);\n\tthis.oscillator.dispose();\n\tthis.oscillator = null;\n\tthis.envelope.dispose();\n\tthis.envelope = null;\n\tthis.filterEnvelope.dispose();\n\tthis.filterEnvelope = null;\n\tthis.filter.dispose();\n\tthis.filter = null;\n\tthis.frequency = null;\n\tthis.detune = null;\n\treturn this;\n};\n\nexport default Tone.MonoSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../source/Oscillator\";\nimport \"../signal/Multiply\";\nimport \"../core/Gain\";\n\n/**\n * @class Tone.FatOscillator is an array of oscillators with detune spread between the oscillators\n *\n * @extends {Tone.Source}\n * @constructor\n * @param {Frequency} frequency The oscillator's frequency.\n * @param {String} type The type of the oscillator.\n * @param {Cents} spread The detune spread between the oscillators.\n * @example\n * var fatOsc = new Tone.FatOscillator(\"Ab3\", \"sine\", 40).toMaster().start();\n */\nTone.FatOscillator = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\", \"spread\"], Tone.FatOscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * The oscillator's frequency\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The detune control signal.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\n\t/**\n\t * The array of oscillators\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._oscillators = [];\n\n\t/**\n\t * The total spread of the oscillators\n\t * @type {Cents}\n\t * @private\n\t */\n\tthis._spread = options.spread;\n\n\t/**\n\t * The type of the oscillator\n\t * @type {String}\n\t * @private\n\t */\n\tthis._type = options.type;\n\n\t/**\n\t * The phase of the oscillators\n\t * @type {Degrees}\n\t * @private\n\t */\n\tthis._phase = options.phase;\n\n\t/**\n\t * The partials array\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._partials = options.partials;\n\n\t/**\n\t * The number of partials to use\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._partialCount = options.partialCount;\n\n\t//set the count initially\n\tthis.count = options.count;\n\tthis._readOnly([\"frequency\", \"detune\"]);\n};\n\nTone.extend(Tone.FatOscillator, Tone.Source);\n\n/**\n * default values\n * @static\n * @type {Object}\n * @const\n */\nTone.FatOscillator.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"phase\" : 0,\n\t\"spread\" : 20,\n\t\"count\" : 3,\n\t\"type\" : \"sawtooth\",\n\t\"partials\" : [],\n\t\"partialCount\" : 0\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now]\n * @private\n */\nTone.FatOscillator.prototype._start = function(time){\n\ttime = this.toSeconds(time);\n\tthis._forEach(function(osc){\n\t\tosc.start(time);\n\t});\n};\n\n/**\n * stop the oscillator\n * @param {Time} [time=now]\n * @private\n */\nTone.FatOscillator.prototype._stop = function(time){\n\ttime = this.toSeconds(time);\n\tthis._forEach(function(osc){\n\t\tosc.stop(time);\n\t});\n};\n\n/**\n * restart the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.FatOscillator.prototype.restart = function(time){\n\ttime = this.toSeconds(time);\n\tthis._forEach(function(osc){\n\t\tosc.restart(time);\n\t});\n};\n\n/**\n * Iterate over all of the oscillators\n * @param {Function} iterator The iterator function\n * @private\n */\nTone.FatOscillator.prototype._forEach = function(iterator){\n\tfor (var i = 0; i < this._oscillators.length; i++){\n\t\titerator.call(this, this._oscillators[i], i);\n\t}\n};\n\n/**\n * The type of the carrier oscillator\n * @memberOf Tone.FatOscillator#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._type;\n\t},\n\tset : function(type){\n\t\tthis._type = type;\n\t\tthis._forEach(function(osc){\n\t\t\tosc.type = type;\n\t\t});\n\t}\n});\n\n/**\n * The detune spread between the oscillators. If \"count\" is\n * set to 3 oscillators and the \"spread\" is set to 40,\n * the three oscillators would be detuned like this: [-20, 0, 20]\n * for a total detune spread of 40 cents.\n * @memberOf Tone.FatOscillator#\n * @type {Cents}\n * @name spread\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"spread\", {\n\tget : function(){\n\t\treturn this._spread;\n\t},\n\tset : function(spread){\n\t\tthis._spread = spread;\n\t\tif (this._oscillators.length > 1){\n\t\t\tvar start = -spread/2;\n\t\t\tvar step = spread / (this._oscillators.length - 1);\n\t\t\tthis._forEach(function(osc, i){\n\t\t\t\tosc.detune.value = start + step * i;\n\t\t\t});\n\t\t}\n\t}\n});\n\n/**\n * The number of detuned oscillators\n * @memberOf Tone.FatOscillator#\n * @type {Number}\n * @name count\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"count\", {\n\tget : function(){\n\t\treturn this._oscillators.length;\n\t},\n\tset : function(count){\n\t\tcount = Math.max(count, 1);\n\t\tif (this._oscillators.length !== count){\n\t\t\t//dispose the previous oscillators\n\t\t\tthis._forEach(function(osc){\n\t\t\t\tosc.dispose();\n\t\t\t});\n\t\t\tthis._oscillators = [];\n\t\t\tfor (var i = 0; i < count; i++){\n\t\t\t\tvar osc = new Tone.Oscillator();\n\t\t\t\tif (this.type === Tone.Oscillator.Type.Custom){\n\t\t\t\t\tosc.partials = this._partials;\n\t\t\t\t} else {\n\t\t\t\t\tosc.type = this._type;\n\t\t\t\t}\n\t\t\t\tosc.partialCount = this._partialCount;\n\t\t\t\tosc.phase = this._phase + (i / count) * 360;\n\t\t\t\tosc.volume.value = -6 - count*1.1;\n\t\t\t\tthis.frequency.connect(osc.frequency);\n\t\t\t\tthis.detune.connect(osc.detune);\n\t\t\t\tosc.connect(this.output);\n\t\t\t\tthis._oscillators[i] = osc;\n\t\t\t}\n\t\t\t//set the spread\n\t\t\tthis.spread = this._spread;\n\t\t\tif (this.state === Tone.State.Started){\n\t\t\t\tthis._forEach(function(osc){\n\t\t\t\t\tosc.start();\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.FatOscillator#\n * @type {Number}\n * @name phase\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._phase;\n\t},\n\tset : function(phase){\n\t\tthis._phase = phase;\n\t\tthis._forEach(function(osc){\n\t\t\tosc.phase = phase;\n\t\t});\n\t}\n});\n\n/**\n * The oscillator type without the partialsCount appended to the end\n * @memberOf Tone.FatOscillator#\n * @type {string}\n * @name baseType\n * @example\n * osc.type = 'sine2'\n * osc.baseType //'sine'\n * osc.partialCount = 2\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn this._oscillators[0].baseType;\n\t},\n\tset : function(baseType){\n\t\tthis._forEach(function(osc){\n\t\t\tosc.baseType = baseType;\n\t\t});\n\t\tthis._type = this._oscillators[0].type;\n\t}\n});\n\n/**\n * The partials of the carrier waveform. A partial represents\n * the amplitude at a harmonic. The first harmonic is the\n * fundamental frequency, the second is the octave and so on\n * following the harmonic series.\n * Setting this value will automatically set the type to \"custom\".\n * The value is an empty array when the type is not \"custom\".\n * @memberOf Tone.FatOscillator#\n * @type {Array}\n * @name partials\n * @example\n * osc.partials = [1, 0.2, 0.01];\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn this._oscillators[0].partials;\n\t},\n\tset : function(partials){\n\t\tthis._partials = partials;\n\t\tthis._type = Tone.Oscillator.Type.Custom;\n\t\tthis._forEach(function(osc){\n\t\t\tosc.partials = partials;\n\t\t});\n\t}\n});\n\n/**\n * 'partialCount' offers an alternative way to set the number of used partials. \n * When partialCount is 0, the maximum number of partials are used when representing\n * the waveform using the periodicWave. When 'partials' is set, this value is \n * not settable, but equals the length of the partials array.\n * @memberOf Tone.FatOscillator#\n * @type {Number}\n * @name partialCount\n */\nObject.defineProperty(Tone.FatOscillator.prototype, \"partialCount\", {\n\tget : function(){\n\t\treturn this._oscillators[0].partialCount;\n\t},\n\tset : function(partialCount){\n\t\tthis._partialCount = partialCount;\n\t\tthis._forEach(function(osc){\n\t\t\tosc.partialCount = partialCount;\n\t\t});\n\t\tthis._type = this._oscillators[0].type;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.FatOscillator} this\n */\nTone.FatOscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"detune\"]);\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis._forEach(function(osc){\n\t\tosc.dispose();\n\t});\n\tthis._oscillators = null;\n\tthis._partials = null;\n\treturn this;\n};\n\nexport default Tone.FatOscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../source/Oscillator\";\nimport \"../signal/Multiply\";\nimport \"../core/Gain\";\nimport \"../signal/AudioToGain\";\n\n/**\n * @class Tone.AMOscillator\n *\n * @extends {Tone.Oscillator}\n * @constructor\n * @param {Frequency} frequency The starting frequency of the oscillator.\n * @param {String} type The type of the carrier oscillator.\n * @param {String} modulationType The type of the modulator oscillator.\n * @example\n * //a sine oscillator frequency-modulated by a square wave\n * var fmOsc = new Tone.AMOscillator(\"Ab3\", \"sine\", \"square\").toMaster().start();\n */\nTone.AMOscillator = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"type\", \"modulationType\"], Tone.AMOscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * The carrier oscillator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._carrier = new Tone.Oscillator(options.frequency, options.type);\n\n\t/**\n\t * The oscillator's frequency\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._carrier.frequency;\n\n\t/**\n\t * The detune control signal.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = this._carrier.detune;\n\tthis.detune.value = options.detune;\n\n\t/**\n\t * The modulating oscillator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._modulator = new Tone.Oscillator(options.frequency, options.modulationType);\n\n\t/**\n\t * convert the -1,1 output to 0,1\n\t * @type {Tone.AudioToGain}\n\t * @private\n\t */\n\tthis._modulationScale = new Tone.AudioToGain();\n\n\t/**\n\t * Harmonicity is the frequency ratio between the carrier and the modulator oscillators.\n\t * A harmonicity of 1 gives both oscillators the same frequency.\n\t * Harmonicity = 2 means a change of an octave.\n\t * @type {Positive}\n\t * @signal\n\t * @example\n\t * //pitch the modulator an octave below carrier\n\t * synth.harmonicity.value = 0.5;\n\t */\n\tthis.harmonicity = new Tone.Multiply(options.harmonicity);\n\tthis.harmonicity.units = Tone.Type.Positive;\n\n\t/**\n\t * the node where the modulation happens\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._modulationNode = new Tone.Gain(0);\n\n\t//connections\n\tthis.frequency.chain(this.harmonicity, this._modulator.frequency);\n\tthis.detune.connect(this._modulator.detune);\n\tthis._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\tthis._carrier.chain(this._modulationNode, this.output);\n\n\tthis.phase = options.phase;\n\n\tthis._readOnly([\"frequency\", \"detune\", \"harmonicity\"]);\n};\n\nTone.extend(Tone.AMOscillator, Tone.Oscillator);\n\n/**\n * default values\n * @static\n * @type {Object}\n * @const\n */\nTone.AMOscillator.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"phase\" : 0,\n\t\"type\" : \"sine\",\n\t\"modulationType\" : \"square\",\n\t\"harmonicity\" : 1\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now]\n * @private\n */\nTone.AMOscillator.prototype._start = function(time){\n\tthis._modulator.start(time);\n\tthis._carrier.start(time);\n};\n\n/**\n * stop the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.AMOscillator.prototype._stop = function(time){\n\tthis._modulator.stop(time);\n\tthis._carrier.stop(time);\n};\n\n/**\n * restart the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.AMOscillator.prototype.restart = function(time){\n\tthis._modulator.restart(time);\n\tthis._carrier.restart(time);\n};\n\n/**\n * The type of the carrier oscillator\n * @memberOf Tone.AMOscillator#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.AMOscillator.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._carrier.type;\n\t},\n\tset : function(type){\n\t\tthis._carrier.type = type;\n\t}\n});\n\n/**\n * The oscillator type without the partialsCount appended to the end\n * @memberOf Tone.AMOscillator#\n * @type {string}\n * @name baseType\n * @example\n * osc.type = 'sine2'\n * osc.baseType //'sine'\n * osc.partialCount = 2\n */\nObject.defineProperty(Tone.AMOscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn this._carrier.baseType;\n\t},\n\tset : function(baseType){\n\t\tthis._carrier.baseType = baseType;\n\t}\n});\n\n/**\n * 'partialCount' offers an alternative way to set the number of used partials. \n * When partialCount is 0, the maximum number of partials are used when representing\n * the waveform using the periodicWave. When 'partials' is set, this value is \n * not settable, but equals the length of the partials array.\n * @memberOf Tone.AMOscillator#\n * @type {Number}\n * @name partialCount\n */\nObject.defineProperty(Tone.AMOscillator.prototype, \"partialCount\", {\n\tget : function(){\n\t\treturn this._carrier.partialCount;\n\t},\n\tset : function(partialCount){\n\t\tthis._carrier.partialCount = partialCount;\n\t}\n});\n\n/**\n * The type of the modulator oscillator\n * @memberOf Tone.AMOscillator#\n * @type {string}\n * @name modulationType\n */\nObject.defineProperty(Tone.AMOscillator.prototype, \"modulationType\", {\n\tget : function(){\n\t\treturn this._modulator.type;\n\t},\n\tset : function(type){\n\t\tthis._modulator.type = type;\n\t}\n});\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.AMOscillator#\n * @type {number}\n * @name phase\n */\nObject.defineProperty(Tone.AMOscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._carrier.phase;\n\t},\n\tset : function(phase){\n\t\tthis._carrier.phase = phase;\n\t\tthis._modulator.phase = phase;\n\t}\n});\n\n/**\n * The partials of the carrier waveform. A partial represents\n * the amplitude at a harmonic. The first harmonic is the\n * fundamental frequency, the second is the octave and so on\n * following the harmonic series.\n * Setting this value will automatically set the type to \"custom\".\n * The value is an empty array when the type is not \"custom\".\n * @memberOf Tone.AMOscillator#\n * @type {Array}\n * @name partials\n * @example\n * osc.partials = [1, 0.2, 0.01];\n */\nObject.defineProperty(Tone.AMOscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn this._carrier.partials;\n\t},\n\tset : function(partials){\n\t\tthis._carrier.partials = partials;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.AMOscillator} this\n */\nTone.AMOscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"detune\", \"harmonicity\"]);\n\tthis.frequency = null;\n\tthis.detune = null;\n\tthis.harmonicity.dispose();\n\tthis.harmonicity = null;\n\tthis._carrier.dispose();\n\tthis._carrier = null;\n\tthis._modulator.dispose();\n\tthis._modulator = null;\n\tthis._modulationNode.dispose();\n\tthis._modulationNode = null;\n\tthis._modulationScale.dispose();\n\tthis._modulationScale = null;\n\treturn this;\n};\n\nexport default Tone.AMOscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../source/PulseOscillator\";\nimport \"../source/Oscillator\";\nimport \"../signal/Multiply\";\n\n/**\n * @class Tone.PWMOscillator modulates the width of a Tone.PulseOscillator\n * at the modulationFrequency. This has the effect of continuously\n * changing the timbre of the oscillator by altering the harmonics\n * generated.\n *\n * @extends {Tone.Source}\n * @constructor\n * @param {Frequency} frequency The starting frequency of the oscillator.\n * @param {Frequency} modulationFrequency The modulation frequency of the width of the pulse.\n * @example\n * var pwm = new Tone.PWMOscillator(\"Ab3\", 0.3).toMaster().start();\n */\nTone.PWMOscillator = function(){\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"modulationFrequency\"], Tone.PWMOscillator);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * the pulse oscillator\n\t * @type {Tone.PulseOscillator}\n\t * @private\n\t */\n\tthis._pulse = new Tone.PulseOscillator(options.modulationFrequency);\n\t//change the pulse oscillator type\n\tthis._pulse._sawtooth.type = \"sine\";\n\n\t/**\n\t * the modulator\n\t * @type {Tone.Oscillator}\n\t * @private\n\t */\n\tthis._modulator = new Tone.Oscillator({\n\t\t\"frequency\" : options.frequency,\n\t\t\"detune\" : options.detune,\n\t\t\"phase\" : options.phase\n\t});\n\n\t/**\n\t * Scale the oscillator so it doesn't go silent\n\t * at the extreme values.\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._scale = new Tone.Multiply(2);\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._modulator.frequency;\n\n\t/**\n\t * The detune of the oscillator.\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = this._modulator.detune;\n\n\t/**\n\t * The modulation rate of the oscillator.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.modulationFrequency = this._pulse.frequency;\n\n\t//connections\n\tthis._modulator.chain(this._scale, this._pulse.width);\n\tthis._pulse.connect(this.output);\n\tthis._readOnly([\"modulationFrequency\", \"frequency\", \"detune\"]);\n};\n\nTone.extend(Tone.PWMOscillator, Tone.Source);\n\n/**\n * default values\n * @static\n * @type {Object}\n * @const\n */\nTone.PWMOscillator.defaults = {\n\t\"frequency\" : 440,\n\t\"detune\" : 0,\n\t\"phase\" : 0,\n\t\"modulationFrequency\" : 0.4,\n};\n\n/**\n * start the oscillator\n * @param {Time} [time=now]\n * @private\n */\nTone.PWMOscillator.prototype._start = function(time){\n\ttime = this.toSeconds(time);\n\tthis._modulator.start(time);\n\tthis._pulse.start(time);\n};\n\n/**\n * stop the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.PWMOscillator.prototype._stop = function(time){\n\ttime = this.toSeconds(time);\n\tthis._modulator.stop(time);\n\tthis._pulse.stop(time);\n};\n\n/**\n * restart the oscillator\n * @param {Time} time (optional) timing parameter\n * @private\n */\nTone.PWMOscillator.prototype.restart = function(time){\n\tthis._modulator.restart(time);\n\tthis._pulse.restart(time);\n};\n\n/**\n * The type of the oscillator. Always returns \"pwm\".\n * @readOnly\n * @memberOf Tone.PWMOscillator#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.PWMOscillator.prototype, \"type\", {\n\tget : function(){\n\t\treturn \"pwm\";\n\t}\n});\n\n/**\n * The baseType of the oscillator. Always returns \"pwm\".\n * @readOnly\n * @memberOf Tone.PWMOscillator#\n * @type {string}\n * @name baseType\n */\nObject.defineProperty(Tone.PWMOscillator.prototype, \"baseType\", {\n\tget : function(){\n\t\treturn \"pwm\";\n\t}\n});\n\n/**\n * The partials of the waveform. Cannot set partials for this waveform type\n * @memberOf Tone.PWMOscillator#\n * @type {Array}\n * @name partials\n * @private\n */\nObject.defineProperty(Tone.PWMOscillator.prototype, \"partials\", {\n\tget : function(){\n\t\treturn [];\n\t}\n});\n\n/**\n * The phase of the oscillator in degrees.\n * @memberOf Tone.PWMOscillator#\n * @type {number}\n * @name phase\n */\nObject.defineProperty(Tone.PWMOscillator.prototype, \"phase\", {\n\tget : function(){\n\t\treturn this._modulator.phase;\n\t},\n\tset : function(phase){\n\t\tthis._modulator.phase = phase;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.PWMOscillator} this\n */\nTone.PWMOscillator.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis._pulse.dispose();\n\tthis._pulse = null;\n\tthis._scale.dispose();\n\tthis._scale = null;\n\tthis._modulator.dispose();\n\tthis._modulator = null;\n\tthis._writable([\"modulationFrequency\", \"frequency\", \"detune\"]);\n\tthis.frequency = null;\n\tthis.detune = null;\n\tthis.modulationFrequency = null;\n\treturn this;\n};\n\nexport default Tone.PWMOscillator;\n\n","import Tone from \"../core/Tone\";\nimport \"../event/Event\";\nimport \"../type/Type\";\nimport \"../core/Transport\";\n\n/**\n * @class Tone.Part is a collection Tone.Events which can be\n * started/stopped and looped as a single unit.\n *\n * @extends {Tone.Event}\n * @param {Function} callback The callback to invoke on each event\n * @param {Array} events the array of events\n * @example\n * var part = new Tone.Part(function(time, note){\n * \t//the notes given as the second element in the array\n * \t//will be passed in as the second argument\n * \tsynth.triggerAttackRelease(note, \"8n\", time);\n * }, [[0, \"C2\"], [\"0:2\", \"C3\"], [\"0:3:2\", \"G2\"]]);\n * @example\n * //use an array of objects as long as the object has a \"time\" attribute\n * var part = new Tone.Part(function(time, value){\n * \t//the value is an object which contains both the note and the velocity\n * \tsynth.triggerAttackRelease(value.note, \"8n\", time, value.velocity);\n * }, [{\"time\" : 0, \"note\" : \"C3\", \"velocity\": 0.9},\n * \t {\"time\" : \"0:2\", \"note\" : \"C4\", \"velocity\": 0.5}\n * ]).start(0);\n */\nTone.Part = function(){\n\n\tvar options = Tone.defaults(arguments, [\"callback\", \"events\"], Tone.Part);\n\tTone.Event.call(this, options);\n\n\t/**\n\t * An array of Objects.\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._events = [];\n\n\t//add the events\n\tfor (var i = 0; i < options.events.length; i++){\n\t\tif (Array.isArray(options.events[i])){\n\t\t\tthis.add(options.events[i][0], options.events[i][1]);\n\t\t} else {\n\t\t\tthis.add(options.events[i]);\n\t\t}\n\t}\n};\n\nTone.extend(Tone.Part, Tone.Event);\n\n/**\n * The default values\n * @type {Object}\n * @const\n */\nTone.Part.defaults = {\n\t\"callback\" : Tone.noOp,\n\t\"loop\" : false,\n\t\"loopEnd\" : \"1m\",\n\t\"loopStart\" : 0,\n\t\"playbackRate\" : 1,\n\t\"probability\" : 1,\n\t\"humanize\" : false,\n\t\"mute\" : false,\n\t\"events\" : []\n};\n\n/**\n * Start the part at the given time.\n * @param {TransportTime} time When to start the part.\n * @param {Time=} offset The offset from the start of the part\n * to begin playing at.\n * @return {Tone.Part} this\n */\nTone.Part.prototype.start = function(time, offset){\n\tvar ticks = this.toTicks(time);\n\tif (this._state.getValueAtTime(ticks) !== Tone.State.Started){\n\t\tif (this._loop){\n\t\t\toffset = Tone.defaultArg(offset, this._loopStart);\n\t\t} else {\n\t\t\toffset = Tone.defaultArg(offset, 0);\n\t\t}\n\t\toffset = this.toTicks(offset);\n\t\tthis._state.add({\n\t\t\t\"state\" : Tone.State.Started,\n\t\t\t\"time\" : ticks,\n\t\t\t\"offset\" : offset\n\t\t});\n\t\tthis._forEach(function(event){\n\t\t\tthis._startNote(event, ticks, offset);\n\t\t});\n\t}\n\treturn this;\n};\n\n/**\n * Start the event in the given event at the correct time given\n * the ticks and offset and looping.\n * @param {Tone.Event} event\n * @param {Ticks} ticks\n * @param {Ticks} offset\n * @private\n */\nTone.Part.prototype._startNote = function(event, ticks, offset){\n\tticks -= offset;\n\tif (this._loop){\n\t\tif (event.startOffset >= this._loopStart && event.startOffset < this._loopEnd){\n\t\t\tif (event.startOffset < offset){\n\t\t\t\t//start it on the next loop\n\t\t\t\tticks += this._getLoopDuration();\n\t\t\t}\n\t\t\tevent.start(Tone.Ticks(ticks));\n\t\t} else if (event.startOffset < this._loopStart && event.startOffset >= offset){\n\t\t\tevent.loop = false;\n\t\t\tevent.start(Tone.Ticks(ticks));\n\t\t}\n\t} else if (event.startOffset >= offset){\n\t\tevent.start(Tone.Ticks(ticks));\n\t}\n};\n\n/**\n * The start from the scheduled start time\n * @type {Ticks}\n * @memberOf Tone.Part#\n * @name startOffset\n * @private\n */\nObject.defineProperty(Tone.Part.prototype, \"startOffset\", {\n\tget : function(){\n\t\treturn this._startOffset;\n\t},\n\tset : function(offset){\n\t\tthis._startOffset = offset;\n\t\tthis._forEach(function(event){\n\t\t\tevent.startOffset += this._startOffset;\n\t\t});\n\t}\n});\n\n/**\n * Stop the part at the given time.\n * @param {TimelinePosition} time When to stop the part.\n * @return {Tone.Part} this\n */\nTone.Part.prototype.stop = function(time){\n\tvar ticks = this.toTicks(time);\n\tthis._state.cancel(ticks);\n\tthis._state.setStateAtTime(Tone.State.Stopped, ticks);\n\tthis._forEach(function(event){\n\t\tevent.stop(time);\n\t});\n\treturn this;\n};\n\n/**\n * Get/Set an Event's value at the given time.\n * If a value is passed in and no event exists at\n * the given time, one will be created with that value.\n * If two events are at the same time, the first one will\n * be returned.\n * @example\n * part.at(\"1m\"); //returns the part at the first measure\n *\n * part.at(\"2m\", \"C2\"); //set the value at \"2m\" to C2.\n * //if an event didn't exist at that time, it will be created.\n * @param {TransportTime} time The time of the event to get or set.\n * @param {*=} value If a value is passed in, the value of the\n * event at the given time will be set to it.\n * @return {Tone.Event} the event at the time\n */\nTone.Part.prototype.at = function(time, value){\n\ttime = Tone.TransportTime(time);\n\tvar tickTime = Tone.Ticks(1).toSeconds();\n\tfor (var i = 0; i < this._events.length; i++){\n\t\tvar event = this._events[i];\n\t\tif (Math.abs(time.toTicks() - event.startOffset) < tickTime){\n\t\t\tif (Tone.isDefined(value)){\n\t\t\t\tevent.value = value;\n\t\t\t}\n\t\t\treturn event;\n\t\t}\n\t}\n\t//if there was no event at that time, create one\n\tif (Tone.isDefined(value)){\n\t\tthis.add(time, value);\n\t\t//return the new event\n\t\treturn this._events[this._events.length - 1];\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/**\n * Add a an event to the part.\n * @param {Time} time The time the note should start.\n * If an object is passed in, it should\n * have a 'time' attribute and the rest\n * of the object will be used as the 'value'.\n * @param {Tone.Event|*} value\n * @returns {Tone.Part} this\n * @example\n * part.add(\"1m\", \"C#+11\");\n */\nTone.Part.prototype.add = function(time, value){\n\t//extract the parameters\n\tif (time.hasOwnProperty(\"time\")){\n\t\tvalue = time;\n\t\ttime = value.time;\n\t}\n\ttime = this.toTicks(time);\n\tvar event;\n\tif (value instanceof Tone.Event){\n\t\tevent = value;\n\t\tevent.callback = this._tick.bind(this);\n\t} else {\n\t\tevent = new Tone.Event({\n\t\t\t\"callback\" : this._tick.bind(this),\n\t\t\t\"value\" : value,\n\t\t});\n\t}\n\t//the start offset\n\tevent.startOffset = time;\n\n\t//initialize the values\n\tevent.set({\n\t\t\"loopEnd\" : this.loopEnd,\n\t\t\"loopStart\" : this.loopStart,\n\t\t\"loop\" : this.loop,\n\t\t\"humanize\" : this.humanize,\n\t\t\"playbackRate\" : this.playbackRate,\n\t\t\"probability\" : this.probability\n\t});\n\n\tthis._events.push(event);\n\n\t//start the note if it should be played right now\n\tthis._restartEvent(event);\n\treturn this;\n};\n\n/**\n * Restart the given event\n * @param {Tone.Event} event\n * @private\n */\nTone.Part.prototype._restartEvent = function(event){\n\tthis._state.forEach(function(stateEvent){\n\t\tif (stateEvent.state === Tone.State.Started){\n\t\t\tthis._startNote(event, stateEvent.time, stateEvent.offset);\n\t\t} else {\n\t\t\t//stop the note\n\t\t\tevent.stop(Tone.Ticks(stateEvent.time));\n\t\t}\n\t}.bind(this));\n};\n\n/**\n * Remove an event from the part. If the event at that time is a Tone.Part,\n * it will remove the entire part.\n * @param {Time} time The time of the event\n * @param {*} value Optionally select only a specific event value\n * @return {Tone.Part} this\n */\nTone.Part.prototype.remove = function(time, value){\n\t//extract the parameters\n\tif (time.hasOwnProperty(\"time\")){\n\t\tvalue = time;\n\t\ttime = value.time;\n\t}\n\ttime = this.toTicks(time);\n\tfor (var i = this._events.length - 1; i >= 0; i--){\n\t\tvar event = this._events[i];\n\t\tif (event.startOffset === time){\n\t\t\tif (Tone.isUndef(value) || (Tone.isDefined(value) && event.value === value)){\n\t\t\t\tthis._events.splice(i, 1);\n\t\t\t\tevent.dispose();\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Remove all of the notes from the group.\n * @return {Tone.Part} this\n */\nTone.Part.prototype.removeAll = function(){\n\tthis._forEach(function(event){\n\t\tevent.dispose();\n\t});\n\tthis._events = [];\n\treturn this;\n};\n\n/**\n * Cancel scheduled state change events: i.e. \"start\" and \"stop\".\n * @param {TimelinePosition} after The time after which to cancel the scheduled events.\n * @return {Tone.Part} this\n */\nTone.Part.prototype.cancel = function(after){\n\tthis._forEach(function(event){\n\t\tevent.cancel(after);\n\t});\n\tthis._state.cancel(this.toTicks(after));\n\treturn this;\n};\n\n/**\n * Iterate over all of the events\n * @param {Function} callback\n * @param {Object} ctx The context\n * @private\n */\nTone.Part.prototype._forEach = function(callback, ctx){\n\tif (this._events){\n\t\tctx = Tone.defaultArg(ctx, this);\n\t\tfor (var i = this._events.length - 1; i >= 0; i--){\n\t\t\tvar e = this._events[i];\n\t\t\tif (e instanceof Tone.Part){\n\t\t\t\te._forEach(callback, ctx);\n\t\t\t} else {\n\t\t\t\tcallback.call(ctx, e);\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Set the attribute of all of the events\n * @param {String} attr the attribute to set\n * @param {*} value The value to set it to\n * @private\n */\nTone.Part.prototype._setAll = function(attr, value){\n\tthis._forEach(function(event){\n\t\tevent[attr] = value;\n\t});\n};\n\n/**\n * Internal tick method\n * @param {Number} time The time of the event in seconds\n * @private\n */\nTone.Part.prototype._tick = function(time, value){\n\tif (!this.mute){\n\t\tthis.callback(time, value);\n\t}\n};\n\n/**\n * Determine if the event should be currently looping\n * given the loop boundries of this Part.\n * @param {Tone.Event} event The event to test\n * @private\n */\nTone.Part.prototype._testLoopBoundries = function(event){\n\tif (this._loop && (event.startOffset < this._loopStart || event.startOffset >= this._loopEnd)){\n\t\tevent.cancel(0);\n\t} else if (event.state === Tone.State.Stopped){\n\t\t//reschedule it if it's stopped\n\t\tthis._restartEvent(event);\n\t}\n};\n\n/**\n * The probability of the notes being triggered.\n * @memberOf Tone.Part#\n * @type {NormalRange}\n * @name probability\n */\nObject.defineProperty(Tone.Part.prototype, \"probability\", {\n\tget : function(){\n\t\treturn this._probability;\n\t},\n\tset : function(prob){\n\t\tthis._probability = prob;\n\t\tthis._setAll(\"probability\", prob);\n\t}\n});\n\n/**\n * If set to true, will apply small random variation\n * to the callback time. If the value is given as a time, it will randomize\n * by that amount.\n * @example\n * event.humanize = true;\n * @type {Boolean|Time}\n * @name humanize\n * @memberof Tone.Part#\n */\nObject.defineProperty(Tone.Part.prototype, \"humanize\", {\n\tget : function(){\n\t\treturn this._humanize;\n\t},\n\tset : function(variation){\n\t\tthis._humanize = variation;\n\t\tthis._setAll(\"humanize\", variation);\n\t}\n});\n\n/**\n * If the part should loop or not\n * between Tone.Part.loopStart and\n * Tone.Part.loopEnd. If set to true,\n * the part will loop indefinitely,\n * if set to a number greater than 1\n * it will play a specific number of\n * times, if set to false, 0 or 1, the\n * part will only play once.\n * @memberOf Tone.Part#\n * @type {Boolean|Positive}\n * @name loop\n * @example\n * //loop the part 8 times\n * part.loop = 8;\n */\nObject.defineProperty(Tone.Part.prototype, \"loop\", {\n\tget : function(){\n\t\treturn this._loop;\n\t},\n\tset : function(loop){\n\t\tthis._loop = loop;\n\t\tthis._forEach(function(event){\n\t\t\tevent._loopStart = this._loopStart;\n\t\t\tevent._loopEnd = this._loopEnd;\n\t\t\tevent.loop = loop;\n\t\t\tthis._testLoopBoundries(event);\n\t\t});\n\t}\n});\n\n/**\n * The loopEnd point determines when it will\n * loop if Tone.Part.loop is true.\n * @memberOf Tone.Part#\n * @type {Time}\n * @name loopEnd\n */\nObject.defineProperty(Tone.Part.prototype, \"loopEnd\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._loopEnd).toSeconds();\n\t},\n\tset : function(loopEnd){\n\t\tthis._loopEnd = this.toTicks(loopEnd);\n\t\tif (this._loop){\n\t\t\tthis._forEach(function(event){\n\t\t\t\tevent.loopEnd = loopEnd;\n\t\t\t\tthis._testLoopBoundries(event);\n\t\t\t});\n\t\t}\n\t}\n});\n\n/**\n * The loopStart point determines when it will\n * loop if Tone.Part.loop is true.\n * @memberOf Tone.Part#\n * @type {Time}\n * @name loopStart\n */\nObject.defineProperty(Tone.Part.prototype, \"loopStart\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._loopStart).toSeconds();\n\t},\n\tset : function(loopStart){\n\t\tthis._loopStart = this.toTicks(loopStart);\n\t\tif (this._loop){\n\t\t\tthis._forEach(function(event){\n\t\t\t\tevent.loopStart = this.loopStart;\n\t\t\t\tthis._testLoopBoundries(event);\n\t\t\t});\n\t\t}\n\t}\n});\n\n/**\n * \tThe playback rate of the part\n * @memberOf Tone.Part#\n * @type {Positive}\n * @name playbackRate\n */\nObject.defineProperty(Tone.Part.prototype, \"playbackRate\", {\n\tget : function(){\n\t\treturn this._playbackRate;\n\t},\n\tset : function(rate){\n\t\tthis._playbackRate = rate;\n\t\tthis._setAll(\"playbackRate\", rate);\n\t}\n});\n\n/**\n * \tThe number of scheduled notes in the part.\n * @memberOf Tone.Part#\n * @type {Positive}\n * @name length\n * @readOnly\n */\nObject.defineProperty(Tone.Part.prototype, \"length\", {\n\tget : function(){\n\t\treturn this._events.length;\n\t}\n});\n\n/**\n * Clean up\n * @return {Tone.Part} this\n */\nTone.Part.prototype.dispose = function(){\n\tTone.Event.prototype.dispose.call(this);\n\tthis.removeAll();\n\tthis.callback = null;\n\tthis._events = null;\n\treturn this;\n};\n\nexport default Tone.Part;\n\n","import Tone from \"../core/Tone\";\nimport \"../event/Event\";\n\n/**\n * @class Tone.Loop creates a looped callback at the \n * specified interval. The callback can be \n * started, stopped and scheduled along\n * the Transport's timeline. \n * @example\n * var loop = new Tone.Loop(function(time){\n * \t//triggered every eighth note. \n * \tconsole.log(time);\n * }, \"8n\").start(0);\n * Tone.Transport.start();\n * @extends {Tone}\n * @param {Function} callback The callback to invoke with the event.\n * @param {Time} interval The time between successive callback calls. \n */\nTone.Loop = function(){\n\n\tvar options = Tone.defaults(arguments, [\"callback\", \"interval\"], Tone.Loop);\n\tTone.call(this);\n\n\t/**\n\t * The event which produces the callbacks\n\t */\n\tthis._event = new Tone.Event({\n\t\t\"callback\" : this._tick.bind(this),\n\t\t\"loop\" : true,\n\t\t\"loopEnd\" : options.interval,\n\t\t\"playbackRate\" : options.playbackRate,\n\t\t\"probability\" : options.probability\n\t});\n\n\t/**\n\t * The callback to invoke with the next event in the pattern\n\t * @type {Function}\n\t */\n\tthis.callback = options.callback;\n\n\t//set the iterations\n\tthis.iterations = options.iterations;\n};\n\nTone.extend(Tone.Loop);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.Loop.defaults = {\n\t\"interval\" : \"4n\",\n\t\"callback\" : Tone.noOp,\n\t\"playbackRate\" : 1,\n\t\"iterations\" : Infinity,\n\t\"probability\" : true,\n\t\"mute\" : false\n};\n\n/**\n * Start the loop at the specified time along the Transport's\n * timeline.\n * @param {TimelinePosition=} time When to start the Loop.\n * @return {Tone.Loop} this\n */\nTone.Loop.prototype.start = function(time){\n\tthis._event.start(time);\n\treturn this;\n};\n\n/**\n * Stop the loop at the given time.\n * @param {TimelinePosition=} time When to stop the Loop.\n * @return {Tone.Loop} this\n */\nTone.Loop.prototype.stop = function(time){\n\tthis._event.stop(time);\n\treturn this;\n};\n\n/**\n * Cancel all scheduled events greater than or equal to the given time\n * @param {TimelinePosition} [time=0] The time after which events will be cancel.\n * @return {Tone.Loop} this\n */\nTone.Loop.prototype.cancel = function(time){\n\tthis._event.cancel(time);\n\treturn this;\n};\n\n/**\n * Internal function called when the notes should be called\n * @param {Number} time The time the event occurs\n * @private\n */\nTone.Loop.prototype._tick = function(time){\n\tthis.callback(time);\n};\n\n/**\n * The state of the Loop, either started or stopped.\n * @memberOf Tone.Loop#\n * @type {String}\n * @name state\n * @readOnly\n */\nObject.defineProperty(Tone.Loop.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._event.state;\n\t}\n});\n\n/**\n * The progress of the loop as a value between 0-1. 0, when\n * the loop is stopped or done iterating. \n * @memberOf Tone.Loop#\n * @type {NormalRange}\n * @name progress\n * @readOnly\n */\nObject.defineProperty(Tone.Loop.prototype, \"progress\", {\n\tget : function(){\n\t\treturn this._event.progress;\n\t}\n});\n\n/**\n * The time between successive callbacks. \n * @example\n * loop.interval = \"8n\"; //loop every 8n\n * @memberOf Tone.Loop#\n * @type {Time}\n * @name interval\n */\nObject.defineProperty(Tone.Loop.prototype, \"interval\", {\n\tget : function(){\n\t\treturn this._event.loopEnd;\n\t},\n\tset : function(interval){\n\t\tthis._event.loopEnd = interval;\n\t}\n});\n\n/**\n * The playback rate of the loop. The normal playback rate is 1 (no change). \n * A `playbackRate` of 2 would be twice as fast. \n * @memberOf Tone.Loop#\n * @type {Time}\n * @name playbackRate\n */\nObject.defineProperty(Tone.Loop.prototype, \"playbackRate\", {\n\tget : function(){\n\t\treturn this._event.playbackRate;\n\t},\n\tset : function(rate){\n\t\tthis._event.playbackRate = rate;\n\t}\n});\n\n/**\n * Random variation +/-0.01s to the scheduled time. \n * Or give it a time value which it will randomize by.\n * @type {Boolean|Time}\n * @memberOf Tone.Loop#\n * @name humanize\n */\nObject.defineProperty(Tone.Loop.prototype, \"humanize\", {\n\tget : function(){\n\t\treturn this._event.humanize;\n\t},\n\tset : function(variation){\n\t\tthis._event.humanize = variation;\n\t}\n});\n\n/**\n * The probably of the callback being invoked.\n * @memberOf Tone.Loop#\n * @type {NormalRange}\n * @name probability\n */\nObject.defineProperty(Tone.Loop.prototype, \"probability\", {\n\tget : function(){\n\t\treturn this._event.probability;\n\t},\n\tset : function(prob){\n\t\tthis._event.probability = prob;\n\t}\n});\n\n/**\n * Muting the Loop means that no callbacks are invoked.\n * @memberOf Tone.Loop#\n * @type {Boolean}\n * @name mute\n */\nObject.defineProperty(Tone.Loop.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._event.mute;\n\t},\n\tset : function(mute){\n\t\tthis._event.mute = mute;\n\t}\n});\n\n/**\n * The number of iterations of the loop. The default\n * value is Infinity (loop forever).\n * @memberOf Tone.Loop#\n * @type {Positive}\n * @name iterations\n */\nObject.defineProperty(Tone.Loop.prototype, \"iterations\", {\n\tget : function(){\n\t\tif (this._event.loop === true){\n\t\t\treturn Infinity;\n\t\t} else {\n\t\t\treturn this._event.loop;\n\t\t}\n\t},\n\tset : function(iters){\n\t\tif (iters === Infinity){\n\t\t\tthis._event.loop = true;\n\t\t} else {\n\t\t\tthis._event.loop = iters;\n\t\t}\n\t}\n});\n\n/**\n * Clean up\n * @return {Tone.Loop} this\n */\nTone.Loop.prototype.dispose = function(){\n\tthis._event.dispose();\n\tthis._event = null;\n\tthis.callback = null;\n};\n\nexport default Tone.Loop;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/StereoEffect\";\nimport \"../effect/FeedbackEffect\";\n\n/**\n * @class Just like a stereo feedback effect, but the feedback is routed from left to right\n * and right to left instead of on the same channel.\n *\n *\t@constructor\n *\t@extends {Tone.StereoEffect}\n */\nTone.StereoXFeedbackEffect = function(){\n\n\tvar options = Tone.defaults(arguments, [\"feedback\"], Tone.FeedbackEffect);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * The amount of feedback from the output\n\t * back into the input of the effect (routed\n\t * across left and right channels).\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\n\t/**\n\t * the left side feeback\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._feedbackLR = new Tone.Gain();\n\n\t/**\n\t * the right side feeback\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._feedbackRL = new Tone.Gain();\n\n\t//connect it up\n\tthis.effectReturnL.chain(this._feedbackLR, this.effectSendR);\n\tthis.effectReturnR.chain(this._feedbackRL, this.effectSendL);\n\tthis.feedback.fan(this._feedbackLR.gain, this._feedbackRL.gain);\n\tthis._readOnly([\"feedback\"]);\n};\n\nTone.extend(Tone.StereoXFeedbackEffect, Tone.StereoEffect);\n\n/**\n * clean up\n * @returns {Tone.StereoXFeedbackEffect} this\n */\nTone.StereoXFeedbackEffect.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tthis._writable([\"feedback\"]);\n\tthis.feedback.dispose();\n\tthis.feedback = null;\n\tthis._feedbackLR.dispose();\n\tthis._feedbackLR = null;\n\tthis._feedbackRL.dispose();\n\tthis._feedbackRL = null;\n\treturn this;\n};\n\nexport default Tone.StereoXFeedbackEffect;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../component/MidSideSplit\";\nimport \"../component/MidSideMerge\";\n\n/**\n * @class Mid/Side processing separates the the 'mid' signal\n * (which comes out of both the left and the right channel)\n * and the 'side' (which only comes out of the the side channels)\n * and effects them separately before being recombined.\n * Applies a Mid/Side seperation and recombination.\n * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n *
\n * This is a base-class for Mid/Side Effects.\n *\n * @extends {Tone.Effect}\n * @constructor\n */\nTone.MidSideEffect = function(){\n\n\tTone.Effect.apply(this, arguments);\n\n\t/**\n\t * The mid/side split\n\t * @type {Tone.MidSideSplit}\n\t * @private\n\t */\n\tthis._midSideSplit = new Tone.MidSideSplit();\n\n\t/**\n\t * The mid/side merge\n\t * @type {Tone.MidSideMerge}\n\t * @private\n\t */\n\tthis._midSideMerge = new Tone.MidSideMerge();\n\n\t/**\n\t * The mid send. Connect to mid processing\n\t * @type {Tone}\n\t * @private\n\t */\n\tthis.midSend = this._midSideSplit.mid;\n\n\t/**\n\t * The side send. Connect to side processing\n\t * @type {Tone}\n\t * @private\n\t */\n\tthis.sideSend = this._midSideSplit.side;\n\n\t/**\n\t * The mid return connection\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.midReturn = this._midSideMerge.mid;\n\n\t/**\n\t * The side return connection\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.sideReturn = this._midSideMerge.side;\n\n\t//the connections\n\tthis.effectSend.connect(this._midSideSplit);\n\tthis._midSideMerge.connect(this.effectReturn);\n};\n\nTone.extend(Tone.MidSideEffect, Tone.Effect);\n\n/**\n * Clean up.\n * @returns {Tone.MidSideEffect} this\n */\nTone.MidSideEffect.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._midSideSplit.dispose();\n\tthis._midSideSplit = null;\n\tthis._midSideMerge.dispose();\n\tthis._midSideMerge = null;\n\tthis.midSend = null;\n\tthis.sideSend = null;\n\tthis.midReturn = null;\n\tthis.sideReturn = null;\n\treturn this;\n};\n\nexport default Tone.MidSideEffect;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Buffer\";\nimport \"../effect/Effect\";\n\n/**\n * @class Tone.Convolver is a wrapper around the Native Web Audio\n * [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).\n * Convolution is useful for reverb and filter emulation. Read more about convolution reverb on\n * [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).\n *\n * @constructor\n * @extends {Tone.Effect}\n * @param {string|Tone.Buffer|Object} [url] The URL of the impulse response or the Tone.Buffer\n * contianing the impulse response.\n * @param {Function=} onload The callback to invoke when the url is loaded.\n * @example\n * //initializing the convolver with an impulse response\n * var convolver = new Tone.Convolver(\"./path/to/ir.wav\").toMaster();\n */\nTone.Convolver = function(){\n\n\tvar options = Tone.defaults(arguments, [\"url\", \"onload\"], Tone.Convolver);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * convolver node\n\t * @type {ConvolverNode}\n\t * @private\n\t */\n\tthis._convolver = this.context.createConvolver();\n\n\t/**\n\t * the convolution buffer\n\t * @type {Tone.Buffer}\n\t * @private\n\t */\n\tthis._buffer = new Tone.Buffer(options.url, function(buffer){\n\t\tthis.buffer = buffer.get();\n\t\toptions.onload();\n\t}.bind(this));\n\n\t//set if it's already loaded\n\tif (this._buffer.loaded){\n\t\tthis.buffer = this._buffer;\n\t}\n\n\t//initially set normalization\n\tthis.normalize = options.normalize;\n\n\tthis.connectEffect(this._convolver);\n};\n\nTone.extend(Tone.Convolver, Tone.Effect);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.Convolver.defaults = {\n\t\"onload\" : Tone.noOp,\n\t\"normalize\" : true\n};\n\n/**\n * The convolver's buffer\n * @memberOf Tone.Convolver#\n * @type {AudioBuffer}\n * @name buffer\n */\nObject.defineProperty(Tone.Convolver.prototype, \"buffer\", {\n\t\"get\" : function(){\n\t\tif (this._buffer.length){\n\t\t\treturn this._buffer;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t},\n\t\"set\" : function(buffer){\n\t\tthis._buffer.set(buffer);\n\t\t//if it's already got a buffer, create a new one\n\t\tif (this._convolver.buffer){\n\t\t\t//disconnect the old one\n\t\t\tthis.effectSend.disconnect();\n\t\t\tthis._convolver.disconnect();\n\t\t\t//create and connect a new one\n\t\t\tthis._convolver = this.context.createConvolver();\n\t\t\tthis.connectEffect(this._convolver);\n\t\t}\n\t\tthis._convolver.buffer = this._buffer.get();\n\t}\n});\n\n/**\n * The normalize property of the ConvolverNode interface is a boolean that controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute is set, or not.\n * @memberOf Tone.Convolver#\n * @type {Boolean}\n * @name normalize\n */\nObject.defineProperty(Tone.Convolver.prototype, \"normalize\", {\n\t\"get\" : function(){\n\t\treturn this._convolver.normalize;\n\t},\n\t\"set\" : function(norm){\n\t\tthis._convolver.normalize = norm;\n\t}\n});\n\n/**\n * Load an impulse response url as an audio buffer.\n * Decodes the audio asynchronously and invokes\n * the callback once the audio buffer loads.\n * @param {string} url The url of the buffer to load.\n * filetype support depends on the\n * browser.\n * @param {function=} callback\n * @returns {Promise}\n */\nTone.Convolver.prototype.load = function(url, callback){\n\treturn this._buffer.load(url, function(buff){\n\t\tthis.buffer = buff;\n\t\tif (callback){\n\t\t\tcallback();\n\t\t}\n\t}.bind(this));\n};\n\n/**\n * Clean up.\n * @returns {Tone.Convolver} this\n */\nTone.Convolver.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._buffer.dispose();\n\tthis._buffer = null;\n\tthis._convolver.disconnect();\n\tthis._convolver = null;\n\treturn this;\n};\n\nexport default Tone.Convolver;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\nimport \"../signal/Multiply\";\nimport \"../signal/Subtract\";\n\n/**\n * @class Signal-rate modulo operator. Only works in AudioRange [-1, 1] and for modulus\n * values in the NormalRange.\n *\n * @constructor\n * @extends {Tone.SignalBase}\n * @param {NormalRange} modulus The modulus to apply.\n * @example\n * var mod = new Tone.Modulo(0.2)\n * var sig = new Tone.Signal(0.5).connect(mod);\n * //mod outputs 0.1\n */\nTone.Modulo = function(modulus){\n\n\tTone.SignalBase.call(this);\n\tthis.createInsOuts(1, 0);\n\n\t/**\n\t * A waveshaper gets the integer multiple of\n\t * the input signal and the modulus.\n\t * @private\n\t * @type {Tone.WaveShaper}\n\t */\n\tthis._shaper = new Tone.WaveShaper(Math.pow(2, 16));\n\n\t/**\n\t * the integer multiple is multiplied by the modulus\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._multiply = new Tone.Multiply();\n\n\t/**\n\t * and subtracted from the input signal\n\t * @type {Tone.Subtract}\n\t * @private\n\t */\n\tthis._subtract = this.output = new Tone.Subtract();\n\n\t/**\n\t * the modulus signal\n\t * @type {Tone.Signal}\n\t * @private\n\t */\n\tthis._modSignal = new Tone.Signal(modulus);\n\n\t//connections\n\tTone.connect(this.input, this._shaper);\n\tTone.connect(this.input, this._subtract);\n\tthis._modSignal.connect(this._multiply, 0, 0);\n\tthis._shaper.connect(this._multiply, 0, 1);\n\tthis._multiply.connect(this._subtract, 0, 1);\n\tthis._setWaveShaper(modulus);\n};\n\nTone.extend(Tone.Modulo, Tone.SignalBase);\n\n/**\n * @param {number} mod the modulus to apply\n * @private\n */\nTone.Modulo.prototype._setWaveShaper = function(mod){\n\tthis._shaper.setMap(function(val){\n\t\tvar multiple = Math.floor((val + 0.0001) / mod);\n\t\treturn multiple;\n\t});\n};\n\n/**\n * The modulus value.\n * @memberOf Tone.Modulo#\n * @type {NormalRange}\n * @name value\n */\nObject.defineProperty(Tone.Modulo.prototype, \"value\", {\n\tget : function(){\n\t\treturn this._modSignal.value;\n\t},\n\tset : function(mod){\n\t\tthis._modSignal.value = mod;\n\t\tthis._setWaveShaper(mod);\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.Modulo} this\n */\nTone.Modulo.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._shaper.dispose();\n\tthis._shaper = null;\n\tthis._multiply.dispose();\n\tthis._multiply = null;\n\tthis._subtract.dispose();\n\tthis._subtract = null;\n\tthis._modSignal.dispose();\n\tthis._modSignal = null;\n\treturn this;\n};\n\nexport default Tone.Modulo;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Context\";\nimport \"../shim/OfflineAudioContext\";\n\n/**\n * @class Wrapper around the OfflineAudioContext\n * @extends {Tone.Context}\n * @param {Number} channels The number of channels to render\n * @param {Number} duration The duration to render in samples\n * @param {Number} sampleRate the sample rate to render at\n */\nTone.OfflineContext = function(channels, duration, sampleRate){\n\n\t/**\n\t * The offline context\n\t * @private\n\t * @type {OfflineAudioContext}\n\t */\n\tvar offlineContext = new OfflineAudioContext(channels, duration * sampleRate, sampleRate);\n\n\t//wrap the methods/members\n\tTone.Context.call(this, {\n\t\t\"context\" : offlineContext,\n\t\t\"clockSource\" : \"offline\",\n\t\t\"lookAhead\" : 0,\n\t\t\"updateInterval\" : 128 / sampleRate\n\t});\n\n\t/**\n\t * A private reference to the duration\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._duration = duration;\n\n\t/**\n\t * An artificial clock source\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._currentTime = 0;\n};\n\nTone.extend(Tone.OfflineContext, Tone.Context);\n\n/**\n * Override the now method to point to the internal clock time\n * @return {Number}\n */\nTone.OfflineContext.prototype.now = function(){\n\treturn this._currentTime;\n};\n\n/**\n * Overwrite resume, should not do anything in the OfflineAudioContext.\n * @return {Promise}\n */\nTone.OfflineContext.prototype.resume = function(){\n\treturn Promise.resolve();\n};\n\n/**\n * Render the output of the OfflineContext\n * @return {Promise}\n */\nTone.OfflineContext.prototype.render = function(){\n\twhile (this._duration - this._currentTime >= 0){\n\t\t//invoke all the callbacks on that time\n\t\tthis.emit(\"tick\");\n\t\t//increment the clock in 5ms chunks\n\t\tthis._currentTime += 0.005;\n\t}\n\n\treturn this._context.startRendering();\n};\n\n/**\n * Close the context\n * @return {Promise}\n */\nTone.OfflineContext.prototype.close = function(){\n\tthis._context = null;\n\treturn Promise.resolve();\n};\n\nexport default Tone.OfflineContext;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Transport\";\nimport \"../core/Buffer\";\nimport \"../core/OfflineContext\";\nimport \"../core/Master\";\n\n/**\n * Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.\n * The OfflineAudioContext is capable of rendering much faster than real time in many cases.\n * The callback function also passes in an offline instance of Tone.Transport which can be used\n * to schedule events along the Transport. **NOTE** OfflineAudioContext has the same restrictions\n * as the AudioContext in that on certain platforms (like iOS) it must be invoked by an explicit\n * user action like a click or tap. \n * @param {Function} callback All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.\n * @param {Time} duration the amount of time to record for.\n * @return {Promise} The promise which is invoked with the Tone.Buffer of the recorded output.\n * @example\n * //render 2 seconds of the oscillator\n * Tone.Offline(function(){\n * \t//only nodes created in this callback will be recorded\n * \tvar oscillator = new Tone.Oscillator().toMaster().start(0)\n * \t//schedule their events\n * }, 2).then(function(buffer){\n * \t//do something with the output buffer\n * })\n * @example\n * //can also schedule events along the Transport\n * //using the passed in Offline Transport\n * Tone.Offline(function(Transport){\n * \tvar osc = new Tone.Oscillator().toMaster()\n * \tTransport.schedule(function(time){\n * \t\tosc.start(time).stop(time + 0.1)\n * \t}, 1)\n * \tTransport.start(0.2)\n * }, 4).then(function(buffer){\n * \t//do something with the output buffer\n * })\n */\nTone.Offline = function(callback, duration){\n\t//set the OfflineAudioContext\n\tvar sampleRate = Tone.context.sampleRate;\n\tvar originalContext = Tone.context;\n\n\tvar context = new Tone.OfflineContext(2, duration, sampleRate);\n\tTone.context = context;\n\n\t//invoke the callback/scheduling\n\tvar response = callback(Tone.Transport);\n\n\t//the return value\n\tvar ret = null;\n\n\tif (response && Tone.isFunction(response.then)){\n\t\t//wait for the promise to resolve\n\t\tret = response.then(function(){\n\t\t\t//then render the audio\n\t\t\treturn context.render();\n\t\t});\n\t} else {\n\t\t//process the audio\n\t\tret = context.render();\n\t}\n\n\t//return the original AudioContext\n\tTone.context = originalContext;\n\n\t//return the audio\n\treturn ret.then(function(buffer){\n\t\t//wrap it in a Tone.Buffer\n\t\treturn new Tone.Buffer(buffer);\n\t});\n};\n\nexport default Tone.Offline;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Buffer\";\n\n/**\n * @class A data structure for holding multiple buffers.\n * \n * @param {Object|Array} urls An object literal or array\n * of urls to load.\n * @param {Function=} callback The callback to invoke when\n * the buffers are loaded. \n * @extends {Tone}\n * @example\n * //load a whole bank of piano samples\n * var pianoSamples = new Tone.Buffers({\n * \t\"C4\" : \"path/to/C4.mp3\"\n * \t\"C#4\" : \"path/to/C#4.mp3\"\n * \t\"D4\" : \"path/to/D4.mp3\"\n * \t\"D#4\" : \"path/to/D#4.mp3\"\n * \t...\n * }, function(){\n * \t//play one of the samples when they all load\n * \tplayer.buffer = pianoSamples.get(\"C4\");\n * \tplayer.start();\n * });\n * \t@example\n * //To pass in additional parameters in the second parameter\n * var buffers = new Tone.Buffers(urls, {\n * \t\"onload\" : callback,\n * \t\"baseUrl\" : \"../path/to/audio/\"\n * })\n */\nTone.Buffers = function(urls){\n\n\t//remove the urls from the options\n\tvar args = Array.prototype.slice.call(arguments);\n\targs.shift();\n\tvar options = Tone.defaults(args, [\"onload\", \"baseUrl\"], Tone.Buffers);\n\tTone.call(this);\n\n\t/**\n\t * All of the buffers\n\t * @type {Object}\n\t * @private\n\t */\n\tthis._buffers = {};\n\n\t/**\n\t * A path which is prefixed before every url.\n\t * @type {String}\n\t */\n\tthis.baseUrl = options.baseUrl;\n\n\tthis._loadingCount = 0;\n\t//add each one\n\tfor (var key in urls){\n\t\tthis._loadingCount++;\n\t\tthis.add(key, urls[key], this._bufferLoaded.bind(this, options.onload));\n\t}\n};\n\nTone.extend(Tone.Buffers);\n\n/**\n * Defaults\n * @type {Object}\n */\nTone.Buffers.defaults = {\n\t\"onload\" : Tone.noOp,\n\t\"baseUrl\" : \"\"\n};\n\n/**\n * True if the buffers object has a buffer by that name.\n * @param {String|Number} name The key or index of the \n * buffer.\n * @return {Boolean}\n */\nTone.Buffers.prototype.has = function(name){\n\treturn this._buffers.hasOwnProperty(name);\n};\n\n/**\n * Get a buffer by name. If an array was loaded, \n * then use the array index.\n * @param {String|Number} name The key or index of the \n * buffer.\n * @return {Tone.Buffer}\n */\nTone.Buffers.prototype.get = function(name){\n\tif (this.has(name)){\n\t\treturn this._buffers[name];\n\t} else {\n\t\tthrow new Error(\"Tone.Buffers: no buffer named \"+name);\n\t}\n};\n\n/**\n * A buffer was loaded. decrement the counter.\n * @param {Function} callback \n * @private\n */\nTone.Buffers.prototype._bufferLoaded = function(callback){\n\tthis._loadingCount--;\n\tif (this._loadingCount === 0 && callback){\n\t\tcallback(this);\n\t}\n};\n\n/**\n * If the buffers are loaded or not\n * @memberOf Tone.Buffers#\n * @type {Boolean}\n * @name loaded\n * @readOnly\n */\nObject.defineProperty(Tone.Buffers.prototype, \"loaded\", {\n\tget : function(){\n\t\tvar isLoaded = true;\n\t\tfor (var buffName in this._buffers){\n\t\t\tvar buff = this.get(buffName);\n\t\t\tisLoaded = isLoaded && buff.loaded;\n\t\t}\n\t\treturn isLoaded;\n\t}\n});\n\n/**\n * Add a buffer by name and url to the Buffers\n * @param {String} name A unique name to give\n * the buffer\n * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer, \n * or a buffer which will be added\n * with the given name.\n * @param {Function=} callback The callback to invoke \n * when the url is loaded.\n */\nTone.Buffers.prototype.add = function(name, url, callback){\n\tcallback = Tone.defaultArg(callback, Tone.noOp);\n\tif (url instanceof Tone.Buffer){\n\t\tthis._buffers[name] = url;\n\t\tcallback(this);\n\t} else if (url instanceof AudioBuffer){\n\t\tthis._buffers[name] = new Tone.Buffer(url);\n\t\tcallback(this);\n\t} else if (Tone.isString(url)){\n\t\tthis._buffers[name] = new Tone.Buffer(this.baseUrl + url, callback);\n\t}\n\treturn this;\n};\n\n/**\n * Clean up.\n * @return {Tone.Buffers} this\n */\nTone.Buffers.prototype.dispose = function(){\n\tTone.prototype.dispose.call(this);\n\tfor (var name in this._buffers){\n\t\tthis._buffers[name].dispose();\n\t}\n\tthis._buffers = null;\n\treturn this;\n};\n\nexport default Tone.Buffers;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * @class Generate patterns from an array of values.\n * Has a number of arpeggiation and randomized\n * selection patterns. \n * \n * \t - \"up\" - cycles upward
\n * \t\t\t- \"down\" - cycles downward
\n * \t\t\t- \"upDown\" - up then and down
\n * \t\t\t- \"downUp\" - cycles down then and up
\n * \t\t\t- \"alternateUp\" - jump up two and down one
\n * \t\t\t- \"alternateDown\" - jump down two and up one
\n * \t\t\t- \"random\" - randomly select an index
\n * \t\t\t- \"randomWalk\" - randomly moves one index away from the current position
\n * \t\t\t- \"randomOnce\" - randomly select an index without repeating until all values have been chosen.
\n * \t\t
\n * @param {Array} values An array of options to choose from.\n * @param {Tone.CtrlPattern.Type=} type The name of the pattern.\n * @extends {Tone}\n */\nTone.CtrlPattern = function(){\n\n\tvar options = Tone.defaults(arguments, [\"values\", \"type\"], Tone.CtrlPattern);\n\tTone.call(this);\n\n\t/**\n\t * The array of values to arpeggiate over\n\t * @type {Array}\n\t */\n\tthis.values = options.values;\n\t\n\t/**\n\t * The current position in the values array\n\t * @type {Number}\n\t */\n\tthis.index = 0;\n\n\t/**\n\t * The type placeholder\n\t * @type {Tone.CtrlPattern.Type}\n\t * @private\n\t */\n\tthis._type = null;\n\n\t/**\n\t * Shuffled values for the RandomOnce type\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._shuffled = null;\n\n\t/**\n\t * The direction of the movement\n\t * @type {String}\n\t * @private\n\t */\n\tthis._direction = null;\n\n\tthis.type = options.type;\n};\n\nTone.extend(Tone.CtrlPattern);\n\n/**\n * The Control Patterns\n * @type {Object}\n * @static\n */\nTone.CtrlPattern.Type = {\n\tUp : \"up\",\n\tDown : \"down\",\n\tUpDown : \"upDown\",\n\tDownUp : \"downUp\",\n\tAlternateUp : \"alternateUp\",\n\tAlternateDown : \"alternateDown\",\n\tRandom : \"random\",\n\tRandomWalk : \"randomWalk\",\n\tRandomOnce : \"randomOnce\",\n};\n\n/**\n * The default values. \n * @type {Object}\n */\nTone.CtrlPattern.defaults = {\n\t\"type\" : Tone.CtrlPattern.Type.Up,\n\t\"values\" : []\n};\n\n/**\n * The value at the current index of the pattern.\n * @readOnly\n * @memberOf Tone.CtrlPattern#\n * @type {*}\n * @name value\n */\nObject.defineProperty(Tone.CtrlPattern.prototype, \"value\", {\n\tget : function(){\n\t\t//some safeguards\n\t\tif (this.values.length === 0){\n\t\t\treturn undefined;\n\t\t} else if (this.values.length === 1){\n\t\t\treturn this.values[0];\n\t\t} \n\t\tthis.index = Math.min(this.index, this.values.length - 1);\n\t\tvar val = this.values[this.index];\n\t\tif (this.type === Tone.CtrlPattern.Type.RandomOnce){\n\t\t\tif (this.values.length !== this._shuffled.length){\n\t\t\t\tthis._shuffleValues();\n\t\t\t}\n\t\t\tval = this.values[this._shuffled[this.index]];\n\t\t}\n\t\treturn val;\n\t}\n});\n\n/**\n * The pattern used to select the next\n * item from the values array\n * @memberOf Tone.CtrlPattern#\n * @type {Tone.CtrlPattern.Type}\n * @name type\n */\nObject.defineProperty(Tone.CtrlPattern.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._type;\n\t},\n\tset : function(type){\n\t\tthis._type = type;\n\t\tthis._shuffled = null;\n\n\t\t//the first index\n\t\tif (this._type === Tone.CtrlPattern.Type.Up ||\n\t\t\t\tthis._type === Tone.CtrlPattern.Type.UpDown || \n\t\t\t\tthis._type === Tone.CtrlPattern.Type.RandomOnce ||\n\t\t\t\tthis._type === Tone.CtrlPattern.Type.AlternateUp){\n\t\t\tthis.index = 0;\n\t\t} else if (this._type === Tone.CtrlPattern.Type.Down ||\n\t\t\t\tthis._type === Tone.CtrlPattern.Type.DownUp || \n\t\t\t\tthis._type === Tone.CtrlPattern.Type.AlternateDown){\n\t\t\tthis.index = this.values.length - 1;\n\t\t}\n\n\t\t//the direction\n\t\tif (this._type === Tone.CtrlPattern.Type.UpDown || \n\t\t\t\tthis._type === Tone.CtrlPattern.Type.AlternateUp){\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Up;\n\t\t} else if (this._type === Tone.CtrlPattern.Type.DownUp || \n\t\t\t\tthis._type === Tone.CtrlPattern.Type.AlternateDown){\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Down;\n\t\t}\n\n\t\t//randoms\n\t\tif (this._type === Tone.CtrlPattern.Type.RandomOnce){\n\t\t\tthis._shuffleValues();\n\t\t} else if (this._type === Tone.CtrlPattern.Type.Random){\n\t\t\tthis.index = Math.floor(Math.random() * this.values.length);\n\t\t}\n\t}\n});\n\n/**\n * Return the next value given the current position\n * and pattern.\n * @return {*} The next value\n */\nTone.CtrlPattern.prototype.next = function(){\n\t\n\tvar type = this.type;\n\n\t//choose the next index\n\tif (type === Tone.CtrlPattern.Type.Up){\n\t\tthis.index++;\n\t\tif (this.index >= this.values.length){\n\t\t\tthis.index = 0;\n\t\t}\n\t} else if (type === Tone.CtrlPattern.Type.Down){\n\t\tthis.index--;\n\t\tif (this.index < 0){\n\t\t\tthis.index = this.values.length - 1;\n\t\t}\n\t} else if (type === Tone.CtrlPattern.Type.UpDown ||\n\t\t\t\ttype === Tone.CtrlPattern.Type.DownUp){\n\t\tif (this._direction === Tone.CtrlPattern.Type.Up){\n\t\t\tthis.index++;\n\t\t} else {\n\t\t\tthis.index--;\n\t\t}\n\t\tif (this.index < 0){\n\t\t\tthis.index = 1;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Up;\n\t\t} else if (this.index >= this.values.length){\n\t\t\tthis.index = this.values.length - 2;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Down;\n\t\t}\n\t} else if (type === Tone.CtrlPattern.Type.Random){\n\t\tthis.index = Math.floor(Math.random() * this.values.length);\n\t} else if (type === Tone.CtrlPattern.Type.RandomWalk){\n\t\tif (Math.random() < 0.5){\n\t\t\tthis.index--;\n\t\t\tthis.index = Math.max(this.index, 0);\n\t\t} else {\n\t\t\tthis.index++;\n\t\t\tthis.index = Math.min(this.index, this.values.length - 1);\n\t\t}\n\t} else if (type === Tone.CtrlPattern.Type.RandomOnce){\n\t\tthis.index++;\n\t\tif (this.index >= this.values.length){\n\t\t\tthis.index = 0;\n\t\t\t//reshuffle the values for next time\n\t\t\tthis._shuffleValues();\n\t\t}\n\t} else if (type === Tone.CtrlPattern.Type.AlternateUp){\n\t\tif (this._direction === Tone.CtrlPattern.Type.Up){\n\t\t\tthis.index += 2;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Down;\n\t\t} else {\n\t\t\tthis.index -= 1;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Up;\n\t\t}\n\t\tif (this.index >= this.values.length){\n\t\t\tthis.index = 0;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Up;\n\t\t}\n\t} else if (type === Tone.CtrlPattern.Type.AlternateDown){\n\t\tif (this._direction === Tone.CtrlPattern.Type.Up){\n\t\t\tthis.index += 1;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Down;\n\t\t} else {\n\t\t\tthis.index -= 2;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Up;\n\t\t}\n\t\tif (this.index < 0){\n\t\t\tthis.index = this.values.length - 1;\n\t\t\tthis._direction = Tone.CtrlPattern.Type.Down;\n\t\t}\n\t}\n\treturn this.value;\n};\n\n/**\n * Shuffles the values and places the results into the _shuffled\n * @private\n */\nTone.CtrlPattern.prototype._shuffleValues = function(){\n\tvar copy = [];\n\tthis._shuffled = [];\n\tfor (var i = 0; i < this.values.length; i++){\n\t\tcopy[i] = i;\n\t}\n\twhile (copy.length > 0){\n\t\tvar randVal = copy.splice(Math.floor(copy.length * Math.random()), 1);\n\t\tthis._shuffled.push(randVal[0]);\n\t}\n};\n\n/**\n * Clean up\n * @returns {Tone.CtrlPattern} this\n */\nTone.CtrlPattern.prototype.dispose = function(){\n\tthis._shuffled = null;\n\tthis.values = null;\n};\n\nexport default Tone.CtrlPattern;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/TransportEvent\";\nimport \"../type/Ticks\";\n\n/**\n * @class Tone.TransportRepeatEvent is an internal class used by Tone.Transport\n * to schedule repeat events. This class should not be instantiated directly.\n * @extends {Tone.TransportEvent}\n * @param {Object} options\n */\nTone.TransportRepeatEvent = function(Transport, options){\n\n\tTone.TransportEvent.call(this, Transport, options);\n\toptions = Tone.defaultArg(options, Tone.TransportRepeatEvent.defaults);\n\n\t/**\n\t * When the event should stop repeating\n\t * @type {Ticks}\n\t * @private\n\t */\n\tthis.duration = Tone.Ticks(options.duration);\n\n\t/**\n\t * The interval of the repeated event\n\t * @type {Ticks}\n\t * @private\n\t */\n\tthis._interval = Tone.Ticks(options.interval);\n\n\t/**\n\t * The ID of the current timeline event\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._currentId = -1;\n\n\t/**\n\t * The ID of the next timeline event\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._nextId = -1;\n\n\t/**\n\t * The time of the next event\n\t * @type {Ticks}\n\t * @private\n\t */\n\tthis._nextTick = this.time;\n\n\t/**\n\t * a reference to the bound start method\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._boundRestart = this._restart.bind(this);\n\tthis.Transport.on(\"start loopStart\", this._boundRestart);\n\tthis._restart();\n};\n\nTone.extend(Tone.TransportRepeatEvent, Tone.TransportEvent);\n\n/**\n * The defaults\n * @static\n * @type {Object}\n */\nTone.TransportRepeatEvent.defaults = {\n\t\"duration\" : Infinity,\n\t\"interval\" : 1\n};\n\n/**\n * Invoke the callback. Returns the tick time which\n * the next event should be scheduled at.\n * @param {Number} time The AudioContext time in seconds of the event\n */\nTone.TransportRepeatEvent.prototype.invoke = function(time){\n\t//create more events if necessary\n\tthis._createEvents(time);\n\t//call the super class\n\tTone.TransportEvent.prototype.invoke.call(this, time);\n};\n\n/**\n * Push more events onto the timeline to keep up with the position of the timeline\n * @private\n */\nTone.TransportRepeatEvent.prototype._createEvents = function(time){\n\t// schedule the next event\n\tvar ticks = this.Transport.getTicksAtTime(time);\n\tif (ticks >= this.time && ticks >= this._nextTick &&\n\tthis._nextTick + this._interval < this.time + this.duration){\n\t\tthis._nextTick += this._interval;\n\t\tthis._currentId = this._nextId;\n\t\tthis._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\t}\n};\n\n/**\n * Push more events onto the timeline to keep up with the position of the timeline\n * @private\n */\nTone.TransportRepeatEvent.prototype._restart = function(time){\n\tthis.Transport.clear(this._currentId);\n\tthis.Transport.clear(this._nextId);\n\tthis._nextTick = this.time;\n\tvar ticks = this.Transport.getTicksAtTime(time);\n\tif (ticks > this.time){\n\t\tthis._nextTick = this.time + Math.ceil((ticks - this.time) / this._interval) * this._interval;\n\t}\n\tthis._currentId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n\tthis._nextTick += this._interval;\n\tthis._nextId = this.Transport.scheduleOnce(this.invoke.bind(this), Tone.Ticks(this._nextTick));\n};\n\n/**\n * Clean up\n * @return {Tone.TransportRepeatEvent} this\n */\nTone.TransportRepeatEvent.prototype.dispose = function(){\n\tthis.Transport.clear(this._currentId);\n\tthis.Transport.clear(this._nextId);\n\tthis.Transport.off(\"start loopStart\", this._boundRestart);\n\tthis._boundCreateEvents = null;\n\tTone.TransportEvent.prototype.dispose.call(this);\n\tthis.duration = null;\n\tthis._interval = null;\n\treturn this;\n};\n\nexport default Tone.TransportRepeatEvent;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Type\";\n\n/**\n * @class Similar to Tone.Timeline, but all events represent\n * intervals with both \"time\" and \"duration\" times. The\n * events are placed in a tree structure optimized\n * for querying an intersection point with the timeline\n * events. Internally uses an [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)\n * to represent the data.\n * @extends {Tone}\n */\nTone.IntervalTimeline = function(){\n\n\tTone.call(this);\n\n\t/**\n\t * The root node of the inteval tree\n\t * @type {IntervalNode}\n\t * @private\n\t */\n\tthis._root = null;\n\n\t/**\n\t * Keep track of the length of the timeline.\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._length = 0;\n};\n\nTone.extend(Tone.IntervalTimeline);\n\n/**\n * The event to add to the timeline. All events must\n * have a time and duration value\n * @param {Object} event The event to add to the timeline\n * @return {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.add = function(event){\n\tif (Tone.isUndef(event.time) || Tone.isUndef(event.duration)){\n\t\tthrow new Error(\"Tone.IntervalTimeline: events must have time and duration parameters\");\n\t}\n\tevent.time = event.time.valueOf();\n\tvar node = new IntervalNode(event.time, event.time + event.duration, event);\n\tif (this._root === null){\n\t\tthis._root = node;\n\t} else {\n\t\tthis._root.insert(node);\n\t}\n\tthis._length++;\n\t// Restructure tree to be balanced\n\twhile (node !== null){\n\t\tnode.updateHeight();\n\t\tnode.updateMax();\n\t\tthis._rebalance(node);\n\t\tnode = node.parent;\n\t}\n\treturn this;\n};\n\n/**\n * Remove an event from the timeline.\n * @param {Object} event The event to remove from the timeline\n * @return {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.remove = function(event){\n\tif (this._root !== null){\n\t\tvar results = [];\n\t\tthis._root.search(event.time, results);\n\t\tfor (var i = 0; i < results.length; i++){\n\t\t\tvar node = results[i];\n\t\t\tif (node.event === event){\n\t\t\t\tthis._removeNode(node);\n\t\t\t\tthis._length--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * The number of items in the timeline.\n * @type {Number}\n * @memberOf Tone.IntervalTimeline#\n * @name length\n * @readOnly\n */\nObject.defineProperty(Tone.IntervalTimeline.prototype, \"length\", {\n\tget : function(){\n\t\treturn this._length;\n\t}\n});\n\n/**\n * Remove events whose time time is after the given time\n * @param {Number} time The time to query.\n * @returns {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.cancel = function(after){\n\tthis.forEachFrom(after, function(event){\n\t\tthis.remove(event);\n\t}.bind(this));\n\treturn this;\n};\n\n/**\n * Set the root node as the given node\n * @param {IntervalNode} node\n * @private\n */\nTone.IntervalTimeline.prototype._setRoot = function(node){\n\tthis._root = node;\n\tif (this._root !== null){\n\t\tthis._root.parent = null;\n\t}\n};\n\n/**\n * Replace the references to the node in the node's parent\n * with the replacement node.\n * @param {IntervalNode} node\n * @param {IntervalNode} replacement\n * @private\n */\nTone.IntervalTimeline.prototype._replaceNodeInParent = function(node, replacement){\n\tif (node.parent !== null){\n\t\tif (node.isLeftChild()){\n\t\t\tnode.parent.left = replacement;\n\t\t} else {\n\t\t\tnode.parent.right = replacement;\n\t\t}\n\t\tthis._rebalance(node.parent);\n\t} else {\n\t\tthis._setRoot(replacement);\n\t}\n};\n\n/**\n * Remove the node from the tree and replace it with\n * a successor which follows the schema.\n * @param {IntervalNode} node\n * @private\n */\nTone.IntervalTimeline.prototype._removeNode = function(node){\n\tif (node.left === null && node.right === null){\n\t\tthis._replaceNodeInParent(node, null);\n\t} else if (node.right === null){\n\t\tthis._replaceNodeInParent(node, node.left);\n\t} else if (node.left === null){\n\t\tthis._replaceNodeInParent(node, node.right);\n\t} else {\n\t\tvar balance = node.getBalance();\n\t\tvar replacement, temp;\n\t\tif (balance > 0){\n\t\t\tif (node.left.right === null){\n\t\t\t\treplacement = node.left;\n\t\t\t\treplacement.right = node.right;\n\t\t\t\ttemp = replacement;\n\t\t\t} else {\n\t\t\t\treplacement = node.left.right;\n\t\t\t\twhile (replacement.right !== null){\n\t\t\t\t\treplacement = replacement.right;\n\t\t\t\t}\n\t\t\t\treplacement.parent.right = replacement.left;\n\t\t\t\ttemp = replacement.parent;\n\t\t\t\treplacement.left = node.left;\n\t\t\t\treplacement.right = node.right;\n\t\t\t}\n\t\t} else if (node.right.left === null){\n\t\t\treplacement = node.right;\n\t\t\treplacement.left = node.left;\n\t\t\ttemp = replacement;\n\t\t} else {\n\t\t\treplacement = node.right.left;\n\t\t\twhile (replacement.left !== null){\n\t\t\t\treplacement = replacement.left;\n\t\t\t}\n\t\t\treplacement.parent.left = replacement.right;\n\t\t\ttemp = replacement.parent;\n\t\t\treplacement.left = node.left;\n\t\t\treplacement.right = node.right;\n\t\t}\n\t\tif (node.parent !== null){\n\t\t\tif (node.isLeftChild()){\n\t\t\t\tnode.parent.left = replacement;\n\t\t\t} else {\n\t\t\t\tnode.parent.right = replacement;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._setRoot(replacement);\n\t\t}\n\t\t// this._replaceNodeInParent(node, replacement);\n\t\tthis._rebalance(temp);\n\t}\n\tnode.dispose();\n};\n\n/**\n * Rotate the tree to the left\n * @param {IntervalNode} node\n * @private\n */\nTone.IntervalTimeline.prototype._rotateLeft = function(node){\n\tvar parent = node.parent;\n\tvar isLeftChild = node.isLeftChild();\n\n\t// Make node.right the new root of this sub tree (instead of node)\n\tvar pivotNode = node.right;\n\tnode.right = pivotNode.left;\n\tpivotNode.left = node;\n\n\tif (parent !== null){\n\t\tif (isLeftChild){\n\t\t\tparent.left = pivotNode;\n\t\t} else {\n\t\t\tparent.right = pivotNode;\n\t\t}\n\t} else {\n\t\tthis._setRoot(pivotNode);\n\t}\n};\n\n/**\n * Rotate the tree to the right\n * @param {IntervalNode} node\n * @private\n */\nTone.IntervalTimeline.prototype._rotateRight = function(node){\n\tvar parent = node.parent;\n\tvar isLeftChild = node.isLeftChild();\n\n\t// Make node.left the new root of this sub tree (instead of node)\n\tvar pivotNode = node.left;\n\tnode.left = pivotNode.right;\n\tpivotNode.right = node;\n\n\tif (parent !== null){\n\t\tif (isLeftChild){\n\t\t\tparent.left = pivotNode;\n\t\t} else {\n\t\t\tparent.right = pivotNode;\n\t\t}\n\t} else {\n\t\tthis._setRoot(pivotNode);\n\t}\n};\n\n/**\n * Balance the BST\n * @param {IntervalNode} node\n * @private\n */\nTone.IntervalTimeline.prototype._rebalance = function(node){\n\tvar balance = node.getBalance();\n\tif (balance > 1){\n\t\tif (node.left.getBalance() < 0){\n\t\t\tthis._rotateLeft(node.left);\n\t\t} else {\n\t\t\tthis._rotateRight(node);\n\t\t}\n\t} else if (balance < -1){\n\t\tif (node.right.getBalance() > 0){\n\t\t\tthis._rotateRight(node.right);\n\t\t} else {\n\t\t\tthis._rotateLeft(node);\n\t\t}\n\t}\n};\n\n/**\n * Get an event whose time and duration span the give time. Will\n * return the match whose \"time\" value is closest to the given time.\n * @param {Object} event The event to add to the timeline\n * @return {Object} The event which spans the desired time\n */\nTone.IntervalTimeline.prototype.get = function(time){\n\tif (this._root !== null){\n\t\tvar results = [];\n\t\tthis._root.search(time, results);\n\t\tif (results.length > 0){\n\t\t\tvar max = results[0];\n\t\t\tfor (var i = 1; i < results.length; i++){\n\t\t\t\tif (results[i].low > max.low){\n\t\t\t\t\tmax = results[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn max.event;\n\t\t}\n\t}\n\treturn null;\n};\n\n/**\n * Iterate over everything in the timeline.\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.forEach = function(callback){\n\tif (this._root !== null){\n\t\tvar allNodes = [];\n\t\tthis._root.traverse(function(node){\n\t\t\tallNodes.push(node);\n\t\t});\n\t\tfor (var i = 0; i < allNodes.length; i++){\n\t\t\tvar ev = allNodes[i].event;\n\t\t\tif (ev){\n\t\t\t\tcallback(ev);\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array in which the given time\n * overlaps with the time and duration time of the event.\n * @param {Number} time The time to check if items are overlapping\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.forEachAtTime = function(time, callback){\n\tif (this._root !== null){\n\t\tvar results = [];\n\t\tthis._root.search(time, results);\n\t\tfor (var i = results.length - 1; i >= 0; i--){\n\t\t\tvar ev = results[i].event;\n\t\t\tif (ev){\n\t\t\t\tcallback(ev);\n\t\t\t}\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Iterate over everything in the array in which the time is greater\n * than or equal to the given time.\n * @param {Number} time The time to check if items are before\n * @param {Function} callback The callback to invoke with every item\n * @returns {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.forEachFrom = function(time, callback){\n\tif (this._root !== null){\n\t\tvar results = [];\n\t\tthis._root.searchAfter(time, results);\n\t\tfor (var i = results.length - 1; i >= 0; i--){\n\t\t\tvar ev = results[i].event;\n\t\t\tcallback(ev);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Clean up\n * @return {Tone.IntervalTimeline} this\n */\nTone.IntervalTimeline.prototype.dispose = function(){\n\tvar allNodes = [];\n\tif (this._root !== null){\n\t\tthis._root.traverse(function(node){\n\t\t\tallNodes.push(node);\n\t\t});\n\t}\n\tfor (var i = 0; i < allNodes.length; i++){\n\t\tallNodes[i].dispose();\n\t}\n\tallNodes = null;\n\tthis._root = null;\n\treturn this;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tINTERVAL NODE HELPER\n///////////////////////////////////////////////////////////////////////////\n\n/**\n * Represents a node in the binary search tree, with the addition\n * of a \"high\" value which keeps track of the highest value of\n * its children.\n * References:\n * https://brooknovak.wordpress.com/2013/12/07/augmented-interval-tree-in-c/\n * http://www.mif.vu.lt/~valdas/ALGORITMAI/LITERATURA/Cormen/Cormen.pdf\n * @param {Number} low\n * @param {Number} high\n * @private\n */\nvar IntervalNode = function(low, high, event){\n\t//the event container\n\tthis.event = event;\n\t//the low value\n\tthis.low = low;\n\t//the high value\n\tthis.high = high;\n\t//the high value for this and all child nodes\n\tthis.max = this.high;\n\t//the nodes to the left\n\tthis._left = null;\n\t//the nodes to the right\n\tthis._right = null;\n\t//the parent node\n\tthis.parent = null;\n\t//the number of child nodes\n\tthis.height = 0;\n};\n\n/**\n * Insert a node into the correct spot in the tree\n * @param {IntervalNode} node\n */\nIntervalNode.prototype.insert = function(node){\n\tif (node.low <= this.low){\n\t\tif (this.left === null){\n\t\t\tthis.left = node;\n\t\t} else {\n\t\t\tthis.left.insert(node);\n\t\t}\n\t} else if (this.right === null){\n\t\tthis.right = node;\n\t} else {\n\t\tthis.right.insert(node);\n\t}\n};\n\n/**\n * Search the tree for nodes which overlap\n * with the given point\n * @param {Number} point The point to query\n * @param {Array} results The array to put the results\n */\nIntervalNode.prototype.search = function(point, results){\n\t// If p is to the right of the rightmost point of any interval\n\t// in this node and all children, there won't be any matches.\n\tif (point > this.max){\n\t\treturn;\n\t}\n\t// Search left children\n\tif (this.left !== null){\n\t\tthis.left.search(point, results);\n\t}\n\t// Check this node\n\tif (this.low <= point && this.high > point){\n\t\tresults.push(this);\n\t}\n\t// If p is to the left of the time of this interval,\n\t// then it can't be in any child to the right.\n\tif (this.low > point){\n\t\treturn;\n\t}\n\t// Search right children\n\tif (this.right !== null){\n\t\tthis.right.search(point, results);\n\t}\n};\n\n/**\n * Search the tree for nodes which are less\n * than the given point\n * @param {Number} point The point to query\n * @param {Array} results The array to put the results\n */\nIntervalNode.prototype.searchAfter = function(point, results){\n\t// Check this node\n\tif (this.low >= point){\n\t\tresults.push(this);\n\t\tif (this.left !== null){\n\t\t\tthis.left.searchAfter(point, results);\n\t\t}\n\t}\n\t// search the right side\n\tif (this.right !== null){\n\t\tthis.right.searchAfter(point, results);\n\t}\n};\n\n/**\n * Invoke the callback on this element and both it's branches\n * @param {Function} callback\n */\nIntervalNode.prototype.traverse = function(callback){\n\tcallback(this);\n\tif (this.left !== null){\n\t\tthis.left.traverse(callback);\n\t}\n\tif (this.right !== null){\n\t\tthis.right.traverse(callback);\n\t}\n};\n\n/**\n * Update the height of the node\n */\nIntervalNode.prototype.updateHeight = function(){\n\tif (this.left !== null && this.right !== null){\n\t\tthis.height = Math.max(this.left.height, this.right.height) + 1;\n\t} else if (this.right !== null){\n\t\tthis.height = this.right.height + 1;\n\t} else if (this.left !== null){\n\t\tthis.height = this.left.height + 1;\n\t} else {\n\t\tthis.height = 0;\n\t}\n};\n\n/**\n * Update the height of the node\n */\nIntervalNode.prototype.updateMax = function(){\n\tthis.max = this.high;\n\tif (this.left !== null){\n\t\tthis.max = Math.max(this.max, this.left.max);\n\t}\n\tif (this.right !== null){\n\t\tthis.max = Math.max(this.max, this.right.max);\n\t}\n};\n\n/**\n * The balance is how the leafs are distributed on the node\n * @return {Number} Negative numbers are balanced to the right\n */\nIntervalNode.prototype.getBalance = function(){\n\tvar balance = 0;\n\tif (this.left !== null && this.right !== null){\n\t\tbalance = this.left.height - this.right.height;\n\t} else if (this.left !== null){\n\t\tbalance = this.left.height + 1;\n\t} else if (this.right !== null){\n\t\tbalance = -(this.right.height + 1);\n\t}\n\treturn balance;\n};\n\n/**\n * @returns {Boolean} true if this node is the left child\n * of its parent\n */\nIntervalNode.prototype.isLeftChild = function(){\n\treturn this.parent !== null && this.parent.left === this;\n};\n\n/**\n * get/set the left node\n * @type {IntervalNode}\n */\nObject.defineProperty(IntervalNode.prototype, \"left\", {\n\tget : function(){\n\t\treturn this._left;\n\t},\n\tset : function(node){\n\t\tthis._left = node;\n\t\tif (node !== null){\n\t\t\tnode.parent = this;\n\t\t}\n\t\tthis.updateHeight();\n\t\tthis.updateMax();\n\t}\n});\n\n/**\n * get/set the right node\n * @type {IntervalNode}\n */\nObject.defineProperty(IntervalNode.prototype, \"right\", {\n\tget : function(){\n\t\treturn this._right;\n\t},\n\tset : function(node){\n\t\tthis._right = node;\n\t\tif (node !== null){\n\t\t\tnode.parent = this;\n\t\t}\n\t\tthis.updateHeight();\n\t\tthis.updateMax();\n\t}\n});\n\n/**\n * null out references.\n */\nIntervalNode.prototype.dispose = function(){\n\tthis.parent = null;\n\tthis._left = null;\n\tthis._right = null;\n\tthis.event = null;\n};\n\n///////////////////////////////////////////////////////////////////////////\n//\tEND INTERVAL NODE HELPER\n///////////////////////////////////////////////////////////////////////////\n\nexport default Tone.IntervalTimeline;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\n\n/**\n * @class Tone.TickSignal extends Tone.Signal, but adds the capability\n * to calculate the number of elapsed ticks. exponential and target curves\n * are approximated with multiple linear ramps.\n *\n * Thank you Bruno Dias, H. Sofia Pinto, and David M. Matos, for your [WAC paper](https://smartech.gatech.edu/bitstream/handle/1853/54588/WAC2016-49.pdf)\n * describing integrating timing functions for tempo calculations.\n *\n * @param {Number} value The initial value of the signal\n * @extends {Tone.Signal}\n */\nTone.TickSignal = function(value){\n\n\tvalue = Tone.defaultArg(value, 1);\n\n\tTone.Signal.call(this, {\n\t\t\"units\" : Tone.Type.Ticks,\n\t\t\"value\" : value\n\t});\n\n\t//extend the memory\n\tthis._events.memory = Infinity;\n\n\t//clear the clock from the beginning\n\tthis.cancelScheduledValues(0);\n\t//set an initial event\n\tthis._events.add({\n\t\t\"type\" : Tone.Param.AutomationType.SetValue,\n\t\t\"time\" : 0,\n\t\t\"value\" : value\n\t});\n};\n\nTone.extend(Tone.TickSignal, Tone.Signal);\n\n/**\n * Wraps Tone.Signal methods so that they also\n * record the ticks.\n * @param {Function} method\n * @return {Function}\n * @private\n */\nfunction _wrapScheduleMethods(method){\n\treturn function(value, time){\n\t\ttime = this.toSeconds(time);\n\t\tmethod.apply(this, arguments);\n\t\tvar event = this._events.get(time);\n\t\tvar previousEvent = this._events.previousEvent(event);\n\t\tvar ticksUntilTime = this._getTicksUntilEvent(previousEvent, time);\n\t\tevent.ticks = Math.max(ticksUntilTime, 0);\n\t\treturn this;\n\t};\n}\n\nTone.TickSignal.prototype.setValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.setValueAtTime);\nTone.TickSignal.prototype.linearRampToValueAtTime = _wrapScheduleMethods(Tone.Signal.prototype.linearRampToValueAtTime);\n\n/**\n * Start exponentially approaching the target value at the given time with\n * a rate having the given time constant.\n * @param {number} value\n * @param {Time} startTime\n * @param {number} timeConstant\n * @returns {Tone.TickSignal} this\n */\nTone.TickSignal.prototype.setTargetAtTime = function(value, time, constant){\n\t//aproximate it with multiple linear ramps\n\ttime = this.toSeconds(time);\n\tthis.setRampPoint(time);\n\tvalue = this._fromUnits(value);\n\n\t//start from previously scheduled value\n\tvar prevEvent = this._events.get(time);\n\tvar segments = Math.round(Math.max(1 / constant, 1));\n\tfor (var i = 0; i <= segments; i++){\n\t\tvar segTime = constant * i + time;\n\t\tvar rampVal = this._exponentialApproach(prevEvent.time, prevEvent.value, value, constant, segTime);\n\t\tthis.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t}\n\treturn this;\n};\n\n/**\n * Schedules an exponential continuous change in parameter value from\n * the previous scheduled parameter value to the given value.\n * @param {number} value\n * @param {Time} endTime\n * @returns {Tone.TickSignal} this\n */\nTone.TickSignal.prototype.exponentialRampToValueAtTime = function(value, time){\n\t//aproximate it with multiple linear ramps\n\ttime = this.toSeconds(time);\n\tvalue = this._fromUnits(value);\n\n\t//start from previously scheduled value\n\tvar prevEvent = this._events.get(time);\n\t//approx 10 segments per second\n\tvar segments = Math.round(Math.max((time - prevEvent.time)*10, 1));\n\tvar segmentDur = ((time - prevEvent.time)/segments);\n\tfor (var i = 0; i <= segments; i++){\n\t\tvar segTime = segmentDur * i + prevEvent.time;\n\t\tvar rampVal = this._exponentialInterpolate(prevEvent.time, prevEvent.value, time, value, segTime);\n\t\tthis.linearRampToValueAtTime(this._toUnits(rampVal), segTime);\n\t}\n\treturn this;\n};\n\n/**\n * Returns the tick value at the time. Takes into account\n * any automation curves scheduled on the signal.\n * @private\n * @param {Time} time The time to get the tick count at\n * @return {Ticks} The number of ticks which have elapsed at the time\n * given any automations.\n */\nTone.TickSignal.prototype._getTicksUntilEvent = function(event, time){\n\tif (event === null){\n\t\tevent = {\n\t\t\t\"ticks\" : 0,\n\t\t\t\"time\" : 0\n\t\t};\n\t} else if (Tone.isUndef(event.ticks)){\n\t\tvar previousEvent = this._events.previousEvent(event);\n\t\tevent.ticks = this._getTicksUntilEvent(previousEvent, event.time);\n\t}\n\tvar val0 = this.getValueAtTime(event.time);\n\tvar val1 = this.getValueAtTime(time);\n\t//if it's right on the line, take the previous value\n\tif (this._events.get(time).time === time && this._events.get(time).type === Tone.Param.AutomationType.SetValue){\n\t\tval1 = this.getValueAtTime(time - this.sampleTime);\n\t}\n\treturn 0.5 * (time - event.time) * (val0 + val1) + event.ticks;\n};\n\n/**\n * Returns the tick value at the time. Takes into account\n * any automation curves scheduled on the signal.\n * @param {Time} time The time to get the tick count at\n * @return {Ticks} The number of ticks which have elapsed at the time\n * given any automations.\n */\nTone.TickSignal.prototype.getTicksAtTime = function(time){\n\ttime = this.toSeconds(time);\n\tvar event = this._events.get(time);\n\treturn Math.max(this._getTicksUntilEvent(event, time), 0);\n};\n\n/**\n * Return the elapsed time of the number of ticks from the given time\n * @param {Ticks} ticks The number of ticks to calculate\n * @param {Time} time The time to get the next tick from\n * @return {Seconds} The duration of the number of ticks from the given time in seconds\n */\nTone.TickSignal.prototype.getDurationOfTicks = function(ticks, time){\n\ttime = this.toSeconds(time);\n\tvar currentTick = this.getTicksAtTime(time);\n\treturn this.getTimeOfTick(currentTick + ticks) - time;\n};\n\n/**\n * Given a tick, returns the time that tick occurs at.\n * @param {Ticks} tick\n * @return {Time} The time that the tick occurs.\n */\nTone.TickSignal.prototype.getTimeOfTick = function(tick){\n\tvar before = this._events.get(tick, \"ticks\");\n\tvar after = this._events.getAfter(tick, \"ticks\");\n\tif (before && before.ticks === tick){\n\t\treturn before.time;\n\t} else if (before && after &&\n\t\tafter.type === Tone.Param.AutomationType.Linear &&\n\t\tbefore.value !== after.value){\n\t\tvar val0 = this.getValueAtTime(before.time);\n\t\tvar val1 = this.getValueAtTime(after.time);\n\t\tvar delta = (val1 - val0) / (after.time - before.time);\n\t\tvar k = Math.sqrt(Math.pow(val0, 2) - 2 * delta * (before.ticks - tick));\n\t\tvar sol1 = (-val0 + k) / delta;\n\t\tvar sol2 = (-val0 - k) / delta;\n\t\treturn (sol1 > 0 ? sol1 : sol2) + before.time;\n\t} else if (before){\n\t\tif (before.value === 0){\n\t\t\treturn Infinity;\n\t\t} else {\n\t\t\treturn before.time + (tick - before.ticks) / before.value;\n\t\t}\n\t} else {\n\t\treturn tick / this._initialValue;\n\t}\n};\n\n/**\n * Convert some number of ticks their the duration in seconds accounting\n * for any automation curves starting at the given time.\n * @param {Ticks} ticks The number of ticks to convert to seconds.\n * @param {Time} [when=now] When along the automation timeline to convert the ticks.\n * @return {Tone.Time} The duration in seconds of the ticks.\n */\nTone.TickSignal.prototype.ticksToTime = function(ticks, when){\n\twhen = this.toSeconds(when);\n\treturn new Tone.Time(this.getDurationOfTicks(ticks, when));\n};\n\n/**\n * The inverse of [ticksToTime](#tickstotime). Convert a duration in\n * seconds to the corresponding number of ticks accounting for any\n * automation curves starting at the given time.\n * @param {Time} duration The time interval to convert to ticks.\n * @param {Time} [when=now] When along the automation timeline to convert the ticks.\n * @return {Tone.Ticks} The duration in ticks.\n */\nTone.TickSignal.prototype.timeToTicks = function(duration, when){\n\twhen = this.toSeconds(when);\n\tduration = this.toSeconds(duration);\n\tvar startTicks = this.getTicksAtTime(when);\n\tvar endTicks = this.getTicksAtTime(when + duration);\n\treturn new Tone.Ticks(endTicks - startTicks);\n};\n\nexport default Tone.TickSignal;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/TickSource\";\nimport \"../core/TimelineState\";\nimport \"../core/Emitter\";\nimport \"../core/Context\";\n\n/**\n * @class A sample accurate clock which provides a callback at the given rate.\n * While the callback is not sample-accurate (it is still susceptible to\n * loose JS timing), the time passed in as the argument to the callback\n * is precise. For most applications, it is better to use Tone.Transport\n * instead of the Clock by itself since you can synchronize multiple callbacks.\n *\n * \t@constructor\n * @extends {Tone.Emitter}\n * \t@param {function} callback The callback to be invoked with the time of the audio event\n * \t@param {Frequency} frequency The rate of the callback\n * \t@example\n * //the callback will be invoked approximately once a second\n * //and will print the time exactly once a second apart.\n * var clock = new Tone.Clock(function(time){\n * \tconsole.log(time);\n * }, 1);\n */\nTone.Clock = function(){\n\n\tvar options = Tone.defaults(arguments, [\"callback\", \"frequency\"], Tone.Clock);\n\tTone.Emitter.call(this);\n\n\t/**\n\t * The callback function to invoke at the scheduled tick.\n\t * @type {Function}\n\t */\n\tthis.callback = options.callback;\n\n\t/**\n\t * The next time the callback is scheduled.\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._nextTick = 0;\n\n\t/**\n\t * The tick counter\n\t * @type {Tone.TickSource}\n\t * @private\n\t */\n\tthis._tickSource = new Tone.TickSource(options.frequency);\n\n\t/**\n\t * The last time the loop callback was invoked\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._lastUpdate = 0;\n\n\t/**\n\t * The rate the callback function should be invoked.\n\t * @type {BPM}\n\t * @signal\n\t */\n\tthis.frequency = this._tickSource.frequency;\n\tthis._readOnly(\"frequency\");\n\n\t/**\n\t * The state timeline\n\t * @type {Tone.TimelineState}\n\t * @private\n\t */\n\tthis._state = new Tone.TimelineState(Tone.State.Stopped);\n\t//add an initial state\n\tthis._state.setStateAtTime(Tone.State.Stopped, 0);\n\n\t/**\n\t * The loop function bound to its context.\n\t * This is necessary to remove the event in the end.\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._boundLoop = this._loop.bind(this);\n\n\t//bind a callback to the worker thread\n\tthis.context.on(\"tick\", this._boundLoop);\n};\n\nTone.extend(Tone.Clock, Tone.Emitter);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.Clock.defaults = {\n\t\"callback\" : Tone.noOp,\n\t\"frequency\" : 1,\n};\n\n/**\n * Returns the playback state of the source, either \"started\", \"stopped\" or \"paused\".\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.Clock#\n * @name state\n */\nObject.defineProperty(Tone.Clock.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._state.getValueAtTime(this.now());\n\t}\n});\n\n/**\n * Start the clock at the given time. Optionally pass in an offset\n * of where to start the tick counter from.\n * @param {Time=} time The time the clock should start\n * @param {Ticks=} offset Where the tick counter starts counting from.\n * @return {Tone.Clock} this\n */\nTone.Clock.prototype.start = function(time, offset){\n\t//make sure the context is started\n\tthis.context.resume();\n\t//start the loop\n\ttime = this.toSeconds(time);\n\tif (this._state.getValueAtTime(time) !== Tone.State.Started){\n\t\tthis._state.setStateAtTime(Tone.State.Started, time);\n\t\tthis._tickSource.start(time, offset);\n\t\tif (time < this._lastUpdate){\n\t\t\tthis.emit(\"start\", time, offset);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Stop the clock. Stopping the clock resets the tick counter to 0.\n * @param {Time} [time=now] The time when the clock should stop.\n * @returns {Tone.Clock} this\n * @example\n * clock.stop();\n */\nTone.Clock.prototype.stop = function(time){\n\ttime = this.toSeconds(time);\n\tthis._state.cancel(time);\n\tthis._state.setStateAtTime(Tone.State.Stopped, time);\n\tthis._tickSource.stop(time);\n\tif (time < this._lastUpdate){\n\t\tthis.emit(\"stop\", time);\n\t}\n\treturn this;\n};\n\n/**\n * Pause the clock. Pausing does not reset the tick counter.\n * @param {Time} [time=now] The time when the clock should stop.\n * @returns {Tone.Clock} this\n */\nTone.Clock.prototype.pause = function(time){\n\ttime = this.toSeconds(time);\n\tif (this._state.getValueAtTime(time) === Tone.State.Started){\n\t\tthis._state.setStateAtTime(Tone.State.Paused, time);\n\t\tthis._tickSource.pause(time);\n\t\tif (time < this._lastUpdate){\n\t\t\tthis.emit(\"pause\", time);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * The number of times the callback was invoked. Starts counting at 0\n * and increments after the callback was invoked.\n * @type {Ticks}\n */\nObject.defineProperty(Tone.Clock.prototype, \"ticks\", {\n\tget : function(){\n\t\treturn Math.ceil(this.getTicksAtTime(this.now()));\n\t},\n\tset : function(t){\n\t\tthis._tickSource.ticks = t;\n\t}\n});\n\n/**\n * The time since ticks=0 that the Clock has been running. Accounts\n * for tempo curves\n * @type {Seconds}\n */\nObject.defineProperty(Tone.Clock.prototype, \"seconds\", {\n\tget : function(){\n\t\treturn this._tickSource.seconds;\n\t},\n\tset : function(s){\n\t\tthis._tickSource.seconds = s;\n\t}\n});\n\n/**\n * Return the elapsed seconds at the given time.\n * @param {Time} time When to get the elapsed seconds\n * @return {Seconds} The number of elapsed seconds\n */\nTone.Clock.prototype.getSecondsAtTime = function(time){\n\treturn this._tickSource.getSecondsAtTime(time);\n};\n\n/**\n * Set the clock's ticks at the given time.\n * @param {Ticks} ticks The tick value to set\n * @param {Time} time When to set the tick value\n * @return {Tone.Clock} this\n */\nTone.Clock.prototype.setTicksAtTime = function(ticks, time){\n\tthis._tickSource.setTicksAtTime(ticks, time);\n\treturn this;\n};\n\n/**\n * Get the clock's ticks at the given time.\n * @param {Time} time When to get the tick value\n * @return {Ticks} The tick value at the given time.\n */\nTone.Clock.prototype.getTicksAtTime = function(time){\n\treturn this._tickSource.getTicksAtTime(time);\n};\n\n/**\n * Get the time of the next tick\n * @param {Ticks} ticks The tick number.\n * @param {Time} before \n * @return {Tone.Clock} this\n */\nTone.Clock.prototype.nextTickTime = function(offset, when){\n\twhen = this.toSeconds(when);\n\tvar currentTick = this.getTicksAtTime(when);\n\treturn this._tickSource.getTimeOfTick(currentTick+offset, when);\n};\n\n/**\n * The scheduling loop.\n * @private\n */\nTone.Clock.prototype._loop = function(){\n\n\tvar startTime = this._lastUpdate;\n\tvar endTime = this.now();\n\tthis._lastUpdate = endTime;\n\n\tif (startTime !== endTime){\n\t\t//the state change events\n\t\tthis._state.forEachBetween(startTime, endTime, function(e){\n\t\t\tswitch (e.state){\n\t\t\t\tcase Tone.State.Started : \n\t\t\t\t\tvar offset = this._tickSource.getTicksAtTime(e.time);\n\t\t\t\t\tthis.emit(\"start\", e.time, offset);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Tone.State.Stopped : \n\t\t\t\t\tif (e.time !== 0){\n\t\t\t\t\t\tthis.emit(\"stop\", e.time);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Tone.State.Paused :\n\t\t\t\t\tthis.emit(\"pause\", e.time); \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}.bind(this));\n\t\t//the tick callbacks\n\t\tthis._tickSource.forEachTickBetween(startTime, endTime, function(time, ticks){\n\t\t\tthis.callback(time, ticks);\n\t\t}.bind(this));\n\t}\n};\n\n/**\n * Returns the scheduled state at the given time.\n * @param {Time} time The time to query.\n * @return {String} The name of the state input in setStateAtTime.\n * @example\n * clock.start(\"+0.1\");\n * clock.getStateAtTime(\"+0.1\"); //returns \"started\"\n */\nTone.Clock.prototype.getStateAtTime = function(time){\n\ttime = this.toSeconds(time);\n\treturn this._state.getValueAtTime(time);\n};\n\n/**\n * Clean up\n * @returns {Tone.Clock} this\n */\nTone.Clock.prototype.dispose = function(){\n\tTone.Emitter.prototype.dispose.call(this);\n\tthis.context.off(\"tick\", this._boundLoop);\n\tthis._writable(\"frequency\");\n\tthis._tickSource.dispose();\n\tthis._tickSource = null;\n\tthis.frequency = null;\n\tthis._boundLoop = null;\n\tthis._nextTick = Infinity;\n\tthis.callback = null;\n\tthis._state.dispose();\n\tthis._state = null;\n};\n\nexport default Tone.Clock;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Signal\";\nimport \"../signal/Multiply\";\nimport \"../signal/WaveShaper\";\n\n/**\n * @class GreaterThanZero outputs 1 when the input is strictly greater than zero\n *\n * @constructor\n * @extends {Tone.SignalBase}\n * @example\n * var gt0 = new Tone.GreaterThanZero();\n * var sig = new Tone.Signal(0.01).connect(gt0);\n * //the output of gt0 is 1.\n * sig.value = 0;\n * //the output of gt0 is 0.\n */\nTone.GreaterThanZero = function(){\n\n\tTone.SignalBase.call(this);\n\n\t/**\n\t * @type {Tone.WaveShaper}\n\t * @private\n\t */\n\tthis._thresh = this.output = new Tone.WaveShaper(function(val){\n\t\tif (val <= 0){\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}, 127);\n\n\t/**\n\t * scale the first thresholded signal by a large value.\n\t * this will help with values which are very close to 0\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._scale = this.input = new Tone.Multiply(10000);\n\n\t//connections\n\tthis._scale.connect(this._thresh);\n};\n\nTone.extend(Tone.GreaterThanZero, Tone.SignalBase);\n\n/**\n * dispose method\n * @returns {Tone.GreaterThanZero} this\n */\nTone.GreaterThanZero.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._scale.dispose();\n\tthis._scale = null;\n\tthis._thresh.dispose();\n\tthis._thresh = null;\n\treturn this;\n};\n\nexport default Tone.GreaterThanZero;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/GreaterThanZero\";\nimport \"../signal/Subtract\";\nimport \"../signal/Signal\";\n\n/**\n * @class Output 1 if the signal is greater than the value, otherwise outputs 0.\n * can compare two signals or a signal and a number.\n *\n * @constructor\n * @extends {Tone.Signal}\n * @param {number} [value=0] the value to compare to the incoming signal\n * @example\n * var gt = new Tone.GreaterThan(2);\n * var sig = new Tone.Signal(4).connect(gt);\n * //output of gt is equal 1.\n */\nTone.GreaterThan = function(value){\n\n\tTone.Signal.call(this);\n\tthis.createInsOuts(2, 0);\n\n\t/**\n\t * subtract the amount from the incoming signal\n\t * @type {Tone.Subtract}\n\t * @private\n\t */\n\tthis._param = this.input[0] = new Tone.Subtract(value);\n\tthis.input[1] = this._param.input[1];\n\n\t/**\n\t * compare that amount to zero\n\t * @type {Tone.GreaterThanZero}\n\t * @private\n\t */\n\tthis._gtz = this.output = new Tone.GreaterThanZero();\n\n\t//connect\n\tthis._param.connect(this._gtz);\n};\n\nTone.extend(Tone.GreaterThan, Tone.Signal);\n\n/**\n * dispose method\n * @returns {Tone.GreaterThan} this\n */\nTone.GreaterThan.prototype.dispose = function(){\n\tTone.Signal.prototype.dispose.call(this);\n\tthis._gtz.dispose();\n\tthis._gtz = null;\n\treturn this;\n};\n\nexport default Tone.GreaterThan;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Envelope\";\nimport \"../signal/Scale\";\n\n/**\n * @class Tone.ScaledEnvelop is an envelope which can be scaled\n * to any range. It's useful for applying an envelope\n * to a frequency or any other non-NormalRange signal\n * parameter.\n *\n * @extends {Tone.Envelope}\n * @constructor\n * @param {Time|Object} [attack]\tthe attack time in seconds\n * @param {Time} [decay]\tthe decay time in seconds\n * @param {number} [sustain] \ta percentage (0-1) of the full amplitude\n * @param {Time} [release]\tthe release time in seconds\n * @example\n * var scaledEnv = new Tone.ScaledEnvelope({\n * \t\"attack\" : 0.2,\n * \t\"min\" : 200,\n * \t\"max\" : 2000\n * });\n * scaledEnv.connect(oscillator.frequency);\n */\nTone.ScaledEnvelope = function(){\n\n\t//get all of the defaults\n\tvar options = Tone.defaults(arguments, [\"attack\", \"decay\", \"sustain\", \"release\"], Tone.Envelope);\n\tTone.Envelope.call(this, options);\n\toptions = Tone.defaultArg(options, Tone.ScaledEnvelope.defaults);\n\n\t/**\n\t * scale the incoming signal by an exponent\n\t * @type {Tone.Pow}\n\t * @private\n\t */\n\tthis._exp = this.output = new Tone.Pow(options.exponent);\n\n\t/**\n\t * scale the signal to the desired range\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._scale = this.output = new Tone.Scale(options.min, options.max);\n\n\tthis._sig.chain(this._exp, this._scale);\n};\n\nTone.extend(Tone.ScaledEnvelope, Tone.Envelope);\n\n/**\n * the default parameters\n * @static\n */\nTone.ScaledEnvelope.defaults = {\n\t\"min\" : 0,\n\t\"max\" : 1,\n\t\"exponent\" : 1\n};\n\n/**\n * The envelope's min output value. This is the value which it\n * starts at.\n * @memberOf Tone.ScaledEnvelope#\n * @type {number}\n * @name min\n */\nObject.defineProperty(Tone.ScaledEnvelope.prototype, \"min\", {\n\tget : function(){\n\t\treturn this._scale.min;\n\t},\n\tset : function(min){\n\t\tthis._scale.min = min;\n\t}\n});\n\n/**\n * The envelope's max output value. In other words, the value\n * at the peak of the attack portion of the envelope.\n * @memberOf Tone.ScaledEnvelope#\n * @type {number}\n * @name max\n */\nObject.defineProperty(Tone.ScaledEnvelope.prototype, \"max\", {\n\tget : function(){\n\t\treturn this._scale.max;\n\t},\n\tset : function(max){\n\t\tthis._scale.max = max;\n\t}\n});\n\n/**\n * The envelope's exponent value.\n * @memberOf Tone.ScaledEnvelope#\n * @type {number}\n * @name exponent\n */\nObject.defineProperty(Tone.ScaledEnvelope.prototype, \"exponent\", {\n\tget : function(){\n\t\treturn this._exp.value;\n\t},\n\tset : function(exp){\n\t\tthis._exp.value = exp;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.ScaledEnvelope} this\n */\nTone.ScaledEnvelope.prototype.dispose = function(){\n\tTone.Envelope.prototype.dispose.call(this);\n\tthis._scale.dispose();\n\tthis._scale = null;\n\tthis._exp.dispose();\n\tthis._exp = null;\n\treturn this;\n};\n\nexport default Tone.ScaledEnvelope;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\nimport \"../signal/SignalBase\";\n\n/**\n * @class Return the absolute value of an incoming signal.\n *\n * @constructor\n * @extends {Tone.SignalBase}\n * @example\n * var signal = new Tone.Signal(-1);\n * var abs = new Tone.Abs();\n * signal.connect(abs);\n * //the output of abs is 1.\n */\nTone.Abs = function(){\n\tTone.SignalBase.call(this);\n\t/**\n\t * @type {Tone.LessThan}\n\t * @private\n\t */\n\tthis._abs = this.input = this.output = new Tone.WaveShaper(function(val){\n\t\tif (Math.abs(val) < 0.001){\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn Math.abs(val);\n\t\t}\n\t}, 1024);\n};\n\nTone.extend(Tone.Abs, Tone.SignalBase);\n\n/**\n * dispose method\n * @returns {Tone.Abs} this\n */\nTone.Abs.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._abs.dispose();\n\tthis._abs = null;\n\treturn this;\n};\n\nexport default Tone.Abs;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Solo lets you isolate a specific audio stream. When\n * an instance is set to `solo=true`, it will mute all other instances.\n * @extends {Tone.AudioNode}\n * @example\n * var soloA = new Tone.Solo()\n * var soloB = new Tone.Solo()\n * soloA.solo = true\n * //no audio will pass through soloB\n */\nTone.Solo = function(){\n\n\tvar options = Tone.defaults(arguments, [\"solo\"], Tone.Solo);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The input and output node\n\t * @type {Tone.Gain}\n\t */\n\tthis.input = this.output = new Tone.Gain();\n\n\t/**\n\t * A bound _soloed method\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._soloBind = this._soloed.bind(this);\n\n\t//listen for solo events class-wide.\n\tthis.context.on(\"solo\", this._soloBind);\n\t//set initially\n\tthis.solo = options.solo;\n};\n\nTone.extend(Tone.Solo, Tone.AudioNode);\n\n/**\n * The defaults\n * @type {Object}\n * @static\n */\nTone.Solo.defaults = {\n\tsolo : false,\n};\n\n/**\n * Isolates this instance and mutes all other instances of Tone.Solo.\n * Only one instance can be soloed at a time. A soloed\n * instance will report `solo=false` when another instance is soloed.\n * @memberOf Tone.Solo#\n * @type {Boolean}\n * @name solo\n */\nObject.defineProperty(Tone.Solo.prototype, \"solo\", {\n\tget : function(){\n\t\treturn this._isSoloed();\n\t},\n\tset : function(solo){\n\t\tif (solo){\n\t\t\tthis._addSolo();\n\t\t} else {\n\t\t\tthis._removeSolo();\n\t\t}\n\t\tthis.context.emit(\"solo\", this);\n\t}\n});\n\n/**\n * If the current instance is muted, i.e. another instance is soloed\n * @memberOf Tone.Solo#\n * @type {Boolean}\n * @name muted\n * @readOnly\n */\nObject.defineProperty(Tone.Solo.prototype, \"muted\", {\n\tget : function(){\n\t\treturn this.input.gain.value === 0;\n\t}\n});\n\n/**\n * Add this to the soloed array\n * @private\n */\nTone.Solo.prototype._addSolo = function(){\n\tif (!Tone.isArray(this.context._currentSolo)){\n\t\tthis.context._currentSolo = [];\n\t}\n\tif (!this._isSoloed()){\n\t\tthis.context._currentSolo.push(this);\n\t}\n};\n\n/**\n * Remove this from the soloed array\n * @private\n */\nTone.Solo.prototype._removeSolo = function(){\n\tif (this._isSoloed()){\n\t\tvar index = this.context._currentSolo.indexOf(this);\n\t\tthis.context._currentSolo.splice(index, 1);\n\t}\n};\n\n/**\n * @return {Boolean} Is this on the soloed array\n * @private\n */\nTone.Solo.prototype._isSoloed = function(){\n\tif (Tone.isArray(this.context._currentSolo)){\n\t\treturn this.context._currentSolo.length !== 0 && this.context._currentSolo.indexOf(this) !== -1;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/**\n * @return {Boolean} Returns true if no one is soloed\n * @private\n */\nTone.Solo.prototype._noSolos = function(){\n\treturn !Tone.isArray(this.context._currentSolo) || this.context._currentSolo.length === 0;\n};\n\n/**\n * Solo the current instance and unsolo all other instances.\n * @param {Tone.Solo} instance The instance which is being soloed/unsoloed.\n * @private\n */\nTone.Solo.prototype._soloed = function(){\n\tif (this._isSoloed()){\n\t\tthis.input.gain.value = 1;\n\t} else if (this._noSolos()){\n\t\t//no one is soloed\n\t\tthis.input.gain.value = 1;\n\t} else {\n\t\tthis.input.gain.value = 0;\n\t}\n};\n\n/**\n * Clean up\n * @return {Tone.Solo} this\n */\nTone.Solo.prototype.dispose = function(){\n\tthis.context.off(\"solo\", this._soloBind);\n\tthis._removeSolo();\n\tthis._soloBind = null;\n\tTone.AudioNode.prototype.dispose.call(this);\n\treturn this;\n};\n\nexport default Tone.Solo;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\n\n/**\n * @class Convert an incoming signal between 0, 1 to an equal power gain scale.\n *\n * @extends {Tone.SignalBase}\n * @constructor\n * @example\n * var eqPowGain = new Tone.EqualPowerGain();\n */\nTone.EqualPowerGain = function(){\n\n\tTone.SignalBase.call(this);\n\t/**\n\t * @type {Tone.WaveShaper}\n\t * @private\n\t */\n\tthis._eqPower = this.input = this.output = new Tone.WaveShaper(function(val){\n\t\tif (Math.abs(val) < 0.001){\n\t\t\t//should output 0 when input is 0\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn Tone.equalPowerScale(val);\n\t\t}\n\t}.bind(this), 4096);\n};\n\nTone.extend(Tone.EqualPowerGain, Tone.SignalBase);\n\n/**\n * clean up\n * @returns {Tone.EqualPowerGain} this\n */\nTone.EqualPowerGain.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._eqPower.dispose();\n\tthis._eqPower = null;\n\treturn this;\n};\n\nexport default Tone.EqualPowerGain;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Multiply\";\nimport \"../signal/Signal\";\n\n/**\n * @class Negate the incoming signal. i.e. an input signal of 10 will output -10\n *\n * @constructor\n * @extends {Tone.SignalBase}\n * @example\n * var neg = new Tone.Negate();\n * var sig = new Tone.Signal(-2).connect(neg);\n * //output of neg is positive 2. \n */\nTone.Negate = function(){\n\n\tTone.SignalBase.call(this);\n\t/**\n\t * negation is done by multiplying by -1\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._multiply = this.input = this.output = new Tone.Multiply(-1);\n};\n\nTone.extend(Tone.Negate, Tone.SignalBase);\n\n/**\n * clean up\n * @returns {Tone.Negate} this\n */\nTone.Negate.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._multiply.dispose();\n\tthis._multiply = null;\n\treturn this;\n}; \n\nexport default Tone.Negate;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Panner\";\nimport \"../component/Volume\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {AudioRange} pan the initial pan\n * @param {number} volume The output volume.\n * @example\n * //pan the incoming signal left and drop the volume\n * var panVol = new Tone.PanVol(-0.25, -12);\n */\nTone.PanVol = function(){\n\n\tvar options = Tone.defaults(arguments, [\"pan\", \"volume\"], Tone.PanVol);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The panning node\n\t * @type {Tone.Panner}\n\t * @private\n\t */\n\tthis._panner = this.input = new Tone.Panner(options.pan);\n\n\t/**\n\t * The L/R panning control.\n\t * @type {AudioRange}\n\t * @signal\n\t */\n\tthis.pan = this._panner.pan;\n\n\t/**\n\t * The volume node\n\t * @type {Tone.Volume}\n\t * @private\n\t */\n\tthis._volume = this.output = new Tone.Volume(options.volume);\n\n\t/**\n\t * The volume control in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.volume = this._volume.volume;\n\n\t//connections\n\tthis._panner.connect(this._volume);\n\tthis.mute = options.mute;\n\n\tthis._readOnly([\"pan\", \"volume\"]);\n};\n\nTone.extend(Tone.PanVol, Tone.AudioNode);\n\n/**\n * The defaults\n * @type {Object}\n * @const\n * @static\n */\nTone.PanVol.defaults = {\n\t\"pan\" : 0,\n\t\"volume\" : 0,\n\t\"mute\" : false\n};\n\n/**\n * Mute/unmute the volume\n * @memberOf Tone.PanVol#\n * @name mute\n * @type {Boolean}\n */\nObject.defineProperty(Tone.PanVol.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._volume.mute;\n\t},\n\tset : function(mute){\n\t\tthis._volume.mute = mute;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.PanVol} this\n */\nTone.PanVol.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"pan\", \"volume\"]);\n\tthis._panner.dispose();\n\tthis._panner = null;\n\tthis.pan = null;\n\tthis._volume.dispose();\n\tthis._volume = null;\n\tthis.volume = null;\n\treturn this;\n};\n\nexport default Tone.PanVol;\n\n","import Tone from \"../core/Tone\";\nif (Tone.supported){\n\n\tif (!Tone.global.hasOwnProperty(\"OfflineAudioContext\") && Tone.global.hasOwnProperty(\"webkitOfflineAudioContext\")){\n\t\tTone.global.OfflineAudioContext = Tone.global.webkitOfflineAudioContext;\n\t}\n\n\t//returns promise?\n\tvar context = new OfflineAudioContext(1, 1, 44100);\n\tvar ret = context.startRendering();\n\tif (!(ret && Tone.isFunction(ret.then))){\n\t\tOfflineAudioContext.prototype._native_startRendering = OfflineAudioContext.prototype.startRendering;\n\t\tOfflineAudioContext.prototype.startRendering = function(){\n\t\t\treturn new Promise(function(done){\n\t\t\t\tthis.oncomplete = function(e){\n\t\t\t\t\tdone(e.renderedBuffer);\n\t\t\t\t};\n\t\t\t\tthis._native_startRendering();\n\t\t\t}.bind(this));\n\t\t};\n\t}\n}\n\n","export default \"13.8.26\";\n","import Tone from \"../core/Tone\";\nimport \"../type/Frequency\";\n\n/**\n * @class Tone.Midi is a primitive type for encoding Time values.\n * Tone.Midi can be constructed with or without the `new` keyword. Tone.Midi can be passed\n * into the parameter of any method which takes time as an argument.\n * @constructor\n * @extends {Tone.Frequency}\n * @param {String|Number} val The time value.\n * @param {String=} units The units of the value.\n * @example\n * var t = Tone.Midi(\"4n\");//a quarter note\n */\nTone.Midi = function(val, units){\n\tif (this instanceof Tone.Midi){\n\n\t\tTone.Frequency.call(this, val, units);\n\n\t} else {\n\t\treturn new Tone.Midi(val, units);\n\t}\n};\n\nTone.extend(Tone.Midi, Tone.Frequency);\n\n/**\n * The default units if none are given.\n * @type {String}\n * @private\n */\nTone.Midi.prototype._defaultUnits = \"midi\";\n\n/**\n * Returns the value of a frequency in the current units\n * @param {Frequency} freq\n * @return {Number}\n * @private\n */\nTone.Midi.prototype._frequencyToUnits = function(freq){\n\treturn Tone.Frequency.ftom(Tone.Frequency.prototype._frequencyToUnits.call(this, freq));\n};\n\n/**\n * Returns the value of a tick in the current time units\n * @param {Ticks} ticks\n * @return {Number}\n * @private\n */\nTone.Midi.prototype._ticksToUnits = function(ticks){\n\treturn Tone.Frequency.ftom(Tone.Frequency.prototype._ticksToUnits.call(this, ticks));\n};\n\n/**\n * Return the value of the beats in the current units\n * @param {Number} beats\n * @return {Number}\n * @private\n */\nTone.Midi.prototype._beatsToUnits = function(beats){\n\treturn Tone.Frequency.ftom(Tone.Frequency.prototype._beatsToUnits.call(this, beats));\n};\n\n/**\n * Returns the value of a second in the current units\n * @param {Seconds} seconds\n * @return {Number}\n * @private\n */\nTone.Midi.prototype._secondsToUnits = function(seconds){\n\treturn Tone.Frequency.ftom(Tone.Frequency.prototype._secondsToUnits.call(this, seconds));\n};\n\n/**\n * Return the value of the frequency as a MIDI note\n * @return {MIDI}\n * @example\n * Tone.Midi(60).toMidi(); //60\n */\nTone.Midi.prototype.toMidi = function(){\n\treturn this.valueOf();\n};\n\n/**\n * Return the value of the frequency as a MIDI note\n * @return {MIDI}\n * @example\n * Tone.Midi(60).toFrequency(); //261.6255653005986\n */\nTone.Midi.prototype.toFrequency = function(){\n\treturn Tone.Frequency.mtof(this.toMidi());\n};\n\n/**\n * Transposes the frequency by the given number of semitones.\n * @param {Interval} interval\n * @return {Tone.Frequency} A new transposed frequency\n * @example\n * Tone.Midi(\"A4\").transpose(3); //\"C5\"\n */\nTone.Midi.prototype.transpose = function(interval){\n\treturn new this.constructor(this.toMidi() + interval);\n};\n\nexport default Tone.Midi;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Volume\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.UserMedia uses MediaDevices.getUserMedia to open up\n * and external microphone or audio input. Check\n * [MediaDevices API Support](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia)\n * to see which browsers are supported. Access to an external input\n * is limited to secure (HTTPS) connections.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Decibels=} volume The level of the input\n * @example\n * //list the inputs and open the third one\n * var motu = new Tone.UserMedia();\n *\n * //opening the input asks the user to activate their mic\n * motu.open().then(function(){\n * \t//promise resolves when input is available\n * });\n */\n\nTone.UserMedia = function(){\n\n\tvar options = Tone.defaults(arguments, [\"volume\"], Tone.UserMedia);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The MediaStreamNode\n\t * @type {MediaStreamAudioSourceNode}\n\t * @private\n\t */\n\tthis._mediaStream = null;\n\n\t/**\n\t * The media stream created by getUserMedia.\n\t * @type {LocalMediaStream}\n\t * @private\n\t */\n\tthis._stream = null;\n\n\t/**\n\t * The open device\n\t * @type {MediaDeviceInfo}\n\t * @private\n\t */\n\tthis._device = null;\n\n\t/**\n\t * The output volume node\n\t * @type {Tone.Volume}\n\t * @private\n\t */\n\tthis._volume = this.output = new Tone.Volume(options.volume);\n\n\t/**\n\t * The volume of the output in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t * @example\n\t * input.volume.value = -6;\n\t */\n\tthis.volume = this._volume.volume;\n\tthis._readOnly(\"volume\");\n\n\tthis.mute = options.mute;\n};\n\nTone.extend(Tone.UserMedia, Tone.AudioNode);\n\n/**\n * the default parameters\n * @type {Object}\n */\nTone.UserMedia.defaults = {\n\t\"volume\" : 0,\n\t\"mute\" : false\n};\n\n/**\n * Open the media stream. If a string is passed in, it is assumed\n * to be the label or id of the stream, if a number is passed in,\n * it is the input number of the stream.\n * @param {String|Number} [labelOrId=\"default\"] The label or id of the audio input media device.\n * With no argument, the default stream is opened.\n * @return {Promise} The promise is resolved when the stream is open.\n */\nTone.UserMedia.prototype.open = function(labelOrId){\n\t//close the previous stream\n\tif (this.state === Tone.State.Started){\n\t\tthis.close();\n\t}\n\treturn Tone.UserMedia.enumerateDevices().then(function(devices){\n\t\tvar device;\n\t\tif (Tone.isNumber(labelOrId)){\n\t\t\tdevice = devices[labelOrId];\n\t\t} else {\n\t\t\tdevice = devices.find(function(device){\n\t\t\t\treturn device.label === labelOrId || device.deviceId === labelOrId;\n\t\t\t});\n\t\t\t//didn't find a matching device\n\t\t\tif (!device && devices.length > 0){\n\t\t\t\tdevice = devices[0];\n\t\t\t} else if (!device && Tone.isDefined(labelOrId)){\n\t\t\t\tthrow new Error(\"Tone.UserMedia: no matching device: \"+labelOrId);\n\t\t\t}\n\t\t}\n\t\tthis._device = device;\n\t\t//do getUserMedia\n\t\tvar constraints = {\n\t\t\taudio : {\n\t\t\t\t\"echoCancellation\" : false,\n\t\t\t\t\"sampleRate\" : this.context.sampleRate,\n\t\t\t\t\"noiseSuppression\" : false,\n\t\t\t\t\"mozNoiseSuppression\" : false,\n\t\t\t}\n\t\t};\n\t\tif (device){\n\t\t\tconstraints.audio.deviceId = device.deviceId;\t\t\t\t\n\t\t}\n\t\treturn navigator.mediaDevices.getUserMedia(constraints).then(function(stream){\n\t\t\t//start a new source only if the previous one is closed\n\t\t\tif (!this._stream){\n\t\t\t\tthis._stream = stream;\n\t\t\t\t//Wrap a MediaStreamSourceNode around the live input stream.\n\t\t\t\tthis._mediaStream = this.context.createMediaStreamSource(stream);\n\t\t\t\t//Connect the MediaStreamSourceNode to a gate gain node\n\t\t\t\tTone.connect(this._mediaStream, this.output);\n\t\t\t}\n\t\t\treturn this;\n\t\t}.bind(this));\n\t}.bind(this));\n};\n\n/**\n * Close the media stream\n * @return {Tone.UserMedia} this\n */\nTone.UserMedia.prototype.close = function(){\n\tif (this._stream){\n\t\tthis._stream.getAudioTracks().forEach(function(track){\n\t\t\ttrack.stop();\n\t\t});\n\t\tthis._stream = null;\n\t\t//remove the old media stream\n\t\tthis._mediaStream.disconnect();\n\t\tthis._mediaStream = null;\n\t}\n\tthis._device = null;\n\treturn this;\n};\n\n/**\n * Returns a promise which resolves with the list of audio input devices available.\n * @return {Promise} The promise that is resolved with the devices\n * @static\n * @example\n * Tone.UserMedia.enumerateDevices().then(function(devices){\n * \tconsole.log(devices)\n * })\n */\nTone.UserMedia.enumerateDevices = function(){\n\treturn navigator.mediaDevices.enumerateDevices().then(function(devices){\n\t\treturn devices.filter(function(device){\n\t\t\treturn device.kind === \"audioinput\";\n\t\t});\n\t});\n};\n\n/**\n * Returns the playback state of the source, \"started\" when the microphone is open\n * and \"stopped\" when the mic is closed.\n * @type {Tone.State}\n * @readOnly\n * @memberOf Tone.UserMedia#\n * @name state\n */\nObject.defineProperty(Tone.UserMedia.prototype, \"state\", {\n\tget : function(){\n\t\treturn this._stream && this._stream.active ? Tone.State.Started : Tone.State.Stopped;\n\t}\n});\n\n/**\n * \tReturns an identifier for the represented device that is\n * \tpersisted across sessions. It is un-guessable by other applications and\n * \tunique to the origin of the calling application. It is reset when the\n * \tuser clears cookies (for Private Browsing, a different identifier is\n * \tused that is not persisted across sessions). Returns undefined when the\n * \tdevice is not open.\n * @type {String}\n * @readOnly\n * @memberOf Tone.UserMedia#\n * @name deviceId\n */\nObject.defineProperty(Tone.UserMedia.prototype, \"deviceId\", {\n\tget : function(){\n\t\tif (this._device){\n\t\t\treturn this._device.deviceId;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n});\n\n/**\n * \tReturns a group identifier. Two devices have the\n * \tsame group identifier if they belong to the same physical device.\n * \tReturns undefined when the device is not open.\n * @type {String}\n * @readOnly\n * @memberOf Tone.UserMedia#\n * @name groupId\n */\nObject.defineProperty(Tone.UserMedia.prototype, \"groupId\", {\n\tget : function(){\n\t\tif (this._device){\n\t\t\treturn this._device.groupId;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n});\n\n/**\n * \tReturns a label describing this device (for example \"Built-in Microphone\").\n * \tReturns undefined when the device is not open or label is not available\n * \tbecause of permissions.\n * @type {String}\n * @readOnly\n * @memberOf Tone.UserMedia#\n * @name groupId\n */\nObject.defineProperty(Tone.UserMedia.prototype, \"label\", {\n\tget : function(){\n\t\tif (this._device){\n\t\t\treturn this._device.label;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n});\n\n/**\n * Mute the output.\n * @memberOf Tone.UserMedia#\n * @type {boolean}\n * @name mute\n * @example\n * //mute the output\n * userMedia.mute = true;\n */\nObject.defineProperty(Tone.UserMedia.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._volume.mute;\n\t},\n\tset : function(mute){\n\t\tthis._volume.mute = mute;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.UserMedia} this\n */\nTone.UserMedia.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis.close();\n\tthis._writable(\"volume\");\n\tthis._volume.dispose();\n\tthis._volume = null;\n\tthis.volume = null;\n\treturn this;\n};\n\n/**\n * If getUserMedia is supported by the browser.\n * @type {Boolean}\n * @memberOf Tone.UserMedia#\n * @name supported\n * @static\n * @readOnly\n */\nObject.defineProperty(Tone.UserMedia, \"supported\", {\n\tget : function(){\n\t\treturn Tone.isDefined(navigator.mediaDevices) && Tone.isFunction(navigator.mediaDevices.getUserMedia);\n\t}\n});\n\nexport default Tone.UserMedia;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Player\";\nimport \"../component/Volume\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Players combines multiple [Tone.Player](Player) objects.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Object} urls An object mapping a name to a url.\n * @param {function=} onload The function to invoke when all buffers are loaded.\n */\nTone.Players = function(urls){\n\n\tvar args = Array.prototype.slice.call(arguments);\n\targs.shift();\n\tvar options = Tone.defaults(args, [\"onload\"], Tone.Players);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The output volume node\n\t * @type {Tone.Volume}\n\t * @private\n\t */\n\tthis._volume = this.output = new Tone.Volume(options.volume);\n\n\t/**\n\t * The volume of the output in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t * @example\n\t * source.volume.value = -6;\n\t */\n\tthis.volume = this._volume.volume;\n\tthis._readOnly(\"volume\");\n\n\t//make the output explicitly stereo\n\tthis._volume.output.output.channelCount = 2;\n\tthis._volume.output.output.channelCountMode = \"explicit\";\n\t//mute initially\n\tthis.mute = options.mute;\n\n\t/**\n\t * The container of all of the players\n\t * @type {Object}\n\t * @private\n\t */\n\tthis._players = {};\n\n\t/**\n\t * The loading count\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._loadingCount = 0;\n\n\t/**\n\t * private holder of the fadeIn time\n\t * @type {Time}\n\t * @private\n\t */\n\tthis._fadeIn = options.fadeIn;\n\n\t/**\n\t * private holder of the fadeOut time\n\t * @type {Time}\n\t * @private\n\t */\n\tthis._fadeOut = options.fadeOut;\n\n\t//add all of the players\n\tfor (var name in urls){\n\t\tthis._loadingCount++;\n\t\tthis.add(name, urls[name], this._bufferLoaded.bind(this, options.onload));\n\t}\n};\n\nTone.extend(Tone.Players, Tone.AudioNode);\n\n/**\n * The default values\n * @type {Object}\n */\nTone.Players.defaults = {\n\t\"volume\" : 0,\n\t\"mute\" : false,\n\t\"onload\" : Tone.noOp,\n\t\"fadeIn\" : 0,\n\t\"fadeOut\" : 0\n};\n\n/**\n * A buffer was loaded. decrement the counter.\n * @param {Function} callback\n * @private\n */\nTone.Players.prototype._bufferLoaded = function(callback){\n\tthis._loadingCount--;\n\tif (this._loadingCount === 0 && callback){\n\t\tcallback(this);\n\t}\n};\n\n/**\n * Mute the output.\n * @memberOf Tone.Source#\n * @type {boolean}\n * @name mute\n * @example\n * //mute the output\n * source.mute = true;\n */\nObject.defineProperty(Tone.Players.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._volume.mute;\n\t},\n\tset : function(mute){\n\t\tthis._volume.mute = mute;\n\t}\n});\n\n/**\n * The fadeIn time of the amplitude envelope.\n * @memberOf Tone.Source#\n * @type {Time}\n * @name fadeIn\n */\nObject.defineProperty(Tone.Players.prototype, \"fadeIn\", {\n\tget : function(){\n\t\treturn this._fadeIn;\n\t},\n\tset : function(fadeIn){\n\t\tthis._fadeIn = fadeIn;\n\t\tthis._forEach(function(player){\n\t\t\tplayer.fadeIn = fadeIn;\n\t\t});\n\t}\n});\n\n/**\n * The fadeOut time of the amplitude envelope.\n * @memberOf Tone.Source#\n * @type {Time}\n * @name fadeOut\n */\nObject.defineProperty(Tone.Players.prototype, \"fadeOut\", {\n\tget : function(){\n\t\treturn this._fadeOut;\n\t},\n\tset : function(fadeOut){\n\t\tthis._fadeOut = fadeOut;\n\t\tthis._forEach(function(player){\n\t\t\tplayer.fadeOut = fadeOut;\n\t\t});\n\t}\n});\n\n/**\n * The state of the players object. Returns \"started\" if any of the players are playing.\n * @memberOf Tone.Players#\n * @type {String}\n * @name state\n * @readOnly\n */\nObject.defineProperty(Tone.Players.prototype, \"state\", {\n\tget : function(){\n\t\tvar playing = false;\n\t\tthis._forEach(function(player){\n\t\t\tplaying = playing || player.state === Tone.State.Started;\n\t\t});\n\t\treturn playing ? Tone.State.Started : Tone.State.Stopped;\n\t}\n});\n\n/**\n * True if the buffers object has a buffer by that name.\n * @param {String|Number} name The key or index of the\n * buffer.\n * @return {Boolean}\n */\nTone.Players.prototype.has = function(name){\n\treturn this._players.hasOwnProperty(name);\n};\n\n/**\n * Get a player by name.\n * @param {String} name The players name as defined in\n * the constructor object or `add` method.\n * @return {Tone.Player}\n */\nTone.Players.prototype.get = function(name){\n\tif (this.has(name)){\n\t\treturn this._players[name];\n\t} else {\n\t\tthrow new Error(\"Tone.Players: no player named \"+name);\n\t}\n};\n\n/**\n * Iterate over all of the players\n * @param {Function} callback\n * @return {Tone.Players} this\n * @private\n */\nTone.Players.prototype._forEach = function(callback){\n\tfor (var playerName in this._players){\n\t\tcallback(this._players[playerName], playerName);\n\t}\n\treturn this;\n};\n\n/**\n * If all the buffers are loaded or not\n * @memberOf Tone.Players#\n * @type {Boolean}\n * @name loaded\n * @readOnly\n */\nObject.defineProperty(Tone.Players.prototype, \"loaded\", {\n\tget : function(){\n\t\tvar isLoaded = true;\n\t\tthis._forEach(function(player){\n\t\t\tisLoaded = isLoaded && player.loaded;\n\t\t});\n\t\treturn isLoaded;\n\t}\n});\n\n/**\n * Add a player by name and url to the Players\n * @param {String} name A unique name to give the player\n * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer,\n * or a buffer which will be added\n * with the given name.\n * @param {Function=} callback The callback to invoke\n * when the url is loaded.\n */\nTone.Players.prototype.add = function(name, url, callback){\n\tthis._players[name] = new Tone.Player(url, callback).connect(this.output);\n\tthis._players[name].fadeIn = this._fadeIn;\n\tthis._players[name].fadeOut = this._fadeOut;\n\treturn this;\n};\n\n/**\n * Stop all of the players at the given time\n * @param {Time} time The time to stop all of the players.\n * @return {Tone.Players} this\n */\nTone.Players.prototype.stopAll = function(time){\n\tthis._forEach(function(player){\n\t\tplayer.stop(time);\n\t});\n};\n\n/**\n * Dispose and disconnect.\n * @return {Tone.Players} this\n */\nTone.Players.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._volume.dispose();\n\tthis._volume = null;\n\tthis._writable(\"volume\");\n\tthis.volume = null;\n\tthis.output = null;\n\tthis._forEach(function(player){\n\t\tplayer.dispose();\n\t});\n\tthis._players = null;\n\treturn this;\n};\n\nexport default Tone.Players;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/Source\";\nimport \"../core/Buffer\";\nimport \"../source/BufferSource\";\n\n/**\n * @class Tone.GrainPlayer implements [granular synthesis](https://en.wikipedia.org/wiki/Granular_synthesis).\n * Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the\n * amount of time each small chunk of audio is played for and the overlap is the\n * amount of crossfading transition time between successive grains.\n * @extends {Tone.Source}\n * @param {String|Tone.Buffer} url\tThe url to load, or the Tone.Buffer to play.\n * @param {Function=} callback The callback to invoke after the url is loaded.\n */\nTone.GrainPlayer = function(){\n\n\tvar options = Tone.defaults(arguments, [\"url\", \"onload\"], Tone.GrainPlayer);\n\tTone.Source.call(this, options);\n\n\t/**\n\t * The audio buffer belonging to the player.\n\t * @type {Tone.Buffer}\n\t */\n\tthis.buffer = new Tone.Buffer(options.url, options.onload.bind(undefined, this));\n\n\t/**\n\t * Create a repeating tick to schedule\n\t * the grains.\n\t * @type {Tone.Clock}\n\t * @private\n\t */\n\tthis._clock = new Tone.Clock(this._tick.bind(this), options.grainSize);\n\n\t/**\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._loopStart = 0;\n\n\t/**\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._loopEnd = 0;\n\n\t/**\n\t * All of the currently playing BufferSources\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._activeSources = [];\n\n\t/**\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._playbackRate = options.playbackRate;\n\n\t/**\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._grainSize = options.grainSize;\n\n\t/**\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._overlap = options.overlap;\n\n\t/**\n\t * Adjust the pitch independently of the playbackRate.\n\t * @type {Cents}\n\t */\n\tthis.detune = options.detune;\n\n\t//setup\n\tthis.overlap = options.overlap;\n\tthis.loop = options.loop;\n\tthis.playbackRate = options.playbackRate;\n\tthis.grainSize = options.grainSize;\n\tthis.loopStart = options.loopStart;\n\tthis.loopEnd = options.loopEnd;\n\tthis.reverse = options.reverse;\n\n\tthis._clock.on(\"stop\", this._onstop.bind(this));\n};\n\nTone.extend(Tone.GrainPlayer, Tone.Source);\n\n/**\n * the default parameters\n * @static\n * @const\n * @type {Object}\n */\nTone.GrainPlayer.defaults = {\n\t\"onload\" : Tone.noOp,\n\t\"overlap\" : 0.1,\n\t\"grainSize\" : 0.2,\n\t\"playbackRate\" : 1,\n\t\"detune\" : 0,\n\t\"loop\" : false,\n\t\"loopStart\" : 0,\n\t\"loopEnd\" : 0,\n\t\"reverse\" : false\n};\n\n/**\n * Play the buffer at the given startTime. Optionally add an offset\n * and/or duration which will play the buffer from a position\n * within the buffer for the given duration.\n *\n * @param {Time} [startTime=now] When the player should start.\n * @param {Time} [offset=0] The offset from the beginning of the sample\n * to start at.\n * @param {Time=} duration How long the sample should play. If no duration\n * is given, it will default to the full length\n * of the sample (minus any offset)\n * @returns {Tone.GrainPlayer} this\n * @memberOf Tone.GrainPlayer#\n * @method start\n * @name start\n */\n\n/**\n * Internal start method\n * @param {Time} time\n * @param {Time} offset\n * @private\n */\nTone.GrainPlayer.prototype._start = function(time, offset, duration){\n\toffset = Tone.defaultArg(offset, 0);\n\toffset = this.toSeconds(offset);\n\ttime = this.toSeconds(time);\n\n\tthis._offset = offset;\n\tthis._clock.start(time);\n\n\tif (duration){\n\t\tthis.stop(time + this.toSeconds(duration));\n\t}\n};\n\n/**\n * Internal start method\n * @param {Time} time\n * @private\n */\nTone.GrainPlayer.prototype._stop = function(time){\n\tthis._clock.stop(time);\n};\n\n/**\n * Invoked when the clock is stopped\n * @param {Number} time\n * @private\n */\nTone.GrainPlayer.prototype._onstop = function(time){\n\t//stop the players\n\tthis._activeSources.forEach(function(source){\n\t\tsource.fadeOut = 0;\n\t\tsource.stop(time);\n\t});\n};\n\n/**\n * Invoked on each clock tick. scheduled a new\n * grain at this time.\n * @param {Time} time\n * @private\n */\nTone.GrainPlayer.prototype._tick = function(time){\n\n\t//check if it should stop looping\n\tif (!this.loop && this._offset > this.buffer.duration){\n\t\tthis.stop(time);\n\t\treturn;\n\t}\n\n\t//at the beginning of the file, the fade in should be 0\n\tvar fadeIn = this._offset < this._overlap ? 0 : this._overlap;\n\n\t//create a buffer source\n\tvar source = new Tone.BufferSource({\n\t\t\"buffer\" : this.buffer,\n\t\t\"fadeIn\" : fadeIn,\n\t\t\"fadeOut\" : this._overlap,\n\t\t\"loop\" : this.loop,\n\t\t\"loopStart\" : this._loopStart,\n\t\t\"loopEnd\" : this._loopEnd,\n\t\t//compute the playbackRate based on the detune\n\t\t\"playbackRate\" : Tone.intervalToFrequencyRatio(this.detune / 100)\n\t}).connect(this.output);\n\n\tsource.start(time, this._offset);\n\tthis._offset += this.grainSize;\n\tsource.stop(time + this.grainSize / this.playbackRate);\n\n\t//add it to the active sources\n\tthis._activeSources.push(source);\n\t//remove it when it's done\n\tsource.onended = function(){\n\t\tvar index = this._activeSources.indexOf(source);\n\t\tif (index !== -1){\n\t\t\tthis._activeSources.splice(index, 1);\n\t\t}\n\t}.bind(this);\n};\n\n/**\n * The playback rate of the sample\n * @memberOf Tone.GrainPlayer#\n * @type {Positive}\n * @name playbackRate\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"playbackRate\", {\n\tget : function(){\n\t\treturn this._playbackRate;\n\t},\n\tset : function(rate){\n\t\tthis._playbackRate = rate;\n\t\tthis.grainSize = this._grainSize;\n\t}\n});\n\n/**\n * The loop start time.\n * @memberOf Tone.GrainPlayer#\n * @type {Time}\n * @name loopStart\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"loopStart\", {\n\tget : function(){\n\t\treturn this._loopStart;\n\t},\n\tset : function(time){\n\t\tthis._loopStart = this.toSeconds(time);\n\t}\n});\n\n/**\n * The loop end time.\n * @memberOf Tone.GrainPlayer#\n * @type {Time}\n * @name loopEnd\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"loopEnd\", {\n\tget : function(){\n\t\treturn this._loopEnd;\n\t},\n\tset : function(time){\n\t\tthis._loopEnd = this.toSeconds(time);\n\t}\n});\n\n/**\n * The direction the buffer should play in\n * @memberOf Tone.GrainPlayer#\n * @type {boolean}\n * @name reverse\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"reverse\", {\n\tget : function(){\n\t\treturn this.buffer.reverse;\n\t},\n\tset : function(rev){\n\t\tthis.buffer.reverse = rev;\n\t}\n});\n\n/**\n * The size of each chunk of audio that the\n * buffer is chopped into and played back at.\n * @memberOf Tone.GrainPlayer#\n * @type {Time}\n * @name grainSize\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"grainSize\", {\n\tget : function(){\n\t\treturn this._grainSize;\n\t},\n\tset : function(size){\n\t\tthis._grainSize = this.toSeconds(size);\n\t\tthis._clock.frequency.value = this._playbackRate / this._grainSize;\n\t}\n});\n\n/**\n * This is the duration of the cross-fade between\n * sucessive grains.\n * @memberOf Tone.GrainPlayer#\n * @type {Time}\n * @name overlap\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"overlap\", {\n\tget : function(){\n\t\treturn this._overlap;\n\t},\n\tset : function(time){\n\t\tthis._overlap = this.toSeconds(time);\n\t}\n});\n\n/**\n * If all the buffer is loaded\n * @memberOf Tone.GrainPlayer#\n * @type {Boolean}\n * @name loaded\n * @readOnly\n */\nObject.defineProperty(Tone.GrainPlayer.prototype, \"loaded\", {\n\tget : function(){\n\t\treturn this.buffer.loaded;\n\t}\n});\n\n/**\n * Clean up\n * @return {Tone.GrainPlayer} this\n */\nTone.GrainPlayer.prototype.dispose = function(){\n\tTone.Source.prototype.dispose.call(this);\n\tthis.buffer.dispose();\n\tthis.buffer = null;\n\tthis._clock.dispose();\n\tthis._clock = null;\n\tthis._activeSources.forEach(function(source){\n\t\tsource.dispose();\n\t});\n\tthis._activeSources = null;\n\treturn this;\n};\n\nexport default Tone.GrainPlayer;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Transport\";\nimport \"../signal/Signal\";\nimport \"../type/TransportTime\";\n\n/**\n * @class Tone.TransportTimelineSignal extends Tone.Signal, but adds the ability to synchronize the signal to the signal to the Tone.Transport\n * @extends {Tone.Signal}\n */\nTone.TransportTimelineSignal = function(){\n\tTone.Signal.apply(this, arguments);\n\n\t/**\n\t * The real signal output\n\t * @type {Tone.Signal}\n\t * @private\n\t */\n\tthis.output = this._outputSig = new Tone.Signal(this._initialValue);\n\n\t/**\n\t * Keep track of the last value. (small optimization)\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._lastVal = this.value;\n\n\t/**\n\t * The event id of the tick update loop\n\t * @private\n\t * @type {Number}\n\t */\n\tthis._synced = Tone.Transport.scheduleRepeat(this._onTick.bind(this), \"1i\");\n\n\t/**\n\t * A bound version of the anchor value methods\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._bindAnchorValue = this._anchorValue.bind(this);\n\tTone.Transport.on(\"start stop pause\", this._bindAnchorValue);\n\n\tthis._events.memory = Infinity;\n};\n\nTone.extend(Tone.TransportTimelineSignal, Tone.Signal);\n\n/**\n * Callback which is invoked every tick.\n * @private\n * @param {Number} time\n * @return {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype._onTick = function(time){\n\tvar val = this.getValueAtTime(Tone.Transport.seconds);\n\tif (this._lastVal !== val){\n\t\tthis._lastVal = val;\n\t\t//approximate ramp curves with linear ramps\n\t\tthis._outputSig.linearRampToValueAtTime(val, time);\n\t}\n};\n\n/**\n * Anchor the value at the start and stop of the Transport\n * @param {Number} time The time of the event\n * @return {Tone.TransportTimelineSignal} this\n * @private\n */\nTone.TransportTimelineSignal.prototype._anchorValue = function(time){\n\tvar val = this.getValueAtTime(Tone.Transport.seconds);\n\tthis._lastVal = val;\n\tthis._outputSig.cancelScheduledValues(time);\n\tthis._outputSig.setValueAtTime(val, time);\n\treturn this;\n};\n\n/**\n * Get the scheduled value at the given time. This will\n * return the unconverted (raw) value.\n * @param {TransportTime} time The time in seconds.\n * @return {Number} The scheduled value at the given time.\n */\nTone.TransportTimelineSignal.prototype.getValueAtTime = function(time){\n\ttime = Tone.TransportTime(time);\n\treturn Tone.Signal.prototype.getValueAtTime.call(this, time);\n};\n\n/**\n * Set the output of the signal at the given time\n * @param {Number} value The value to change to at the given time\n * @param {TransportTime} time The time to change the signal\n * @return {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype.setValueAtTime = function(value, time){\n\ttime = Tone.TransportTime(time);\n\tTone.Signal.prototype.setValueAtTime.call(this, value, time);\n\treturn this;\n};\n\n/**\n * Linear ramp to the given value from the previous scheduled point to the given value\n * @param {Number} value The value to change to at the given time\n * @param {TransportTime} time The time to change the signal\n * @return {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype.linearRampToValueAtTime = function(value, time){\n\ttime = Tone.TransportTime(time);\n\tTone.Signal.prototype.linearRampToValueAtTime.call(this, value, time);\n\treturn this;\n};\n\n/**\n * Exponential ramp to the given value from the previous scheduled point to the given value\n * @param {Number} value The value to change to at the given time\n * @param {TransportTime} time The time to change the signal\n * @return {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype.exponentialRampToValueAtTime = function(value, time){\n\ttime = Tone.TransportTime(time);\n\tTone.Signal.prototype.exponentialRampToValueAtTime.call(this, value, time);\n\treturn this;\n};\n\n/**\n * Start exponentially approaching the target value at the given time with\n * a rate having the given time constant.\n * @param {number} value\n * @param {TransportTime} startTime\n * @param {number} timeConstant\n * @return {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype.setTargetAtTime = function(value, startTime, timeConstant){\n\tstartTime = Tone.TransportTime(startTime);\n\tTone.Signal.prototype.setTargetAtTime.call(this, value, startTime, timeConstant);\n\treturn this;\n};\n\n/**\n * Cancels all scheduled parameter changes with times greater than or\n * equal to startTime.\n * @param {TransportTime} startTime\n * @returns {Tone.Param} this\n */\nTone.TransportTimelineSignal.prototype.cancelScheduledValues = function(startTime){\n\tstartTime = Tone.TransportTime(startTime);\n\tTone.Signal.prototype.cancelScheduledValues.call(this, startTime);\n\treturn this;\n};\n\n/**\n * Set an array of arbitrary values starting at the given time for the given duration.\n * @param {Float32Array} values\n * @param {Time} startTime\n * @param {Time} duration\n * @param {NormalRange} [scaling=1] If the values in the curve should be scaled by some value\n * @returns {Tone.Signal} this\n */\nTone.TransportTimelineSignal.prototype.setValueCurveAtTime = function(values, startTime, duration, scaling){\n\tstartTime = Tone.TransportTime(startTime);\n\tduration = Tone.TransportTime(duration);\n\tTone.Signal.prototype.setValueCurveAtTime.call(this, values, startTime, duration, scaling);\n\treturn this;\n};\n\n/**\n * This is similar to [cancelScheduledValues](#cancelScheduledValues) except\n * it holds the automated value at time until the next automated event.\n * @param {Time} time\n * @returns {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype.cancelAndHoldAtTime = function(time){\n\treturn Tone.Signal.prototype.cancelAndHoldAtTime.call(this, Tone.TransportTime(time));\n};\n\n/**\n * Dispose and disconnect\n * @return {Tone.TransportTimelineSignal} this\n */\nTone.TransportTimelineSignal.prototype.dispose = function(){\n\tTone.Transport.clear(this._synced);\n\tTone.Transport.off(\"start stop pause\", this._syncedCallback);\n\tthis._events.cancel(0);\n\tTone.Signal.prototype.dispose.call(this);\n\tthis._outputSig.dispose();\n\tthis._outputSig = null;\n};\n\nexport default Tone.TransportTimelineSignal;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/Add\";\nimport \"../signal/Multiply\";\n\n/**\n * @class Normalize takes an input min and max and maps it linearly to NormalRange [0,1]\n *\n * @extends {Tone.SignalBase}\n * @constructor\n * @param {number} inputMin the min input value\n * @param {number} inputMax the max input value\n * @example\n * var norm = new Tone.Normalize(2, 4);\n * var sig = new Tone.Signal(3).connect(norm);\n * //output of norm is 0.5. \n */\nTone.Normalize = function(inputMin, inputMax){\n\n\tTone.SignalBase.call(this);\n\t\n\t/**\n\t * the min input value\n\t * @type {number}\n\t * @private\n\t */\n\tthis._inputMin = Tone.defaultArg(inputMin, 0);\n\n\t/**\n\t * the max input value\n\t * @type {number}\n\t * @private\n\t */\n\tthis._inputMax = Tone.defaultArg(inputMax, 1);\n\n\t/**\n\t * subtract the min from the input\n\t * @type {Tone.Add}\n\t * @private\n\t */\n\tthis._sub = this.input = new Tone.Add(0);\n\n\t/**\n\t * divide by the difference between the input and output\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._div = this.output = new Tone.Multiply(1);\n\n\tthis._sub.connect(this._div);\n\tthis._setRange();\n};\n\nTone.extend(Tone.Normalize, Tone.SignalBase);\n\n/**\n * The minimum value the input signal will reach.\n * @memberOf Tone.Normalize#\n * @type {number}\n * @name min\n */\nObject.defineProperty(Tone.Normalize.prototype, \"min\", {\n\tget : function(){\n\t\treturn this._inputMin;\n\t},\n\tset : function(min){\n\t\tthis._inputMin = min;\n\t\tthis._setRange();\n\t}\n});\n\n/**\n * The maximum value the input signal will reach.\n * @memberOf Tone.Normalize#\n * @type {number}\n * @name max\n */\nObject.defineProperty(Tone.Normalize.prototype, \"max\", {\n\tget : function(){\n\t\treturn this._inputMax;\n\t},\n\tset : function(max){\n\t\tthis._inputMax = max;\n\t\tthis._setRange();\n\t}\n});\n\n/**\n * set the values\n * @private\n */\nTone.Normalize.prototype._setRange = function(){\n\tthis._sub.value = -this._inputMin;\n\tthis._div.value = 1 / (this._inputMax - this._inputMin);\n};\n\n/**\n * clean up\n * @returns {Tone.Normalize} this\n */\nTone.Normalize.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._sub.dispose();\n\tthis._sub = null;\n\tthis._div.dispose();\n\tthis._div = null;\n\treturn this;\n};\n\nexport default Tone.Normalize;\n\n","import Tone from \"../core/Tone\";\nimport \"../signal/WaveShaper\";\nimport \"../signal/Signal\";\n\n/**\n * @class Maps a NormalRange [0, 1] to an AudioRange [-1, 1]. \n * See also Tone.AudioToGain. \n *\n * @extends {Tone.SignalBase}\n * @constructor\n * @example\n * var g2a = new Tone.GainToAudio();\n */\nTone.GainToAudio = function(){\n\n\tTone.SignalBase.call(this);\n\t\n\t/**\n\t * @type {WaveShaperNode}\n\t * @private\n\t */\n\tthis._norm = this.input = this.output = new Tone.WaveShaper(function(x){\n\t\treturn Math.abs(x) * 2 - 1;\n\t});\n};\n\nTone.extend(Tone.GainToAudio, Tone.SignalBase);\n\n/**\n * clean up\n * @returns {Tone.GainToAudio} this\n */\nTone.GainToAudio.prototype.dispose = function(){\n\tTone.SignalBase.prototype.dispose.call(this);\n\tthis._norm.dispose();\n\tthis._norm = null;\n\treturn this;\n};\n\nexport default Tone.GainToAudio;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Instrument\";\nimport \"../core/Buffers\";\nimport \"../source/BufferSource\";\n\n/**\n * @class Automatically interpolates between a set of pitched samples. Pass in an object which maps the note's pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.\n * For sample or buffer playback where repitching is not necessary, use [Tone.Player](https://tonejs.github.io/docs/Player).\n * @param {Object} samples An object of samples mapping either Midi\n * Note Numbers or Scientific Pitch Notation\n * to the url of that sample.\n * @param {Function=} onload The callback to invoke when all of the samples are loaded.\n * @param {String=} baseUrl The root URL of all of the samples, which is prepended to all the URLs.\n * @example\n * var sampler = new Tone.Sampler({\n * \t\"C3\" : \"path/to/C3.mp3\",\n * \t\"D#3\" : \"path/to/Dsharp3.mp3\",\n * \t\"F#3\" : \"path/to/Fsharp3.mp3\",\n * \t\"A3\" : \"path/to/A3.mp3\",\n * }, function(){\n * \t//sampler will repitch the closest sample\n * \tsampler.triggerAttack(\"D3\")\n * })\n * @extends {Tone.Instrument}\n */\nTone.Sampler = function(urls){\n\n\t// shift arguments over one. Those are the remainder of the options\n\tvar args = Array.prototype.slice.call(arguments);\n\targs.shift();\n\tvar options = Tone.defaults(args, [\"onload\", \"baseUrl\"], Tone.Sampler);\n\tTone.Instrument.call(this, options);\n\n\tvar urlMap = {};\n\tfor (var note in urls){\n\t\tif (Tone.isNote(note)){\n\t\t\t//convert the note name to MIDI\n\t\t\tvar mid = Tone.Frequency(note).toMidi();\n\t\t\turlMap[mid] = urls[note];\n\t\t} else if (!isNaN(parseFloat(note))){\n\t\t\t//otherwise if it's numbers assume it's midi\n\t\t\turlMap[note] = urls[note];\n\t\t} else {\n\t\t\tthrow new Error(\"Tone.Sampler: url keys must be the note's pitch\");\n\t\t}\n\t}\n\n\t/**\n\t * The stored and loaded buffers\n\t * @type {Tone.Buffers}\n\t * @private\n\t */\n\tthis._buffers = new Tone.Buffers(urlMap, options.onload, options.baseUrl);\n\n\t/**\n\t * The object of all currently playing BufferSources\n\t * @type {Object}\n\t * @private\n\t */\n\tthis._activeSources = {};\n\n\t/**\n\t * The envelope applied to the beginning of the sample.\n\t * @type {Time}\n\t */\n\tthis.attack = options.attack;\n\n\t/**\n\t * The envelope applied to the end of the envelope.\n\t * @type {Time}\n\t */\n\tthis.release = options.release;\n\n\t/**\n\t * The shape of the attack/release curve.\n\t * Either \"linear\" or \"exponential\"\n\t * @type {String}\n\t */\n\tthis.curve = options.curve;\n};\n\nTone.extend(Tone.Sampler, Tone.Instrument);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.Sampler.defaults = {\n\t\"attack\" : 0,\n\t\"release\" : 0.1,\n\t\"onload\" : Tone.noOp,\n\t\"baseUrl\" : \"\",\n\t\"curve\" : \"exponential\"\n};\n\n/**\n * Returns the difference in steps between the given midi note at the closets sample.\n * @param {Midi} midi\n * @return {Interval}\n * @private\n */\nTone.Sampler.prototype._findClosest = function(midi){\n\t//searches within 8 octaves of the given midi note\n\tvar MAX_INTERVAL = 96; \n\tvar interval = 0;\n\twhile (interval < MAX_INTERVAL){\n\t\t// check above and below\n\t\tif (this._buffers.has(midi + interval)){\n\t\t\treturn -interval;\n\t\t} else if (this._buffers.has(midi - interval)){\n\t\t\treturn interval;\n\t\t}\n\t\tinterval++;\n\t}\n\tthrow new Error(\"No available buffers for note: \"+midi);\n};\n\n/**\n * @param {(Frequency|Frequency[])} notes\tThe note to play, or an array of notes.\n * @param {Time=} time When to play the note\n * @param {NormalRange=} velocity The velocity to play the sample back.\n * @return {Tone.Sampler} this\n */\nTone.Sampler.prototype.triggerAttack = function(notes, time, velocity){\n\tthis.log(\"triggerAttack\", notes, time, velocity);\n\tif (!Array.isArray(notes)){\n\t\tnotes = [notes];\n\t}\n\tfor (var i = 0; i < notes.length; i++){ \n\t\tvar midi = Tone.Frequency(notes[i]).toMidi();\n\t\t// find the closest note pitch\n\t\tvar difference = this._findClosest(midi);\n\t\tvar closestNote = midi - difference;\n\t\tvar buffer = this._buffers.get(closestNote);\n\t\tvar playbackRate = Tone.intervalToFrequencyRatio(difference);\n\t\t// play that note\n\t\tvar source = new Tone.BufferSource({\n\t\t\t\"buffer\" : buffer,\n\t\t\t\"playbackRate\" : playbackRate,\n\t\t\t\"fadeIn\" : this.attack,\n\t\t\t\"fadeOut\" : this.release,\n\t\t\t\"curve\" : this.curve,\n\t\t}).connect(this.output);\n\t\tsource.start(time, 0, buffer.duration / playbackRate, velocity);\n\t\t// add it to the active sources\n\t\tif (!Tone.isArray(this._activeSources[midi])){\n\t\t\tthis._activeSources[midi] = [];\n\t\t}\n\t\tthis._activeSources[midi].push(source);\n\n\t\t//remove it when it's done\n\t\tsource.onended = function(){\n\t\t\tif (this._activeSources && this._activeSources[midi]){\n\t\t\t\tvar index = this._activeSources[midi].indexOf(source);\n\t\t\t\tif (index !== -1){\n\t\t\t\t\tthis._activeSources[midi].splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}.bind(this);\n\t}\n\treturn this;\n};\n\n/**\n * @param {(Frequency|Frequency[])} notes\tThe note to release, or an array of notes.\n * @param {Time=} time \tWhen to release the note.\n * @return {Tone.Sampler}\tthis\n */\nTone.Sampler.prototype.triggerRelease = function(notes, time){\n\tthis.log(\"triggerRelease\", notes, time);\n\tif (!Array.isArray(notes)){\n\t\tnotes = [notes];\n\t}\n\tfor (var i = 0; i < notes.length; i++){ \n\t\tvar midi = Tone.Frequency(notes[i]).toMidi();\n\t\t// find the note\n\t\tif (this._activeSources[midi] && this._activeSources[midi].length){\n\t\t\ttime = this.toSeconds(time);\n\t\t\t//stop all the sources on that midi note\n\t\t\tthis._activeSources[midi].forEach(function(source){\n\t\t\t\tsource.stop(time);\n\t\t\t});\n\t\t\tthis._activeSources[midi] = [];\n\t\t}\n\t}\n\n\treturn this;\n};\n\n/**\n * Release all currently active notes.\n * @param {Time=} time \tWhen to release the notes.\n * @return {Tone.Sampler}\tthis\n */\nTone.Sampler.prototype.releaseAll = function(time){\n\ttime = this.toSeconds(time);\n\tfor (var note in this._activeSources){\n\t\tvar sources = this._activeSources[note];\n\t\twhile (sources.length){\n\t\t\tvar source = sources.shift();\n\t\t\tsource.stop(time);\n\t\t}\n\t}\n\treturn this;\n};\n\n/**\n * Sync the instrument to the Transport. All subsequent calls of\n * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n * will be scheduled along the transport.\n * @example\n * synth.sync()\n * //schedule 3 notes when the transport first starts\n * synth.triggerAttackRelease('8n', 0)\n * synth.triggerAttackRelease('8n', '8n')\n * synth.triggerAttackRelease('8n', '4n')\n * //start the transport to hear the notes\n * Transport.start()\n * @returns {Tone.Instrument} this\n */\nTone.Sampler.prototype.sync = function(){\n\tthis._syncMethod(\"triggerAttack\", 1);\n\tthis._syncMethod(\"triggerRelease\", 1);\n\treturn this;\n};\n\n/**\n * Invoke the attack phase, then after the duration, invoke the release.\n * @param {(Frequency|Frequency[])} notes\tThe note to play and release, or an array of notes.\n * @param {(Time|Time[])} duration The time the note should be held\n * @param {Time=} time When to start the attack\n * @param {NormalRange} [velocity=1] The velocity of the attack\n * @return {Tone.Sampler} this\n */\nTone.Sampler.prototype.triggerAttackRelease = function(notes, duration, time, velocity){\n\ttime = this.toSeconds(time);\n\tthis.triggerAttack(notes, time, velocity);\n\tif (Tone.isArray(duration) && Tone.isArray(notes)){\n\t\tfor (var i = 0; i < notes.length; i++){\n\t\t\tvar d = duration[Math.min(i, duration.length - 1)];\n\t\t\tthis.triggerRelease(notes[i], time + this.toSeconds(d));\n\t\t}\n\t} else {\n\t\tthis.triggerRelease(notes, time + this.toSeconds(duration));\n\t}\n\treturn this;\n};\n\n/**\n * Add a note to the sampler.\n * @param {Note|Midi} note The buffer's pitch.\n * @param {String|Tone.Buffer|Audiobuffer} url Either the url of the bufer,\n * or a buffer which will be added\n * with the given name.\n * @param {Function=} callback The callback to invoke\n * when the url is loaded.\n */\nTone.Sampler.prototype.add = function(note, url, callback){\n\tif (Tone.isNote(note)){\n\t\t//convert the note name to MIDI\n\t\tvar mid = Tone.Frequency(note).toMidi();\n\t\tthis._buffers.add(mid, url, callback);\n\t} else if (!isNaN(parseFloat(note))){\n\t\t//otherwise if it's numbers assume it's midi\n\t\tthis._buffers.add(note, url, callback);\n\t} else {\n\t\tthrow new Error(\"Tone.Sampler: note must be the note's pitch. Instead got \"+note);\n\t}\n};\n\n/**\n * If the buffers are loaded or not\n * @memberOf Tone.Sampler#\n * @type {Boolean}\n * @name loaded\n * @readOnly\n */\nObject.defineProperty(Tone.Sampler.prototype, \"loaded\", {\n\t\"get\" : function(){\n\t\treturn this._buffers.loaded;\n\t}\n});\n\n/**\n * Clean up\n * @return {Tone.Sampler} this\n */\nTone.Sampler.prototype.dispose = function(){\n\tTone.Instrument.prototype.dispose.call(this);\n\tthis._buffers.dispose();\n\tthis._buffers = null;\n\tfor (var midi in this._activeSources){\n\t\tthis._activeSources[midi].forEach(function(source){\n\t\t\tsource.dispose();\n\t\t});\n\t}\n\tthis._activeSources = null;\n\treturn this;\n};\n\nexport default Tone.Sampler;\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Synth\";\nimport \"../source/Source\";\n\n/**\n * @class Tone.PolySynth handles voice creation and allocation for any\n * instruments passed in as the second paramter. PolySynth is\n * not a synthesizer by itself, it merely manages voices of\n * one of the other types of synths, allowing any of the\n * monophonic synthesizers to be polyphonic.\n *\n * @constructor\n * @extends {Tone.Instrument}\n * @param {number|Object} [polyphony=4] The number of voices to create\n * @param {function} [voice=Tone.Synth] The constructor of the voices\n * uses Tone.Synth by default.\n * @param {...*}\tvoiceArgs\tAll additional arguments will be passed into the class constructor.\n * @example\n * //a polysynth composed of 6 Voices of Synth\n * var synth = new Tone.PolySynth(6, Tone.Synth, {\n * oscillator : {\n * \t\ttype : \"square\"\n * \t}\n * }).toMaster();\n * //set the attributes using the set interface\n * synth.set(\"detune\", -1200);\n * //play a chord\n * synth.triggerAttackRelease([\"C4\", \"E4\", \"A4\"], \"4n\");\n */\nTone.PolySynth = function(){\n\n\tvar options = Tone.defaults(arguments, [\"polyphony\", \"voice\"], Tone.PolySynth);\n\tTone.Instrument.call(this, options);\n\toptions = Tone.defaultArg(options, Tone.Instrument.defaults);\n\n\t//max polyphony\n\toptions.polyphony = Math.min(Tone.PolySynth.MAX_POLYPHONY, options.polyphony);\n\n\t/**\n\t * the array of voices\n\t * @type {Array}\n\t */\n\tthis.voices = new Array(options.polyphony);\n\tthis.assert(options.polyphony > 0, \"polyphony must be greater than 0\");\n\n\t/**\n\t * The detune in cents\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\tthis._readOnly(\"detune\");\n\n\t//create the voices\n\tfor (var i = 0; i < options.polyphony; i++){\n\t\tvar v = new options.voice(arguments[2], arguments[3]);\n\t\tif (!(v instanceof Tone.Monophonic)){\n\t\t\tthrow new Error(\"Synth constructor must be instance of Tone.Monophonic\");\n\t\t}\n\t\tthis.voices[i] = v;\n\t\tv.index = i;\n\t\tv.connect(this.output);\n\t\tif (v.hasOwnProperty(\"detune\")){\n\t\t\tthis.detune.connect(v.detune);\n\t\t}\n\t}\n};\n\nTone.extend(Tone.PolySynth, Tone.Instrument);\n\n/**\n * the defaults\n * @const\n * @static\n * @type {Object}\n */\nTone.PolySynth.defaults = {\n\t\"polyphony\" : 4,\n\t\"volume\" : 0,\n\t\"detune\" : 0,\n\t\"voice\" : Tone.Synth\n};\n\n/**\n * Get the closest available voice, that is the\n * one that is either the closest to the note,\n * or has the lowest envelope value.\n * @param {Time} time return the voice that has the lowest energy at this time.\n * @param {Note} note if there is a voice with this note, that should be returned\n * @return {Tone.Monophonic} A synth voice.\n * @private\n */\nTone.PolySynth.prototype._getClosestVoice = function(time, note){\n\t//play the note which has the same frequency, if that exists\n\tvar sameNote = this.voices.find(function(voice){\n\t\t//break if it's within a small epsion of the voice's frequency\n\t\tif (Math.abs(voice.frequency.getValueAtTime(time) - Tone.Frequency(note)) < 1e-4 && \n\t\t\t//and that note is currently active\n\t\t\tvoice.getLevelAtTime(time) > 1e-5){\n\t\t\treturn voice;\n\t\t} \n\t});\n\tif (sameNote){\n\t\treturn sameNote;\n\t}\n\n\tvar sortedVoices = this.voices.slice().sort(function(a, b){\n\t\t//check that it's not scheduled in the future\n\t\tvar aLevel = a.getLevelAtTime(time + this.blockTime);\n\t\tvar bLevel = b.getLevelAtTime(time + this.blockTime);\n\n\t\tvar silenceThresh = 1e-5;\n\t\tif (aLevel < silenceThresh){\n\t\t\taLevel = 0;\n\t\t}\n\t\tif (bLevel < silenceThresh){\n\t\t\tbLevel = 0;\n\t\t}\n\t\treturn aLevel - bLevel;\n\t}.bind(this));\n\n\treturn sortedVoices[0];\n};\n\n/**\n * Trigger the attack portion of the note\n * @param {Frequency|Array} notes The notes to play. Accepts a single\n * Frequency or an array of frequencies.\n * @param {Time} [time=now] The start time of the note.\n * @param {number} [velocity=1] The velocity of the note.\n * @returns {Tone.PolySynth} this\n * @example\n * //trigger a chord immediately with a velocity of 0.2\n * poly.triggerAttack([\"Ab3\", \"C4\", \"F5\"], undefined, 0.2);\n */\nTone.PolySynth.prototype.triggerAttack = function(notes, time, velocity){\n\tif (!Array.isArray(notes)){\n\t\tnotes = [notes];\n\t}\n\ttime = this.toSeconds(time);\n\tnotes.forEach(function(note){\n\t\tvar voice = this._getClosestVoice(time, note);\n\t\tvoice.triggerAttack(note, time, velocity);\n\t\tthis.log(\"triggerAttack\", voice.index, note);\n\t}.bind(this));\n\treturn this;\n};\n\n/**\n * Trigger the release of the note. Unlike monophonic instruments,\n * a note (or array of notes) needs to be passed in as the first argument.\n * @param {Frequency|Array} notes The notes to play. Accepts a single\n * Frequency or an array of frequencies.\n * @param {Time} [time=now] When the release will be triggered.\n * @returns {Tone.PolySynth} this\n * @example\n * poly.triggerRelease([\"Ab3\", \"C4\", \"F5\"], \"+2n\");\n */\nTone.PolySynth.prototype.triggerRelease = function(notes, time){\n\tif (!Array.isArray(notes)){\n\t\tnotes = [notes];\n\t}\n\ttime = this.toSeconds(time);\n\tnotes.forEach(function(note){\n\t\tvar voice = this._getClosestVoice(time, note);\n\t\tthis.log(\"triggerRelease\", voice.index, note);\n\t\tvoice.triggerRelease(time);\n\t}.bind(this));\n\treturn this;\n};\n\n/**\n * Trigger the attack and release after the specified duration\n *\n * @param {Frequency|Array} notes The notes to play. Accepts a single\n * Frequency or an array of frequencies.\n * @param {Time} duration the duration of the note\n * @param {Time} [time=now] if no time is given, defaults to now\n * @param {number} [velocity=1] the velocity of the attack (0-1)\n * @returns {Tone.PolySynth} this\n * @example\n * //trigger a chord for a duration of a half note\n * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], \"2n\");\n * @example\n * //can pass in an array of durations as well\n * poly.triggerAttackRelease([\"Eb3\", \"G4\", \"C5\"], [\"2n\", \"4n\", \"4n\"]);\n */\nTone.PolySynth.prototype.triggerAttackRelease = function(notes, duration, time, velocity){\n\ttime = this.toSeconds(time);\n\tthis.triggerAttack(notes, time, velocity);\n\tif (Tone.isArray(duration) && Tone.isArray(notes)){\n\t\tfor (var i = 0; i < notes.length; i++){\n\t\t\tvar d = duration[Math.min(i, duration.length - 1)];\n\t\t\tthis.triggerRelease(notes[i], time + this.toSeconds(d));\n\t\t}\n\t} else {\n\t\tthis.triggerRelease(notes, time + this.toSeconds(duration));\n\t}\n\treturn this;\n};\n\n/**\n * Sync the instrument to the Transport. All subsequent calls of\n * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n * will be scheduled along the transport.\n * @example\n * synth.sync()\n * //schedule 3 notes when the transport first starts\n * synth.triggerAttackRelease('8n', 0)\n * synth.triggerAttackRelease('8n', '8n')\n * synth.triggerAttackRelease('8n', '4n')\n * //start the transport to hear the notes\n * Transport.start()\n * @returns {Tone.Instrument} this\n */\nTone.PolySynth.prototype.sync = function(){\n\tthis._syncMethod(\"triggerAttack\", 1);\n\tthis._syncMethod(\"triggerRelease\", 1);\n\treturn this;\n};\n\n/**\n * Set a member/attribute of the voices.\n * @param {Object|string} params\n * @param {number=} value\n * @param {Time=} rampTime\n * @returns {Tone.PolySynth} this\n * @example\n * poly.set({\n * \t\"filter\" : {\n * \t\t\"type\" : \"highpass\"\n * \t},\n * \t\"envelope\" : {\n * \t\t\"attack\" : 0.25\n * \t}\n * });\n */\nTone.PolySynth.prototype.set = function(params, value, rampTime){\n\tfor (var i = 0; i < this.voices.length; i++){\n\t\tthis.voices[i].set(params, value, rampTime);\n\t}\n\treturn this;\n};\n\n/**\n * Get the synth's attributes. Given no arguments get\n * will return all available object properties and their corresponding\n * values. Pass in a single attribute to retrieve or an array\n * of attributes. The attribute strings can also include a \".\"\n * to access deeper properties.\n * @param {Array=} params the parameters to get, otherwise will return\n * \t\t\t\t\t all available.\n */\nTone.PolySynth.prototype.get = function(params){\n\treturn this.voices[0].get(params);\n};\n\n/**\n * Trigger the release portion of all the currently active voices.\n * @param {Time} [time=now] When the notes should be released.\n * @return {Tone.PolySynth} this\n */\nTone.PolySynth.prototype.releaseAll = function(time){\n\ttime = this.toSeconds(time);\n\tthis.voices.forEach(function(voice){\n\t\tvoice.triggerRelease(time);\n\t});\n\treturn this;\n};\n\n/**\n * Clean up.\n * @returns {Tone.PolySynth} this\n */\nTone.PolySynth.prototype.dispose = function(){\n\tTone.Instrument.prototype.dispose.call(this);\n\tthis.voices.forEach(function(voice){\n\t\tvoice.dispose();\n\t});\n\tthis._writable(\"detune\");\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis.voices = null;\n\treturn this;\n};\n\n/**\n * The maximum number of notes that can be allocated\n * to a polysynth.\n * @type {Number}\n * @static\n */\nTone.PolySynth.MAX_POLYPHONY = 20;\n\nexport default Tone.PolySynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Instrument\";\nimport \"../source/Noise\";\nimport \"../component/LowpassCombFilter\";\n\n/**\n * @class Karplus-String string synthesis. Often out of tune.\n * Will change when the AudioWorkerNode is available across\n * browsers.\n *\n * @constructor\n * @extends {Tone.Instrument}\n * @param {Object} [options] see the defaults\n * @example\n * var plucky = new Tone.PluckSynth().toMaster();\n * plucky.triggerAttack(\"C4\");\n */\nTone.PluckSynth = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.PluckSynth.defaults);\n\tTone.Instrument.call(this, options);\n\n\t/**\n\t * @type {Tone.Noise}\n\t * @private\n\t */\n\tthis._noise = new Tone.Noise(\"pink\");\n\n\t/**\n\t * The amount of noise at the attack.\n\t * Nominal range of [0.1, 20]\n\t * @type {number}\n\t */\n\tthis.attackNoise = options.attackNoise;\n\n\t/**\n\t * the LFCF\n\t * @type {Tone.LowpassCombFilter}\n\t * @private\n\t */\n\tthis._lfcf = new Tone.LowpassCombFilter({\n\t\t\"resonance\" : options.resonance,\n\t\t\"dampening\" : options.dampening\n\t});\n\n\t/**\n\t * The resonance control.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.resonance = this._lfcf.resonance;\n\n\t/**\n\t * The dampening control. i.e. the lowpass filter frequency of the comb filter\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.dampening = this._lfcf.dampening;\n\n\t//connections\n\tthis._noise.connect(this._lfcf);\n\tthis._lfcf.connect(this.output);\n\tthis._readOnly([\"resonance\", \"dampening\"]);\n};\n\nTone.extend(Tone.PluckSynth, Tone.Instrument);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.PluckSynth.defaults = {\n\t\"attackNoise\" : 1,\n\t\"dampening\" : 4000,\n\t\"resonance\" : 0.7\n};\n\n/**\n * Trigger the note.\n * @param {Frequency} note The note to trigger.\n * @param {Time} [time=now] When the note should be triggered.\n * @returns {Tone.PluckSynth} this\n */\nTone.PluckSynth.prototype.triggerAttack = function(note, time){\n\tnote = this.toFrequency(note);\n\ttime = this.toSeconds(time);\n\tvar delayAmount = 1 / note;\n\tthis._lfcf.delayTime.setValueAtTime(delayAmount, time);\n\tthis._noise.start(time);\n\tthis._noise.stop(time + delayAmount * this.attackNoise);\n\treturn this;\n};\n\n/**\n *\tMake this method which belongs to the parent class private since\n *\tPluckSynth does not have any 'release' method.\n * \t@memberOf Tone.PluckSynth#\n * @function\n * @private\n * @name triggerAttackRelease\n */\n\n/**\n * Clean up.\n * @returns {Tone.PluckSynth} this\n */\nTone.PluckSynth.prototype.dispose = function(){\n\tTone.Instrument.prototype.dispose.call(this);\n\tthis._noise.dispose();\n\tthis._lfcf.dispose();\n\tthis._noise = null;\n\tthis._lfcf = null;\n\tthis._writable([\"resonance\", \"dampening\"]);\n\tthis.dampening = null;\n\tthis.resonance = null;\n\treturn this;\n};\n\nexport default Tone.PluckSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/AmplitudeEnvelope\";\nimport \"../component/FrequencyEnvelope\";\nimport \"../source/Noise\";\nimport \"../signal/Signal\";\nimport \"../component/Filter\";\nimport \"../instrument/Instrument\";\n\n/**\n * @class Tone.NoiseSynth is composed of a noise generator (Tone.Noise), one filter (Tone.Filter),\n * and two envelopes (Tone.Envelop). One envelope controls the amplitude\n * of the noise and the other is controls the cutoff frequency of the filter.\n *
\n *\n * @constructor\n * @extends {Tone.Instrument}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var noiseSynth = new Tone.NoiseSynth().toMaster();\n * noiseSynth.triggerAttackRelease(\"8n\");\n */\nTone.NoiseSynth = function(options){\n\n\t//get the defaults\n\toptions = Tone.defaultArg(options, Tone.NoiseSynth.defaults);\n\tTone.Instrument.call(this, options);\n\n\t/**\n\t * The noise source.\n\t * @type {Tone.Noise}\n\t * @example\n\t * noiseSynth.set(\"noise.type\", \"brown\");\n\t */\n\tthis.noise = new Tone.Noise(options.noise);\n\n\t/**\n\t * The amplitude envelope.\n\t * @type {Tone.AmplitudeEnvelope}\n\t */\n\tthis.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\n\t//connect the noise to the output\n\tthis.noise.chain(this.envelope, this.output);\n\tthis._readOnly([\"noise\", \"envelope\"]);\n};\n\nTone.extend(Tone.NoiseSynth, Tone.Instrument);\n\n/**\n * @const\n * @static\n * @type {Object}\n */\nTone.NoiseSynth.defaults = {\n\t\"noise\" : {\n\t\t\"type\" : \"white\"\n\t},\n\t\"envelope\" : {\n\t\t\"attack\" : 0.005,\n\t\t\"decay\" : 0.1,\n\t\t\"sustain\" : 0.0,\n\t}\n};\n\n/**\n * Start the attack portion of the envelopes. Unlike other\n * instruments, Tone.NoiseSynth doesn't have a note.\n * @param {Time} [time=now] the time the attack should start\n * @param {number} [velocity=1] the velocity of the note (0-1)\n * @returns {Tone.NoiseSynth} this\n * @example\n * noiseSynth.triggerAttack();\n */\nTone.NoiseSynth.prototype.triggerAttack = function(time, velocity){\n\ttime = this.toSeconds(time);\n\t//the envelopes\n\tthis.envelope.triggerAttack(time, velocity);\n\t//start the noise\n\tthis.noise.start(time);\n\tif (this.envelope.sustain === 0){\n\t\tthis.noise.stop(time + this.envelope.attack + this.envelope.decay);\n\t}\n\treturn this;\n};\n\n/**\n * Start the release portion of the envelopes.\n * @param {Time} [time=now] the time the release should start\n * @returns {Tone.NoiseSynth} this\n */\nTone.NoiseSynth.prototype.triggerRelease = function(time){\n\ttime = this.toSeconds(time);\n\tthis.envelope.triggerRelease(time);\n\tthis.noise.stop(time + this.envelope.release);\n\treturn this;\n};\n\n/**\n * Sync the instrument to the Transport. All subsequent calls of\n * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n * will be scheduled along the transport.\n * @example\n * synth.sync()\n * //schedule 3 notes when the transport first starts\n * synth.triggerAttackRelease('8n', 0)\n * synth.triggerAttackRelease('8n', '8n')\n * synth.triggerAttackRelease('8n', '4n')\n * //start the transport to hear the notes\n * Transport.start()\n * @returns {Tone.Instrument} this\n */\nTone.NoiseSynth.prototype.sync = function(){\n\tthis._syncMethod(\"triggerAttack\", 0);\n\tthis._syncMethod(\"triggerRelease\", 0);\n\treturn this;\n};\n\n/**\n * Trigger the attack and then the release.\n * @param {Time} duration the duration of the note\n * @param {Time} [time=now] the time of the attack\n * @param {number} [velocity=1] the velocity\n * @returns {Tone.NoiseSynth} this\n */\nTone.NoiseSynth.prototype.triggerAttackRelease = function(duration, time, velocity){\n\ttime = this.toSeconds(time);\n\tduration = this.toSeconds(duration);\n\tthis.triggerAttack(time, velocity);\n\tthis.triggerRelease(time + duration);\n\treturn this;\n};\n\n/**\n * Clean up.\n * @returns {Tone.NoiseSynth} this\n */\nTone.NoiseSynth.prototype.dispose = function(){\n\tTone.Instrument.prototype.dispose.call(this);\n\tthis._writable([\"noise\", \"envelope\"]);\n\tthis.noise.dispose();\n\tthis.noise = null;\n\tthis.envelope.dispose();\n\tthis.envelope = null;\n\treturn this;\n};\n\nexport default Tone.NoiseSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Instrument\";\nimport \"../source/FMOscillator\";\nimport \"../component/Filter\";\nimport \"../component/FrequencyEnvelope\";\nimport \"../component/AmplitudeEnvelope\";\nimport \"../core/Gain\";\nimport \"../signal/Scale\";\nimport \"../signal/Multiply\";\n\n/**\n * Inharmonic ratio of frequencies based on the Roland TR-808\n * Taken from https://ccrma.stanford.edu/papers/tr-808-cymbal-physically-informed-circuit-bendable-digital-model\n * @private\n * @static\n * @type {Array}\n */\nvar inharmRatios = [1.0, 1.483, 1.932, 2.546, 2.630, 3.897];\n\n/**\n * @class A highly inharmonic and spectrally complex source with a highpass filter\n * and amplitude envelope which is good for making metalophone sounds. Based\n * on CymbalSynth by [@polyrhythmatic](https://github.com/polyrhythmatic).\n * Inspiration from [Sound on Sound](https://web.archive.org/web/20160610143924/https://www.soundonsound.com/sos/jul02/articles/synthsecrets0702.asp).\n *\n * @constructor\n * @extends {Tone.Instrument}\n * @param {Object} [options] The options availble for the synth\n * see defaults below\n */\nTone.MetalSynth = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.MetalSynth.defaults);\n\tTone.Instrument.call(this, options);\n\n\t/**\n\t * The frequency of the cymbal\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The array of FMOscillators\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._oscillators = [];\n\n\t/**\n\t * The frequency multipliers\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._freqMultipliers = [];\n\n\t/**\n\t * The amplitude for the body\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._amplitue = new Tone.Gain(0).connect(this.output);\n\n\t/**\n\t * highpass the output\n\t * @type {Tone.Filter}\n\t * @private\n\t */\n\tthis._highpass = new Tone.Filter({\n\t\t\"type\" : \"highpass\",\n\t\t\"Q\" : -3.0102999566398125\n\t}).connect(this._amplitue);\n\n\t/**\n\t * The number of octaves the highpass\n\t * filter frequency ramps\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._octaves = options.octaves;\n\n\t/**\n\t * Scale the body envelope\n\t * for the bandpass\n\t * @type {Tone.Scale}\n\t * @private\n\t */\n\tthis._filterFreqScaler = new Tone.Scale(options.resonance, 7000);\n\n\t/**\n\t * The envelope which is connected both to the\n\t * amplitude and highpass filter's cutoff frequency\n\t * @type {Tone.Envelope}\n\t */\n\tthis.envelope = new Tone.Envelope({\n\t\t\"attack\" : options.envelope.attack,\n\t\t\"attackCurve\" : \"linear\",\n\t\t\"decay\" : options.envelope.decay,\n\t\t\"sustain\" : 0,\n\t\t\"release\" : options.envelope.release,\n\t}).chain(this._filterFreqScaler, this._highpass.frequency);\n\tthis.envelope.connect(this._amplitue.gain);\n\n\tfor (var i = 0; i < inharmRatios.length; i++){\n\t\tvar osc = new Tone.FMOscillator({\n\t\t\t\"type\" : \"square\",\n\t\t\t\"modulationType\" : \"square\",\n\t\t\t\"harmonicity\" : options.harmonicity,\n\t\t\t\"modulationIndex\" : options.modulationIndex\n\t\t});\n\t\tosc.connect(this._highpass);\n\t\tthis._oscillators[i] = osc;\n\n\t\tvar mult = new Tone.Multiply(inharmRatios[i]);\n\t\tthis._freqMultipliers[i] = mult;\n\t\tthis.frequency.chain(mult, osc.frequency);\n\t}\n\n\t//set the octaves\n\tthis.octaves = options.octaves;\n\n};\n\nTone.extend(Tone.MetalSynth, Tone.Instrument);\n\n/**\n * default values\n * @static\n * @const\n * @type {Object}\n */\nTone.MetalSynth.defaults = {\n\t\"frequency\" : 200,\n\t\"envelope\" : {\n\t\t\"attack\" : 0.001,\n\t\t\"decay\" : 1.4,\n\t\t\"release\" : 0.2\n\t},\n\t\"harmonicity\" : 5.1,\n\t\"modulationIndex\" : 32,\n\t\"resonance\" : 4000,\n\t\"octaves\" : 1.5\n};\n\n/**\n * Trigger the attack.\n * @param {Time} time When the attack should be triggered.\n * @param {NormalRange} [velocity=1] The velocity that the envelope should be triggered at.\n * @return {Tone.MetalSynth} this\n */\nTone.MetalSynth.prototype.triggerAttack = function(time, vel){\n\ttime = this.toSeconds(time);\n\tvel = Tone.defaultArg(vel, 1);\n\tthis.envelope.triggerAttack(time, vel);\n\tthis._oscillators.forEach(function(osc){\n\t\tosc.start(time);\n\t});\n\t//if the sustain is 0, stop the oscillator as well\n\tif (this.envelope.sustain === 0){\n\t\tthis._oscillators.forEach(function(osc){\n\t\t\tosc.stop(time + this.envelope.attack + this.envelope.decay);\n\t\t}.bind(this));\n\t}\n\treturn this;\n};\n\n/**\n * Trigger the release of the envelope.\n * @param {Time} time When the release should be triggered.\n * @return {Tone.MetalSynth} this\n */\nTone.MetalSynth.prototype.triggerRelease = function(time){\n\ttime = this.toSeconds(time);\n\tthis.envelope.triggerRelease(time);\n\tthis._oscillators.forEach(function(osc){\n\t\tosc.stop(time + this.envelope.release);\n\t}.bind(this));\n\treturn this;\n};\n\n/**\n * Sync the instrument to the Transport. All subsequent calls of\n * [triggerAttack](#triggerattack) and [triggerRelease](#triggerrelease)\n * will be scheduled along the transport.\n * @example\n * synth.sync()\n * //schedule 3 notes when the transport first starts\n * synth.triggerAttackRelease('8n', 0)\n * synth.triggerAttackRelease('8n', '8n')\n * synth.triggerAttackRelease('8n', '4n')\n * //start the transport to hear the notes\n * Transport.start()\n * @returns {Tone.Instrument} this\n */\nTone.MetalSynth.prototype.sync = function(){\n\tthis._syncMethod(\"triggerAttack\", 0);\n\tthis._syncMethod(\"triggerRelease\", 0);\n\treturn this;\n};\n\n/**\n * Trigger the attack and release of the envelope after the given\n * duration.\n * @param {Time} duration The duration before triggering the release\n * @param {Time} time When the attack should be triggered.\n * @param {NormalRange} [velocity=1] The velocity that the envelope should be triggered at.\n * @return {Tone.MetalSynth} this\n */\nTone.MetalSynth.prototype.triggerAttackRelease = function(duration, time, velocity){\n\ttime = this.toSeconds(time);\n\tduration = this.toSeconds(duration);\n\tthis.triggerAttack(time, velocity);\n\tthis.triggerRelease(time + duration);\n\treturn this;\n};\n\n/**\n * The modulationIndex of the oscillators which make up the source.\n * see Tone.FMOscillator.modulationIndex\n * @memberOf Tone.MetalSynth#\n * @type {Positive}\n * @name modulationIndex\n */\nObject.defineProperty(Tone.MetalSynth.prototype, \"modulationIndex\", {\n\tget : function(){\n\t\treturn this._oscillators[0].modulationIndex.value;\n\t},\n\tset : function(val){\n\t\tfor (var i = 0; i < this._oscillators.length; i++){\n\t\t\tthis._oscillators[i].modulationIndex.value = val;\n\t\t}\n\t}\n});\n\n/**\n * The harmonicity of the oscillators which make up the source.\n * see Tone.FMOscillator.harmonicity\n * @memberOf Tone.MetalSynth#\n * @type {Positive}\n * @name harmonicity\n */\nObject.defineProperty(Tone.MetalSynth.prototype, \"harmonicity\", {\n\tget : function(){\n\t\treturn this._oscillators[0].harmonicity.value;\n\t},\n\tset : function(val){\n\t\tfor (var i = 0; i < this._oscillators.length; i++){\n\t\t\tthis._oscillators[i].harmonicity.value = val;\n\t\t}\n\t}\n});\n\n/**\n * The frequency of the highpass filter attached to the envelope\n * @memberOf Tone.MetalSynth#\n * @type {Frequency}\n * @name resonance\n */\nObject.defineProperty(Tone.MetalSynth.prototype, \"resonance\", {\n\tget : function(){\n\t\treturn this._filterFreqScaler.min;\n\t},\n\tset : function(val){\n\t\tthis._filterFreqScaler.min = val;\n\t\tthis.octaves = this._octaves;\n\t}\n});\n\n/**\n * The number of octaves above the \"resonance\" frequency\n * that the filter ramps during the attack/decay envelope\n * @memberOf Tone.MetalSynth#\n * @type {Number}\n * @name octaves\n */\nObject.defineProperty(Tone.MetalSynth.prototype, \"octaves\", {\n\tget : function(){\n\t\treturn this._octaves;\n\t},\n\tset : function(octs){\n\t\tthis._octaves = octs;\n\t\tthis._filterFreqScaler.max = this._filterFreqScaler.min * Math.pow(2, octs);\n\t}\n});\n\n/**\n * Clean up\n * @returns {Tone.MetalSynth} this\n */\nTone.MetalSynth.prototype.dispose = function(){\n\tTone.Instrument.prototype.dispose.call(this);\n\tfor (var i = 0; i < this._oscillators.length; i++){\n\t\tthis._oscillators[i].dispose();\n\t\tthis._freqMultipliers[i].dispose();\n\t}\n\tthis._oscillators = null;\n\tthis._freqMultipliers = null;\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis._filterFreqScaler.dispose();\n\tthis._filterFreqScaler = null;\n\tthis._amplitue.dispose();\n\tthis._amplitue = null;\n\tthis.envelope.dispose();\n\tthis.envelope = null;\n\tthis._highpass.dispose();\n\tthis._highpass = null;\n};\n\nexport default Tone.MetalSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../source/OmniOscillator\";\nimport \"../instrument/Instrument\";\nimport \"../component/AmplitudeEnvelope\";\n\n/**\n * @class Tone.MembraneSynth makes kick and tom sounds using a single oscillator\n * with an amplitude envelope and frequency ramp. A Tone.OmniOscillator\n * is routed through a Tone.AmplitudeEnvelope to the output. The drum\n * quality of the sound comes from the frequency envelope applied\n * during Tone.MembraneSynth.triggerAttack(note). The frequency envelope\n * starts at note * .octaves
and ramps to note
\n * over the duration of .pitchDecay
.\n *\n * @constructor\n * @extends {Tone.Instrument}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var synth = new Tone.MembraneSynth().toMaster();\n * synth.triggerAttackRelease(\"C2\", \"8n\");\n */\nTone.MembraneSynth = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.MembraneSynth.defaults);\n\tTone.Instrument.call(this, options);\n\n\t/**\n\t * The oscillator.\n\t * @type {Tone.OmniOscillator}\n\t */\n\tthis.oscillator = new Tone.OmniOscillator(options.oscillator);\n\n\t/**\n\t * The amplitude envelope.\n\t * @type {Tone.AmplitudeEnvelope}\n\t */\n\tthis.envelope = new Tone.AmplitudeEnvelope(options.envelope);\n\n\t/**\n\t * The number of octaves the pitch envelope ramps.\n\t * @type {Positive}\n\t */\n\tthis.octaves = options.octaves;\n\n\t/**\n\t * The amount of time the frequency envelope takes.\n\t * @type {Time}\n\t */\n\tthis.pitchDecay = options.pitchDecay;\n\n\tthis.oscillator.chain(this.envelope, this.output);\n\tthis._readOnly([\"oscillator\", \"envelope\"]);\n};\n\nTone.extend(Tone.MembraneSynth, Tone.Instrument);\n\n/**\n * @static\n * @type {Object}\n */\nTone.MembraneSynth.defaults = {\n\t\"pitchDecay\" : 0.05,\n\t\"octaves\" : 10,\n\t\"oscillator\" : {\n\t\t\"type\" : \"sine\",\n\t},\n\t\"envelope\" : {\n\t\t\"attack\" : 0.001,\n\t\t\"decay\" : 0.4,\n\t\t\"sustain\" : 0.01,\n\t\t\"release\" : 1.4,\n\t\t\"attackCurve\" : \"exponential\"\n\t}\n};\n\n/**\n * Trigger the note at the given time with the given velocity.\n *\n * @param {Frequency} note the note\n * @param {Time} [time=now] the time, if not given is now\n * @param {number} [velocity=1] velocity defaults to 1\n * @returns {Tone.MembraneSynth} this\n * @example\n * kick.triggerAttack(60);\n */\nTone.MembraneSynth.prototype.triggerAttack = function(note, time, velocity){\n\ttime = this.toSeconds(time);\n\tnote = this.toFrequency(note);\n\tvar maxNote = note * this.octaves;\n\tthis.oscillator.frequency.setValueAtTime(maxNote, time);\n\tthis.oscillator.frequency.exponentialRampToValueAtTime(note, time + this.toSeconds(this.pitchDecay));\n\tthis.envelope.triggerAttack(time, velocity);\n\tthis.oscillator.start(time);\n\tif (this.envelope.sustain === 0){\n\t\tthis.oscillator.stop(time + this.envelope.attack + this.envelope.decay);\n\t}\n\treturn this;\n};\n\n/**\n * Trigger the release portion of the note.\n *\n * @param {Time} [time=now] the time the note will release\n * @returns {Tone.MembraneSynth} this\n */\nTone.MembraneSynth.prototype.triggerRelease = function(time){\n\ttime = this.toSeconds(time);\n\tthis.envelope.triggerRelease(time);\n\tthis.oscillator.stop(time + this.envelope.release);\n\treturn this;\n};\n\n/**\n * Clean up.\n * @returns {Tone.MembraneSynth} this\n */\nTone.MembraneSynth.prototype.dispose = function(){\n\tTone.Instrument.prototype.dispose.call(this);\n\tthis._writable([\"oscillator\", \"envelope\"]);\n\tthis.oscillator.dispose();\n\tthis.oscillator = null;\n\tthis.envelope.dispose();\n\tthis.envelope = null;\n\treturn this;\n};\n\nexport default Tone.MembraneSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Synth\";\nimport \"../signal/Signal\";\nimport \"../signal/Multiply\";\nimport \"../instrument/Monophonic\";\n\n/**\n * @class FMSynth is composed of two Tone.Synths where one Tone.Synth modulates\n * the frequency of a second Tone.Synth. A lot of spectral content\n * can be explored using the modulationIndex parameter. Read more about\n * frequency modulation synthesis on Sound On Sound: [Part 1](https://web.archive.org/web/20160403123704/http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm), [Part 2](https://web.archive.org/web/20160403115835/http://www.soundonsound.com/sos/may00/articles/synth.htm).\n *
\n *\n * @constructor\n * @extends {Tone.Monophonic}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var fmSynth = new Tone.FMSynth().toMaster();\n * fmSynth.triggerAttackRelease(\"C5\", \"4n\");\n */\nTone.FMSynth = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.FMSynth.defaults);\n\tTone.Monophonic.call(this, options);\n\n\t/**\n\t * The carrier voice.\n\t * @type {Tone.Synth}\n\t * @private\n\t */\n\tthis._carrier = new Tone.Synth(options.carrier);\n\tthis._carrier.volume.value = -10;\n\n\t/**\n\t * The carrier's oscillator\n\t * @type {Tone.Oscillator}\n\t */\n\tthis.oscillator = this._carrier.oscillator;\n\n\t/**\n\t * The carrier's envelope\n\t * @type {Tone.Oscillator}\n\t */\n\tthis.envelope = this._carrier.envelope.set(options.envelope);\n\n\t/**\n\t * The modulator voice.\n\t * @type {Tone.Synth}\n\t * @private\n\t */\n\tthis._modulator = new Tone.Synth(options.modulator);\n\tthis._modulator.volume.value = -10;\n\n\t/**\n\t * The modulator's oscillator which is applied\n\t * to the amplitude of the oscillator\n\t * @type {Tone.Oscillator}\n\t */\n\tthis.modulation = this._modulator.oscillator.set(options.modulation);\n\n\t/**\n\t * The modulator's envelope\n\t * @type {Tone.Oscillator}\n\t */\n\tthis.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\n\t/**\n\t * The frequency control.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\n\t/**\n\t * The detune in cents\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\n\t/**\n\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t * @type {Positive}\n\t * @signal\n\t * @example\n\t * //pitch voice1 an octave below voice0\n\t * synth.harmonicity.value = 0.5;\n\t */\n\tthis.harmonicity = new Tone.Multiply(options.harmonicity);\n\tthis.harmonicity.units = Tone.Type.Positive;\n\n\t/**\n\t * The modulation index which essentially the depth or amount of the modulation. It is the\n\t * ratio of the frequency of the modulating signal (mf) to the amplitude of the\n\t * modulating signal (ma) -- as in ma/mf.\n\t *\t@type {Positive}\n\t *\t@signal\n\t */\n\tthis.modulationIndex = new Tone.Multiply(options.modulationIndex);\n\tthis.modulationIndex.units = Tone.Type.Positive;\n\n\t/**\n\t * the node where the modulation happens\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis._modulationNode = new Tone.Gain(0);\n\n\t//control the two voices frequency\n\tthis.frequency.connect(this._carrier.frequency);\n\tthis.frequency.chain(this.harmonicity, this._modulator.frequency);\n\tthis.frequency.chain(this.modulationIndex, this._modulationNode);\n\tthis.detune.fan(this._carrier.detune, this._modulator.detune);\n\tthis._modulator.connect(this._modulationNode.gain);\n\tthis._modulationNode.connect(this._carrier.frequency);\n\tthis._carrier.connect(this.output);\n\tthis._readOnly([\"frequency\", \"harmonicity\", \"modulationIndex\", \"oscillator\", \"envelope\", \"modulation\", \"modulationEnvelope\", \"detune\"]);\n};\n\nTone.extend(Tone.FMSynth, Tone.Monophonic);\n\n/**\n * @static\n * @type {Object}\n */\nTone.FMSynth.defaults = {\n\t\"harmonicity\" : 3,\n\t\"modulationIndex\" : 10,\n\t\"detune\" : 0,\n\t\"oscillator\" : {\n\t\t\"type\" : \"sine\"\n\t},\n\t\"envelope\" : {\n\t\t\"attack\" : 0.01,\n\t\t\"decay\" : 0.01,\n\t\t\"sustain\" : 1,\n\t\t\"release\" : 0.5\n\t},\n\t\"modulation\" : {\n\t\t\"type\" : \"square\"\n\t},\n\t\"modulationEnvelope\" : {\n\t\t\"attack\" : 0.5,\n\t\t\"decay\" : 0.0,\n\t\t\"sustain\" : 1,\n\t\t\"release\" : 0.5\n\t}\n};\n\n/**\n * \ttrigger the attack portion of the note\n *\n * @param {Time} [time=now] the time the note will occur\n * @param {number} [velocity=1] the velocity of the note\n * @returns {Tone.FMSynth} this\n * @private\n */\nTone.FMSynth.prototype._triggerEnvelopeAttack = function(time, velocity){\n\ttime = this.toSeconds(time);\n\t//the envelopes\n\tthis._carrier._triggerEnvelopeAttack(time, velocity);\n\tthis._modulator._triggerEnvelopeAttack(time);\n\treturn this;\n};\n\n/**\n * trigger the release portion of the note\n *\n * @param {Time} [time=now] the time the note will release\n * @returns {Tone.FMSynth} this\n * @private\n */\nTone.FMSynth.prototype._triggerEnvelopeRelease = function(time){\n\ttime = this.toSeconds(time);\n\tthis._carrier._triggerEnvelopeRelease(time);\n\tthis._modulator._triggerEnvelopeRelease(time);\n\treturn this;\n};\n\n/**\n * clean up\n * @returns {Tone.FMSynth} this\n */\nTone.FMSynth.prototype.dispose = function(){\n\tTone.Monophonic.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"harmonicity\", \"modulationIndex\", \"oscillator\", \"envelope\", \"modulation\", \"modulationEnvelope\", \"detune\"]);\n\tthis._carrier.dispose();\n\tthis._carrier = null;\n\tthis._modulator.dispose();\n\tthis._modulator = null;\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis.modulationIndex.dispose();\n\tthis.modulationIndex = null;\n\tthis.harmonicity.dispose();\n\tthis.harmonicity = null;\n\tthis._modulationNode.dispose();\n\tthis._modulationNode = null;\n\tthis.oscillator = null;\n\tthis.envelope = null;\n\tthis.modulationEnvelope = null;\n\tthis.modulation = null;\n\treturn this;\n};\n\nexport default Tone.FMSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/MonoSynth\";\nimport \"../component/LFO\";\nimport \"../signal/Signal\";\nimport \"../signal/Multiply\";\nimport \"../instrument/Monophonic\";\nimport \"../core/Param\";\n\n/**\n * @class Tone.DuoSynth is a monophonic synth composed of two\n * MonoSynths run in parallel with control over the\n * frequency ratio between the two voices and vibrato effect.\n *
\n *\n * @constructor\n * @extends {Tone.Monophonic}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var duoSynth = new Tone.DuoSynth().toMaster();\n * duoSynth.triggerAttackRelease(\"C4\", \"2n\");\n */\nTone.DuoSynth = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.DuoSynth.defaults);\n\tTone.Monophonic.call(this, options);\n\n\t/**\n\t * the first voice\n\t * @type {Tone.MonoSynth}\n\t */\n\tthis.voice0 = new Tone.MonoSynth(options.voice0);\n\tthis.voice0.volume.value = -10;\n\n\t/**\n\t * the second voice\n\t * @type {Tone.MonoSynth}\n\t */\n\tthis.voice1 = new Tone.MonoSynth(options.voice1);\n\tthis.voice1.volume.value = -10;\n\n\t/**\n\t * The vibrato LFO.\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._vibrato = new Tone.LFO(options.vibratoRate, -50, 50);\n\tthis._vibrato.start();\n\n\t/**\n\t * the vibrato frequency\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.vibratoRate = this._vibrato.frequency;\n\n\t/**\n\t * the vibrato gain\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._vibratoGain = new Tone.Gain(options.vibratoAmount, Tone.Type.Positive);\n\n\t/**\n\t * The amount of vibrato\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis.vibratoAmount = this._vibratoGain.gain;\n\n\t/**\n\t * the frequency control\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\n\t/**\n\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t * @type {Positive}\n\t * @signal\n\t * @example\n\t * //pitch voice1 an octave below voice0\n\t * duoSynth.harmonicity.value = 0.5;\n\t */\n\tthis.harmonicity = new Tone.Multiply(options.harmonicity);\n\tthis.harmonicity.units = Tone.Type.Positive;\n\n\t//control the two voices frequency\n\tthis.frequency.connect(this.voice0.frequency);\n\tthis.frequency.chain(this.harmonicity, this.voice1.frequency);\n\tthis._vibrato.connect(this._vibratoGain);\n\tthis._vibratoGain.fan(this.voice0.detune, this.voice1.detune);\n\tthis.voice0.connect(this.output);\n\tthis.voice1.connect(this.output);\n\tthis._readOnly([\"voice0\", \"voice1\", \"frequency\", \"vibratoAmount\", \"vibratoRate\"]);\n};\n\nTone.extend(Tone.DuoSynth, Tone.Monophonic);\n\n/**\n * @static\n * @type {Object}\n */\nTone.DuoSynth.defaults = {\n\t\"vibratoAmount\" : 0.5,\n\t\"vibratoRate\" : 5,\n\t\"harmonicity\" : 1.5,\n\t\"voice0\" : {\n\t\t\"volume\" : -10,\n\t\t\"portamento\" : 0,\n\t\t\"oscillator\" : {\n\t\t\t\"type\" : \"sine\"\n\t\t},\n\t\t\"filterEnvelope\" : {\n\t\t\t\"attack\" : 0.01,\n\t\t\t\"decay\" : 0.0,\n\t\t\t\"sustain\" : 1,\n\t\t\t\"release\" : 0.5\n\t\t},\n\t\t\"envelope\" : {\n\t\t\t\"attack\" : 0.01,\n\t\t\t\"decay\" : 0.0,\n\t\t\t\"sustain\" : 1,\n\t\t\t\"release\" : 0.5\n\t\t}\n\t},\n\t\"voice1\" : {\n\t\t\"volume\" : -10,\n\t\t\"portamento\" : 0,\n\t\t\"oscillator\" : {\n\t\t\t\"type\" : \"sine\"\n\t\t},\n\t\t\"filterEnvelope\" : {\n\t\t\t\"attack\" : 0.01,\n\t\t\t\"decay\" : 0.0,\n\t\t\t\"sustain\" : 1,\n\t\t\t\"release\" : 0.5\n\t\t},\n\t\t\"envelope\" : {\n\t\t\t\"attack\" : 0.01,\n\t\t\t\"decay\" : 0.0,\n\t\t\t\"sustain\" : 1,\n\t\t\t\"release\" : 0.5\n\t\t}\n\t}\n};\n\n/**\n * start the attack portion of the envelopes\n *\n * @param {Time} [time=now] the time the attack should start\n * @param {NormalRange} [velocity=1] the velocity of the note (0-1)\n * @returns {Tone.DuoSynth} this\n * @private\n */\nTone.DuoSynth.prototype._triggerEnvelopeAttack = function(time, velocity){\n\ttime = this.toSeconds(time);\n\tthis.voice0._triggerEnvelopeAttack(time, velocity);\n\tthis.voice1._triggerEnvelopeAttack(time, velocity);\n\treturn this;\n};\n\n/**\n * start the release portion of the envelopes\n *\n * @param {Time} [time=now] the time the release should start\n * @returns {Tone.DuoSynth} this\n * @private\n */\nTone.DuoSynth.prototype._triggerEnvelopeRelease = function(time){\n\tthis.voice0._triggerEnvelopeRelease(time);\n\tthis.voice1._triggerEnvelopeRelease(time);\n\treturn this;\n};\n\n/**\n * Get the level of the output at the given time. Measures\n * the envelope(s) value at the time. \n * @param {Time} time The time to query the envelope value\n * @return {NormalRange} The output level between 0-1\n */\nTone.DuoSynth.prototype.getLevelAtTime = function(time){\n\treturn (this.voice0.getLevelAtTime(time) + this.voice1.getLevelAtTime(time))/2;\n};\n\n/**\n * clean up\n * @returns {Tone.DuoSynth} this\n */\nTone.DuoSynth.prototype.dispose = function(){\n\tTone.Monophonic.prototype.dispose.call(this);\n\tthis._writable([\"voice0\", \"voice1\", \"frequency\", \"vibratoAmount\", \"vibratoRate\"]);\n\tthis.voice0.dispose();\n\tthis.voice0 = null;\n\tthis.voice1.dispose();\n\tthis.voice1 = null;\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis._vibratoGain.dispose();\n\tthis._vibratoGain = null;\n\tthis._vibrato = null;\n\tthis.harmonicity.dispose();\n\tthis.harmonicity = null;\n\tthis.vibratoAmount.dispose();\n\tthis.vibratoAmount = null;\n\tthis.vibratoRate = null;\n\treturn this;\n};\n\nexport default Tone.DuoSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../instrument/Synth\";\nimport \"../signal/Signal\";\nimport \"../signal/Multiply\";\nimport \"../instrument/Monophonic\";\nimport \"../signal/AudioToGain\";\nimport \"../core/Gain\";\n\n/**\n * @class AMSynth uses the output of one Tone.Synth to modulate the\n * amplitude of another Tone.Synth. The harmonicity (the ratio between\n * the two signals) affects the timbre of the output signal greatly.\n * Read more about Amplitude Modulation Synthesis on\n * [SoundOnSound](https://web.archive.org/web/20160404103653/http://www.soundonsound.com:80/sos/mar00/articles/synthsecrets.htm).\n *
\n *\n * @constructor\n * @extends {Tone.Monophonic}\n * @param {Object} [options] the options available for the synth\n * see defaults below\n * @example\n * var synth = new Tone.AMSynth().toMaster();\n * synth.triggerAttackRelease(\"C4\", \"4n\");\n */\nTone.AMSynth = function(options){\n\n\toptions = Tone.defaultArg(options, Tone.AMSynth.defaults);\n\tTone.Monophonic.call(this, options);\n\n\t/**\n\t * The carrier voice.\n\t * @type {Tone.Synth}\n\t * @private\n\t */\n\tthis._carrier = new Tone.Synth();\n\tthis._carrier.volume.value = -10;\n\n\t/**\n\t * The carrier's oscillator\n\t * @type {Tone.Oscillator}\n\t */\n\tthis.oscillator = this._carrier.oscillator.set(options.oscillator);\n\n\t/**\n\t * The carrier's envelope\n\t * @type {Tone.AmplitudeEnvelope}\n\t */\n\tthis.envelope = this._carrier.envelope.set(options.envelope);\n\n\t/**\n\t * The modulator voice.\n\t * @type {Tone.Synth}\n\t * @private\n\t */\n\tthis._modulator = new Tone.Synth();\n\tthis._modulator.volume.value = -10;\n\n\t/**\n\t * The modulator's oscillator which is applied\n\t * to the amplitude of the oscillator\n\t * @type {Tone.Oscillator}\n\t */\n\tthis.modulation = this._modulator.oscillator.set(options.modulation);\n\n\t/**\n\t * The modulator's envelope\n\t * @type {Tone.AmplitudeEnvelope}\n\t */\n\tthis.modulationEnvelope = this._modulator.envelope.set(options.modulationEnvelope);\n\n\t/**\n\t * The frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(440, Tone.Type.Frequency);\n\n\t/**\n\t * The detune in cents\n\t * @type {Cents}\n\t * @signal\n\t */\n\tthis.detune = new Tone.Signal(options.detune, Tone.Type.Cents);\n\n\t/**\n\t * Harmonicity is the ratio between the two voices. A harmonicity of\n\t * 1 is no change. Harmonicity = 2 means a change of an octave.\n\t * @type {Positive}\n\t * @signal\n\t * @example\n\t * //pitch voice1 an octave below voice0\n\t * synth.harmonicity.value = 0.5;\n\t */\n\tthis.harmonicity = new Tone.Multiply(options.harmonicity);\n\tthis.harmonicity.units = Tone.Type.Positive;\n\n\t/**\n\t * convert the -1,1 output to 0,1\n\t * @type {Tone.AudioToGain}\n\t * @private\n\t */\n\tthis._modulationScale = new Tone.AudioToGain();\n\n\t/**\n\t * the node where the modulation happens\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._modulationNode = new Tone.Gain();\n\n\t//control the two voices frequency\n\tthis.frequency.connect(this._carrier.frequency);\n\tthis.frequency.chain(this.harmonicity, this._modulator.frequency);\n\tthis.detune.fan(this._carrier.detune, this._modulator.detune);\n\tthis._modulator.chain(this._modulationScale, this._modulationNode.gain);\n\tthis._carrier.chain(this._modulationNode, this.output);\n\tthis._readOnly([\"frequency\", \"harmonicity\", \"oscillator\", \"envelope\", \"modulation\", \"modulationEnvelope\", \"detune\"]);\n};\n\nTone.extend(Tone.AMSynth, Tone.Monophonic);\n\n/**\n * @static\n * @type {Object}\n */\nTone.AMSynth.defaults = {\n\t\"harmonicity\" : 3,\n\t\"detune\" : 0,\n\t\"oscillator\" : {\n\t\t\"type\" : \"sine\"\n\t},\n\t\"envelope\" : {\n\t\t\"attack\" : 0.01,\n\t\t\"decay\" : 0.01,\n\t\t\"sustain\" : 1,\n\t\t\"release\" : 0.5\n\t},\n\t\"modulation\" : {\n\t\t\"type\" : \"square\"\n\t},\n\t\"modulationEnvelope\" : {\n\t\t\"attack\" : 0.5,\n\t\t\"decay\" : 0.0,\n\t\t\"sustain\" : 1,\n\t\t\"release\" : 0.5\n\t}\n};\n\n/**\n * trigger the attack portion of the note\n *\n * @param {Time} [time=now] the time the note will occur\n * @param {NormalRange} [velocity=1] the velocity of the note\n * @private\n * @returns {Tone.AMSynth} this\n */\nTone.AMSynth.prototype._triggerEnvelopeAttack = function(time, velocity){\n\t//the port glide\n\ttime = this.toSeconds(time);\n\t//the envelopes\n\tthis._carrier._triggerEnvelopeAttack(time, velocity);\n\tthis._modulator._triggerEnvelopeAttack(time);\n\treturn this;\n};\n\n/**\n * trigger the release portion of the note\n *\n * @param {Time} [time=now] the time the note will release\n * @private\n * @returns {Tone.AMSynth} this\n */\nTone.AMSynth.prototype._triggerEnvelopeRelease = function(time){\n\tthis._carrier._triggerEnvelopeRelease(time);\n\tthis._modulator._triggerEnvelopeRelease(time);\n\treturn this;\n};\n\n/**\n * clean up\n * @returns {Tone.AMSynth} this\n */\nTone.AMSynth.prototype.dispose = function(){\n\tTone.Monophonic.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"harmonicity\", \"oscillator\", \"envelope\", \"modulation\", \"modulationEnvelope\", \"detune\"]);\n\tthis._carrier.dispose();\n\tthis._carrier = null;\n\tthis._modulator.dispose();\n\tthis._modulator = null;\n\tthis.frequency.dispose();\n\tthis.frequency = null;\n\tthis.detune.dispose();\n\tthis.detune = null;\n\tthis.harmonicity.dispose();\n\tthis.harmonicity = null;\n\tthis._modulationScale.dispose();\n\tthis._modulationScale = null;\n\tthis._modulationNode.dispose();\n\tthis._modulationNode = null;\n\tthis.oscillator = null;\n\tthis.envelope = null;\n\tthis.modulationEnvelope = null;\n\tthis.modulation = null;\n\treturn this;\n};\n\nexport default Tone.AMSynth;\n\n","import Tone from \"../core/Tone\";\nimport \"../event/Part\";\nimport \"../core/Transport\";\n\n/**\n * @class A sequence is an alternate notation of a part. Instead\n * of passing in an array of [time, event] pairs, pass\n * in an array of events which will be spaced at the\n * given subdivision. Sub-arrays will subdivide that beat\n * by the number of items are in the array.\n * Sequence notation inspiration from [Tidal](http://yaxu.org/tidal/)\n * @param {Function} callback The callback to invoke with every note\n * @param {Array} events The sequence\n * @param {Time} subdivision The subdivision between which events are placed.\n * @extends {Tone.Part}\n * @example\n * var seq = new Tone.Sequence(function(time, note){\n * \tconsole.log(note);\n * //straight quater notes\n * }, [\"C4\", \"E4\", \"G4\", \"A4\"], \"4n\");\n * @example\n * var seq = new Tone.Sequence(function(time, note){\n * \tconsole.log(note);\n * //subdivisions are given as subarrays\n * }, [\"C4\", [\"E4\", \"D4\", \"E4\"], \"G4\", [\"A4\", \"G4\"]]);\n */\nTone.Sequence = function(){\n\n\tvar options = Tone.defaults(arguments, [\"callback\", \"events\", \"subdivision\"], Tone.Sequence);\n\n\t//remove the events\n\tvar events = options.events;\n\tdelete options.events;\n\n\tTone.Part.call(this, options);\n\n\t/**\n\t * The subdivison of each note\n\t * @type {Ticks}\n\t * @private\n\t */\n\tthis._subdivision = this.toTicks(options.subdivision);\n\n\t//if no time was passed in, the loop end is the end of the cycle\n\tif (Tone.isUndef(options.loopEnd) && Tone.isDefined(events)){\n\t\tthis._loopEnd = (events.length * this._subdivision);\n\t}\n\t//defaults to looping\n\tthis._loop = true;\n\n\t//add all of the events\n\tif (Tone.isDefined(events)){\n\t\tfor (var i = 0; i < events.length; i++){\n\t\t\tthis.add(i, events[i]);\n\t\t}\n\t}\n};\n\nTone.extend(Tone.Sequence, Tone.Part);\n\n/**\n * The default values.\n * @type {Object}\n */\nTone.Sequence.defaults = {\n\t\"subdivision\" : \"4n\",\n};\n\n/**\n * The subdivision of the sequence. This can only be\n * set in the constructor. The subdivision is the\n * interval between successive steps.\n * @type {Time}\n * @memberOf Tone.Sequence#\n * @name subdivision\n * @readOnly\n */\nObject.defineProperty(Tone.Sequence.prototype, \"subdivision\", {\n\tget : function(){\n\t\treturn Tone.Ticks(this._subdivision).toSeconds();\n\t}\n});\n\n/**\n * Get/Set an index of the sequence. If the index contains a subarray,\n * a Tone.Sequence representing that sub-array will be returned.\n * @example\n * var sequence = new Tone.Sequence(playNote, [\"E4\", \"C4\", \"F#4\", [\"A4\", \"Bb3\"]])\n * sequence.at(0)// => returns \"E4\"\n * //set a value\n * sequence.at(0, \"G3\");\n * //get a nested sequence\n * sequence.at(3).at(1)// => returns \"Bb3\"\n * @param {Positive} index The index to get or set\n * @param {*} value Optionally pass in the value to set at the given index.\n */\nTone.Sequence.prototype.at = function(index, value){\n\t//if the value is an array,\n\tif (Tone.isArray(value)){\n\t\t//remove the current event at that index\n\t\tthis.remove(index);\n\t}\n\t//call the parent's method\n\treturn Tone.Part.prototype.at.call(this, this._indexTime(index), value);\n};\n\n/**\n * Add an event at an index, if there's already something\n * at that index, overwrite it. If `value` is an array,\n * it will be parsed as a subsequence.\n * @param {Number} index The index to add the event to\n * @param {*} value The value to add at that index\n * @returns {Tone.Sequence} this\n */\nTone.Sequence.prototype.add = function(index, value){\n\tif (value === null){\n\t\treturn this;\n\t}\n\tif (Tone.isArray(value)){\n\t\t//make a subsequence and add that to the sequence\n\t\tvar subSubdivision = Math.round(this._subdivision / value.length);\n\t\tvalue = new Tone.Sequence(this._tick.bind(this), value, Tone.Ticks(subSubdivision));\n\t}\n\tTone.Part.prototype.add.call(this, this._indexTime(index), value);\n\treturn this;\n};\n\n/**\n * Remove a value from the sequence by index\n * @param {Number} index The index of the event to remove\n * @returns {Tone.Sequence} this\n */\nTone.Sequence.prototype.remove = function(index, value){\n\tTone.Part.prototype.remove.call(this, this._indexTime(index), value);\n\treturn this;\n};\n\n/**\n * Get the time of the index given the Sequence's subdivision\n * @param {Number} index\n * @return {Time} The time of that index\n * @private\n */\nTone.Sequence.prototype._indexTime = function(index){\n\tif (index instanceof Tone.TransportTime){\n\t\treturn index;\n\t} else {\n\t\treturn Tone.Ticks(index * this._subdivision + this.startOffset).toSeconds();\n\t}\n};\n\n/**\n * Clean up.\n * @return {Tone.Sequence} this\n */\nTone.Sequence.prototype.dispose = function(){\n\tTone.Part.prototype.dispose.call(this);\n\treturn this;\n};\n\nexport default Tone.Sequence;\n\n","import Tone from \"../core/Tone\";\nimport \"../event/Loop\";\nimport \"../control/CtrlPattern\";\n\n/**\n * @class Tone.Pattern arpeggiates between the given notes\n * in a number of patterns. See Tone.CtrlPattern for\n * a full list of patterns.\n * @example\n * var pattern = new Tone.Pattern(function(time, note){\n * //the order of the notes passed in depends on the pattern\n * }, [\"C2\", \"D4\", \"E5\", \"A6\"], \"upDown\");\n * @extends {Tone.Loop}\n * @param {Function} callback The callback to invoke with the event.\n * @param {Array} values The values to arpeggiate over.\n */\nTone.Pattern = function(){\n\n\tvar options = Tone.defaults(arguments, [\"callback\", \"values\", \"pattern\"], Tone.Pattern);\n\tTone.Loop.call(this, options);\n\n\t/**\n\t * The pattern manager\n\t * @type {Tone.CtrlPattern}\n\t * @private\n\t */\n\tthis._pattern = new Tone.CtrlPattern({\n\t\t\"values\" : options.values, \n\t\t\"type\" : options.pattern,\n\t\t\"index\" : options.index\n\t});\n};\n\nTone.extend(Tone.Pattern, Tone.Loop);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.Pattern.defaults = {\n\t\"pattern\" : Tone.CtrlPattern.Type.Up,\n\t\"callback\" : Tone.noOp,\n\t\"values\" : [],\n};\n\n/**\n * Internal function called when the notes should be called\n * @param {Number} time The time the event occurs\n * @private\n */\nTone.Pattern.prototype._tick = function(time){\n\tthis.callback(time, this._pattern.value);\n\tthis._pattern.next();\n};\n\n/**\n * The current index in the values array.\n * @memberOf Tone.Pattern#\n * @type {Positive}\n * @name index\n */\nObject.defineProperty(Tone.Pattern.prototype, \"index\", {\n\tget : function(){\n\t\treturn this._pattern.index;\n\t},\n\tset : function(i){\n\t\tthis._pattern.index = i;\n\t}\n});\n\n/**\n * The array of events.\n * @memberOf Tone.Pattern#\n * @type {Array}\n * @name values\n */\nObject.defineProperty(Tone.Pattern.prototype, \"values\", {\n\tget : function(){\n\t\treturn this._pattern.values;\n\t},\n\tset : function(vals){\n\t\tthis._pattern.values = vals;\n\t}\n});\n\n/**\n * The current value of the pattern.\n * @memberOf Tone.Pattern#\n * @type {*}\n * @name value\n * @readOnly\n */\nObject.defineProperty(Tone.Pattern.prototype, \"value\", {\n\tget : function(){\n\t\treturn this._pattern.value;\n\t}\n});\n\n/**\n * The pattern type. See Tone.CtrlPattern for the full list of patterns.\n * @memberOf Tone.Pattern#\n * @type {String}\n * @name pattern\n */\nObject.defineProperty(Tone.Pattern.prototype, \"pattern\", {\n\tget : function(){\n\t\treturn this._pattern.type;\n\t},\n\tset : function(pattern){\n\t\tthis._pattern.type = pattern;\n\t}\n});\n\n/**\n * Clean up\n * @return {Tone.Pattern} this\n */\nTone.Pattern.prototype.dispose = function(){\n\tTone.Loop.prototype.dispose.call(this);\n\tthis._pattern.dispose();\n\tthis._pattern = null;\n};\n\nexport default Tone.Pattern;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../core/Delay\";\nimport \"../component/LFO\";\n\n/**\n * @class A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO\n * modulates the delayTime of the delay, causing the pitch to rise\n * and fall. \n * @extends {Tone.Effect}\n * @param {Frequency} frequency The frequency of the vibrato.\n * @param {NormalRange} depth The amount the pitch is modulated.\n */\nTone.Vibrato = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"depth\"], Tone.Vibrato);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * The delay node used for the vibrato effect\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._delayNode = new Tone.Delay(0, options.maxDelay);\n\n\t/**\n\t * The LFO used to control the vibrato\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfo = new Tone.LFO({\n\t\t\"type\" : options.type,\n\t\t\"min\" : 0,\n\t\t\"max\" : options.maxDelay, \n\t\t\"frequency\" : options.frequency,\n\t\t\"phase\" : -90 //offse the phase so the resting position is in the center\n\t}).start().connect(this._delayNode.delayTime);\n\n\t/**\n\t * The frequency of the vibrato\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._lfo.frequency;\n\n\t/**\n\t * The depth of the vibrato. \n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.depth = this._lfo.amplitude;\n\n\tthis.depth.value = options.depth;\n\tthis._readOnly([\"frequency\", \"depth\"]);\n\tthis.effectSend.chain(this._delayNode, this.effectReturn);\n};\n\nTone.extend(Tone.Vibrato, Tone.Effect);\n\n/**\n * The defaults\n * @type {Object}\n * @const\n */\nTone.Vibrato.defaults = {\n\t\"maxDelay\" : 0.005,\n\t\"frequency\" : 5,\n\t\"depth\" : 0.1,\n\t\"type\" : \"sine\"\n};\n\n/**\n * Type of oscillator attached to the Vibrato.\n * @memberOf Tone.Vibrato#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.Vibrato.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._lfo.type;\n\t},\n\tset : function(type){\n\t\tthis._lfo.type = type;\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.Vibrato} this\n */\nTone.Vibrato.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._delayNode.dispose();\n\tthis._delayNode = null;\n\tthis._lfo.dispose();\n\tthis._lfo = null;\n\tthis._writable([\"frequency\", \"depth\"]);\n\tthis.frequency = null;\n\tthis.depth = null;\n};\n\nexport default Tone.Vibrato;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/LFO\";\nimport \"../effect/StereoEffect\";\n\n/**\n * @class Tone.Tremolo modulates the amplitude of an incoming signal using a Tone.LFO.\n * The type, frequency, and depth of the LFO is controllable.\n *\n * @extends {Tone.StereoEffect}\n * @constructor\n * @param {Frequency} [frequency] The rate of the effect.\n * @param {NormalRange} [depth] The depth of the effect.\n * @example\n * //create a tremolo and start it's LFO\n * var tremolo = new Tone.Tremolo(9, 0.75).toMaster().start();\n * //route an oscillator through the tremolo and start it\n * var oscillator = new Tone.Oscillator().connect(tremolo).start();\n */\nTone.Tremolo = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"depth\"], Tone.Tremolo);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * The tremelo LFO in the left channel\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoL = new Tone.LFO({\n\t\t\"phase\" : options.spread,\n\t\t\"min\" : 1,\n\t\t\"max\" : 0,\n\t});\n\n\t/**\n\t * The tremelo LFO in the left channel\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoR = new Tone.LFO({\n\t\t\"phase\" : options.spread,\n\t\t\"min\" : 1,\n\t\t\"max\" : 0,\n\t});\n\n\t/**\n\t * Where the gain is multiplied\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._amplitudeL = new Tone.Gain();\n\n\t/**\n\t * Where the gain is multiplied\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._amplitudeR = new Tone.Gain();\n\n\t/**\n\t * The frequency of the tremolo.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = new Tone.Signal(options.frequency, Tone.Type.Frequency);\n\n\t/**\n\t * The depth of the effect. A depth of 0, has no effect\n\t * on the amplitude, and a depth of 1 makes the amplitude\n\t * modulate fully between 0 and 1.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.depth = new Tone.Signal(options.depth, Tone.Type.NormalRange);\n\n\tthis._readOnly([\"frequency\", \"depth\"]);\n\tthis.effectSendL.chain(this._amplitudeL, this.effectReturnL);\n\tthis.effectSendR.chain(this._amplitudeR, this.effectReturnR);\n\tthis._lfoL.connect(this._amplitudeL.gain);\n\tthis._lfoR.connect(this._amplitudeR.gain);\n\tthis.frequency.fan(this._lfoL.frequency, this._lfoR.frequency);\n\tthis.depth.fan(this._lfoR.amplitude, this._lfoL.amplitude);\n\tthis.type = options.type;\n\tthis.spread = options.spread;\n};\n\nTone.extend(Tone.Tremolo, Tone.StereoEffect);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.Tremolo.defaults = {\n\t\"frequency\" : 10,\n\t\"type\" : \"sine\",\n\t\"depth\" : 0.5,\n\t\"spread\" : 180,\n};\n\n/**\n * Start the tremolo.\n * @param {Time} [time=now] When the tremolo begins.\n * @returns {Tone.Tremolo} this\n */\nTone.Tremolo.prototype.start = function(time){\n\tthis._lfoL.start(time);\n\tthis._lfoR.start(time);\n\treturn this;\n};\n\n/**\n * Stop the tremolo.\n * @param {Time} [time=now] When the tremolo stops.\n * @returns {Tone.Tremolo} this\n */\nTone.Tremolo.prototype.stop = function(time){\n\tthis._lfoL.stop(time);\n\tthis._lfoR.stop(time);\n\treturn this;\n};\n\n/**\n * Sync the effect to the transport.\n * @param {Time} [delay=0] Delay time before starting the effect after the\n * Transport has started.\n * @returns {Tone.Tremolo} this\n */\nTone.Tremolo.prototype.sync = function(delay){\n\tthis._lfoL.sync(delay);\n\tthis._lfoR.sync(delay);\n\tTone.Transport.syncSignal(this.frequency);\n\treturn this;\n};\n\n/**\n * Unsync the filter from the transport\n * @returns {Tone.Tremolo} this\n */\nTone.Tremolo.prototype.unsync = function(){\n\tthis._lfoL.unsync();\n\tthis._lfoR.unsync();\n\tTone.Transport.unsyncSignal(this.frequency);\n\treturn this;\n};\n\n/**\n * The Tremolo's oscillator type.\n * @memberOf Tone.Tremolo#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.Tremolo.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._lfoL.type;\n\t},\n\tset : function(type){\n\t\tthis._lfoL.type = type;\n\t\tthis._lfoR.type = type;\n\t}\n});\n\n/**\n * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n * When set to 180, LFO's will be panned hard left and right respectively.\n * @memberOf Tone.Tremolo#\n * @type {Degrees}\n * @name spread\n */\nObject.defineProperty(Tone.Tremolo.prototype, \"spread\", {\n\tget : function(){\n\t\treturn this._lfoR.phase - this._lfoL.phase; //180\n\t},\n\tset : function(spread){\n\t\tthis._lfoL.phase = 90 - (spread/2);\n\t\tthis._lfoR.phase = (spread/2) + 90;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.Tremolo} this\n */\nTone.Tremolo.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"depth\"]);\n\tthis._lfoL.dispose();\n\tthis._lfoL = null;\n\tthis._lfoR.dispose();\n\tthis._lfoR = null;\n\tthis._amplitudeL.dispose();\n\tthis._amplitudeL = null;\n\tthis._amplitudeR.dispose();\n\tthis._amplitudeR = null;\n\tthis.frequency = null;\n\tthis.depth = null;\n\treturn this;\n};\n\nexport default Tone.Tremolo;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/MidSideEffect\";\nimport \"../signal/Signal\";\nimport \"../signal/Multiply\";\nimport \"../signal/Subtract\";\n\n/**\n * @class Applies a width factor to the mid/side seperation.\n * 0 is all mid and 1 is all side.\n * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).\n *
\n * \n * Mid *= 2*(1-width)
\n * Side *= 2*width\n *
\n *\n * @extends {Tone.MidSideEffect}\n * @constructor\n * @param {NormalRange|Object} [width] The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.\n */\nTone.StereoWidener = function(){\n\n\tvar options = Tone.defaults(arguments, [\"width\"], Tone.StereoWidener);\n\tTone.MidSideEffect.call(this, options);\n\n\t/**\n\t * The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.width = new Tone.Signal(options.width, Tone.Type.NormalRange);\n\tthis._readOnly([\"width\"]);\n\n\t/**\n\t * Two times the (1-width) for the mid channel\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._twoTimesWidthMid = new Tone.Multiply(2);\n\n\t/**\n\t * Two times the width for the side channel\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._twoTimesWidthSide = new Tone.Multiply(2);\n\n\t/**\n\t * Mid multiplier\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._midMult = new Tone.Multiply();\n\tthis._twoTimesWidthMid.connect(this._midMult, 0, 1);\n\tthis.midSend.chain(this._midMult, this.midReturn);\n\n\t/**\n\t * 1 - width\n\t * @type {Tone.Subtract}\n\t * @private\n\t */\n\tthis._oneMinusWidth = new Tone.Subtract();\n\tthis._oneMinusWidth.connect(this._twoTimesWidthMid);\n\tTone.connect(this.context.getConstant(1), this._oneMinusWidth, 0, 0);\n\tthis.width.connect(this._oneMinusWidth, 0, 1);\n\n\t/**\n\t * Side multiplier\n\t * @type {Tone.Multiply}\n\t * @private\n\t */\n\tthis._sideMult = new Tone.Multiply();\n\tthis.width.connect(this._twoTimesWidthSide);\n\tthis._twoTimesWidthSide.connect(this._sideMult, 0, 1);\n\tthis.sideSend.chain(this._sideMult, this.sideReturn);\n};\n\nTone.extend(Tone.StereoWidener, Tone.MidSideEffect);\n\n/**\n * the default values\n * @static\n * @type {Object}\n */\nTone.StereoWidener.defaults = {\n\t\"width\" : 0.5\n};\n\n/**\n * Clean up.\n * @returns {Tone.StereoWidener} this\n */\nTone.StereoWidener.prototype.dispose = function(){\n\tTone.MidSideEffect.prototype.dispose.call(this);\n\tthis._writable([\"width\"]);\n\tthis.width.dispose();\n\tthis.width = null;\n\tthis._midMult.dispose();\n\tthis._midMult = null;\n\tthis._sideMult.dispose();\n\tthis._sideMult = null;\n\tthis._twoTimesWidthMid.dispose();\n\tthis._twoTimesWidthMid = null;\n\tthis._twoTimesWidthSide.dispose();\n\tthis._twoTimesWidthSide = null;\n\tthis._oneMinusWidth.dispose();\n\tthis._oneMinusWidth = null;\n\treturn this;\n};\n\nexport default Tone.StereoWidener;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/StereoEffect\";\nimport \"../effect/FeedbackEffect\";\nimport \"../core/Gain\";\n\n/**\n * @class Base class for stereo feedback effects where the effectReturn\n * is fed back into the same channel.\n *\n *\t@constructor\n *\t@extends {Tone.StereoEffect}\n */\nTone.StereoFeedbackEffect = function(){\n\n\tvar options = Tone.defaults(arguments, [\"feedback\"], Tone.FeedbackEffect);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * controls the amount of feedback\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.feedback = new Tone.Signal(options.feedback, Tone.Type.NormalRange);\n\n\t/**\n\t * the left side feeback\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._feedbackL = new Tone.Gain();\n\n\t/**\n\t * the right side feeback\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._feedbackR = new Tone.Gain();\n\n\t//connect it up\n\tthis.effectReturnL.chain(this._feedbackL, this.effectSendL);\n\tthis.effectReturnR.chain(this._feedbackR, this.effectSendR);\n\tthis.feedback.fan(this._feedbackL.gain, this._feedbackR.gain);\n\tthis._readOnly([\"feedback\"]);\n};\n\nTone.extend(Tone.StereoFeedbackEffect, Tone.StereoEffect);\n\n/**\n * clean up\n * @returns {Tone.StereoFeedbackEffect} this\n */\nTone.StereoFeedbackEffect.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tthis._writable([\"feedback\"]);\n\tthis.feedback.dispose();\n\tthis.feedback = null;\n\tthis._feedbackL.dispose();\n\tthis._feedbackL = null;\n\tthis._feedbackR.dispose();\n\tthis._feedbackR = null;\n\treturn this;\n};\n\nexport default Tone.StereoFeedbackEffect;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Offline\";\nimport \"../component/Filter\";\nimport \"../component/Merge\";\nimport \"../source/Noise\";\nimport \"../core/Gain\";\nimport \"../effect/Convolver\";\n\n/**\n * @class Simple convolution created with decaying noise.\n * \t\tGenerates an Impulse Response Buffer\n * \t\t\twith Tone.Offline then feeds the IR into ConvolverNode.\n * \t\t\tNote: the Reverb will not make any sound until [generate](#generate)\n * \t\t\thas been invoked and resolved.\n *\n * \t\t\tInspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).\n * \t\t\tCopyright (c) 2014 Alan deLespinasse Apache 2.0 License.\n *\n * @extends {Tone.Convolver}\n * @param {Time=} decay The amount of time it will reverberate for.\n */\nTone.Reverb = function(){\n\n\tvar options = Tone.defaults(arguments, [\"decay\"], Tone.Reverb);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * Convolver node\n\t * @type {ConvolverNode}\n\t * @private\n\t */\n\tthis._convolver = this.context.createConvolver();\n\n\t/**\n\t * The duration of the reverb\n\t * @type {Time}\n\t */\n\tthis.decay = options.decay;\n\n\t/**\n\t * The amount of time before the reverb is fully\n\t * ramped in.\n\t * @type {Time}\n\t */\n\tthis.preDelay = options.preDelay;\n\n\tthis.connectEffect(this._convolver);\n};\n\nTone.extend(Tone.Reverb, Tone.Effect);\n\n/**\n * The defaults\n * @type {Object}\n * @static\n */\nTone.Reverb.defaults = {\n\t\"decay\" : 1.5,\n\t\"preDelay\" : 0.01,\n};\n\n/**\n * Generate the Impulse Response. Returns a promise while the IR is being\n * generated.\n * @return {Promise} Promise which returns this object.\n */\nTone.Reverb.prototype.generate = function(){\n\treturn Tone.Offline(function(){\n\t\t//create a noise burst which decays over the duration\n\t\tvar noiseL = new Tone.Noise();\n\t\tvar noiseR = new Tone.Noise();\n\t\tvar merge = new Tone.Merge();\n\t\tnoiseL.connect(merge.left);\n\t\tnoiseR.connect(merge.right);\n\t\tvar gainNode = new Tone.Gain().toMaster();\n\t\tmerge.connect(gainNode);\n\t\tnoiseL.start(0);\n\t\tnoiseR.start(0);\n\t\t//predelay\n\t\tgainNode.gain.setValueAtTime(0, 0);\n\t\tgainNode.gain.setValueAtTime(1, this.preDelay);\n\t\t//decay\n\t\tgainNode.gain.exponentialApproachValueAtTime(0, this.preDelay, this.decay + this.preDelay);\n\t}.bind(this), this.decay + this.preDelay).then(function(buffer){\n\t\tthis._convolver.buffer = buffer.get();\n\t\treturn this;\n\t}.bind(this));\n};\n\n/**\n * Clean up.\n * @return {Tone.Reverb} this\n */\nTone.Reverb.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._convolver.disconnect();\n\tthis._convolver = null;\n\treturn this;\n};\n\nexport default Tone.Reverb;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/LFO\";\nimport \"../component/CrossFade\";\nimport \"../signal/Signal\";\nimport \"../effect/FeedbackEffect\";\nimport \"../core/Delay\";\n\n/**\n * @class Tone.PitchShift does near-realtime pitch shifting to the incoming signal.\n * The effect is achieved by speeding up or slowing down the delayTime\n * of a DelayNode using a sawtooth wave.\n * Algorithm found in [this pdf](http://dsp-book.narod.ru/soundproc.pdf).\n * Additional reference by [Miller Pucket](http://msp.ucsd.edu/techniques/v0.11/book-html/node115.html).\n *\n * @extends {Tone.FeedbackEffect}\n * @param {Interval=} pitch The interval to transpose the incoming signal by.\n */\nTone.PitchShift = function(){\n\n\tvar options = Tone.defaults(arguments, [\"pitch\"], Tone.PitchShift);\n\tTone.FeedbackEffect.call(this, options);\n\n\t/**\n\t * The pitch signal\n\t * @type {Tone.Signal}\n\t * @private\n\t */\n\tthis._frequency = new Tone.Signal(0);\n\n\t/**\n\t * Uses two DelayNodes to cover up the jump in\n\t * the sawtooth wave.\n\t * @type {DelayNode}\n\t * @private\n\t */\n\tthis._delayA = new Tone.Delay(0, 1);\n\n\t/**\n\t * The first LFO.\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoA = new Tone.LFO({\n\t\t\"min\" : 0,\n\t\t\"max\" : 0.1,\n\t\t\"type\" : \"sawtooth\"\n\t}).connect(this._delayA.delayTime);\n\n\t/**\n\t * The second DelayNode\n\t * @type {DelayNode}\n\t * @private\n\t */\n\tthis._delayB = new Tone.Delay(0, 1);\n\n\t/**\n\t * The first LFO.\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoB = new Tone.LFO({\n\t\t\"min\" : 0,\n\t\t\"max\" : 0.1,\n\t\t\"type\" : \"sawtooth\",\n\t\t\"phase\" : 180\n\t}).connect(this._delayB.delayTime);\n\n\t/**\n\t * Crossfade quickly between the two delay lines\n\t * to cover up the jump in the sawtooth wave\n\t * @type {Tone.CrossFade}\n\t * @private\n\t */\n\tthis._crossFade = new Tone.CrossFade();\n\n\t/**\n\t * LFO which alternates between the two\n\t * delay lines to cover up the disparity in the\n\t * sawtooth wave.\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._crossFadeLFO = new Tone.LFO({\n\t\t\"min\" : 0,\n\t\t\"max\" : 1,\n\t\t\"type\" : \"triangle\",\n\t\t\"phase\" : 90\n\t}).connect(this._crossFade.fade);\n\n\t/**\n\t * The delay node\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._feedbackDelay = new Tone.Delay(options.delayTime);\n\n\t/**\n\t * The amount of delay on the input signal\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.delayTime = this._feedbackDelay.delayTime;\n\tthis._readOnly(\"delayTime\");\n\n\t/**\n\t * Hold the current pitch\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._pitch = options.pitch;\n\n\t/**\n\t * Hold the current windowSize\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._windowSize = options.windowSize;\n\n\t//connect the two delay lines up\n\tthis._delayA.connect(this._crossFade.a);\n\tthis._delayB.connect(this._crossFade.b);\n\t//connect the frequency\n\tthis._frequency.fan(this._lfoA.frequency, this._lfoB.frequency, this._crossFadeLFO.frequency);\n\t//route the input\n\tthis.effectSend.fan(this._delayA, this._delayB);\n\tthis._crossFade.chain(this._feedbackDelay, this.effectReturn);\n\t//start the LFOs at the same time\n\tvar now = this.now();\n\tthis._lfoA.start(now);\n\tthis._lfoB.start(now);\n\tthis._crossFadeLFO.start(now);\n\t//set the initial value\n\tthis.windowSize = this._windowSize;\n};\n\nTone.extend(Tone.PitchShift, Tone.FeedbackEffect);\n\n/**\n * default values\n * @static\n * @type {Object}\n * @const\n */\nTone.PitchShift.defaults = {\n\t\"pitch\" : 0,\n\t\"windowSize\" : 0.1,\n\t\"delayTime\" : 0,\n\t\"feedback\" : 0\n};\n\n/**\n * Repitch the incoming signal by some interval (measured\n * in semi-tones).\n * @memberOf Tone.PitchShift#\n * @type {Interval}\n * @name pitch\n * @example\n * pitchShift.pitch = -12; //down one octave\n * pitchShift.pitch = 7; //up a fifth\n */\nObject.defineProperty(Tone.PitchShift.prototype, \"pitch\", {\n\tget : function(){\n\t\treturn this._pitch;\n\t},\n\tset : function(interval){\n\t\tthis._pitch = interval;\n\t\tvar factor = 0;\n\t\tif (interval < 0){\n\t\t\tthis._lfoA.min = 0;\n\t\t\tthis._lfoA.max = this._windowSize;\n\t\t\tthis._lfoB.min = 0;\n\t\t\tthis._lfoB.max = this._windowSize;\n\t\t\tfactor = Tone.intervalToFrequencyRatio(interval - 1) + 1;\n\t\t} else {\n\t\t\tthis._lfoA.min = this._windowSize;\n\t\t\tthis._lfoA.max = 0;\n\t\t\tthis._lfoB.min = this._windowSize;\n\t\t\tthis._lfoB.max = 0;\n\t\t\tfactor = Tone.intervalToFrequencyRatio(interval) - 1;\n\t\t}\n\t\tthis._frequency.value = factor * (1.2 / this._windowSize);\n\t}\n});\n\n/**\n * The window size corresponds roughly to the sample length in a looping sampler.\n * Smaller values are desirable for a less noticeable delay time of the pitch shifted\n * signal, but larger values will result in smoother pitch shifting for larger intervals.\n * A nominal range of 0.03 to 0.1 is recommended.\n * @memberOf Tone.PitchShift#\n * @type {Time}\n * @name windowSize\n * @example\n * pitchShift.windowSize = 0.1;\n */\nObject.defineProperty(Tone.PitchShift.prototype, \"windowSize\", {\n\tget : function(){\n\t\treturn this._windowSize;\n\t},\n\tset : function(size){\n\t\tthis._windowSize = this.toSeconds(size);\n\t\tthis.pitch = this._pitch;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.PitchShift} this\n */\nTone.PitchShift.prototype.dispose = function(){\n\tTone.FeedbackEffect.prototype.dispose.call(this);\n\tthis._frequency.dispose();\n\tthis._frequency = null;\n\tthis._delayA.disconnect();\n\tthis._delayA = null;\n\tthis._delayB.disconnect();\n\tthis._delayB = null;\n\tthis._lfoA.dispose();\n\tthis._lfoA = null;\n\tthis._lfoB.dispose();\n\tthis._lfoB = null;\n\tthis._crossFade.dispose();\n\tthis._crossFade = null;\n\tthis._crossFadeLFO.dispose();\n\tthis._crossFadeLFO = null;\n\tthis._writable(\"delayTime\");\n\tthis._feedbackDelay.dispose();\n\tthis._feedbackDelay = null;\n\tthis.delayTime = null;\n\treturn this;\n};\n\nexport default Tone.PitchShift;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/StereoXFeedbackEffect\";\nimport \"../signal/Signal\";\nimport \"../core/Delay\";\n\n/**\n * @class Tone.PingPongDelay is a feedback delay effect where the echo is heard\n * first in one channel and next in the opposite channel. In a stereo\n * system these are the right and left channels.\n * PingPongDelay in more simplified terms is two Tone.FeedbackDelays\n * with independent delay values. Each delay is routed to one channel\n * (left or right), and the channel triggered second will always\n * trigger at the same interval after the first.\n *\n * \t@constructor\n * \t@extends {Tone.StereoXFeedbackEffect}\n * @param {Time|Object} [delayTime] The delayTime between consecutive echos.\n * @param {NormalRange=} feedback The amount of the effected signal which\n * is fed back through the delay.\n * @example\n * var pingPong = new Tone.PingPongDelay(\"4n\", 0.2).toMaster();\n * var drum = new Tone.MembraneSynth().connect(pingPong);\n * drum.triggerAttackRelease(\"C4\", \"32n\");\n */\nTone.PingPongDelay = function(){\n\n\tvar options = Tone.defaults(arguments, [\"delayTime\", \"feedback\"], Tone.PingPongDelay);\n\tTone.StereoXFeedbackEffect.call(this, options);\n\n\t/**\n\t * the delay node on the left side\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._leftDelay = new Tone.Delay(0, options.maxDelayTime);\n\n\t/**\n\t * the delay node on the right side\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._rightDelay = new Tone.Delay(0, options.maxDelayTime);\n\n\t/**\n\t * the predelay on the right side\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._rightPreDelay = new Tone.Delay(0, options.maxDelayTime);\n\n\t/**\n\t * the delay time signal\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.delayTime = new Tone.Signal(options.delayTime, Tone.Type.Time);\n\n\t//connect it up\n\tthis.effectSendL.chain(this._leftDelay, this.effectReturnL);\n\tthis.effectSendR.chain(this._rightPreDelay, this._rightDelay, this.effectReturnR);\n\tthis.delayTime.fan(this._leftDelay.delayTime, this._rightDelay.delayTime, this._rightPreDelay.delayTime);\n\t//rearranged the feedback to be after the rightPreDelay\n\tthis._feedbackLR.disconnect();\n\tthis._feedbackLR.connect(this._rightDelay);\n\tthis._readOnly([\"delayTime\"]);\n};\n\nTone.extend(Tone.PingPongDelay, Tone.StereoXFeedbackEffect);\n\n/**\n * @static\n * @type {Object}\n */\nTone.PingPongDelay.defaults = {\n\t\"delayTime\" : 0.25,\n\t\"maxDelayTime\" : 1\n};\n\n/**\n * Clean up.\n * @returns {Tone.PingPongDelay} this\n */\nTone.PingPongDelay.prototype.dispose = function(){\n\tTone.StereoXFeedbackEffect.prototype.dispose.call(this);\n\tthis._leftDelay.dispose();\n\tthis._leftDelay = null;\n\tthis._rightDelay.dispose();\n\tthis._rightDelay = null;\n\tthis._rightPreDelay.dispose();\n\tthis._rightPreDelay = null;\n\tthis._writable([\"delayTime\"]);\n\tthis.delayTime.dispose();\n\tthis.delayTime = null;\n\treturn this;\n};\n\nexport default Tone.PingPongDelay;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/LFO\";\nimport \"../component/Filter\";\nimport \"../effect/StereoEffect\";\n\n/**\n * @class Tone.Phaser is a phaser effect. Phasers work by changing the phase\n * of different frequency components of an incoming signal. Read more on\n * [Wikipedia](https://en.wikipedia.org/wiki/Phaser_(effect)).\n * Inspiration for this phaser comes from [Tuna.js](https://github.com/Dinahmoe/tuna/).\n *\n *\t@extends {Tone.StereoEffect}\n *\t@constructor\n *\t@param {Frequency|Object} [frequency] The speed of the phasing.\n *\t@param {number} [octaves] The octaves of the effect.\n *\t@param {Frequency} [baseFrequency] The base frequency of the filters.\n *\t@example\n * var phaser = new Tone.Phaser({\n * \t\"frequency\" : 15,\n * \t\"octaves\" : 5,\n * \t\"baseFrequency\" : 1000\n * }).toMaster();\n * var synth = new Tone.FMSynth().connect(phaser);\n * synth.triggerAttackRelease(\"E3\", \"2n\");\n */\nTone.Phaser = function(){\n\n\t//set the defaults\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"octaves\", \"baseFrequency\"], Tone.Phaser);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * the lfo which controls the frequency on the left side\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoL = new Tone.LFO(options.frequency, 0, 1);\n\n\t/**\n\t * the lfo which controls the frequency on the right side\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoR = new Tone.LFO(options.frequency, 0, 1);\n\tthis._lfoR.phase = 180;\n\n\t/**\n\t * the base modulation frequency\n\t * @type {number}\n\t * @private\n\t */\n\tthis._baseFrequency = options.baseFrequency;\n\n\t/**\n\t * the octaves of the phasing\n\t * @type {number}\n\t * @private\n\t */\n\tthis._octaves = options.octaves;\n\n\t/**\n\t * The quality factor of the filters\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis.Q = new Tone.Signal(options.Q, Tone.Type.Positive);\n\n\t/**\n\t * the array of filters for the left side\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._filtersL = this._makeFilters(options.stages, this._lfoL, this.Q);\n\n\t/**\n\t * the array of filters for the left side\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._filtersR = this._makeFilters(options.stages, this._lfoR, this.Q);\n\n\t/**\n\t * the frequency of the effect\n\t * @type {Tone.Signal}\n\t */\n\tthis.frequency = this._lfoL.frequency;\n\tthis.frequency.value = options.frequency;\n\n\t//connect them up\n\tthis.effectSendL.connect(this._filtersL[0]);\n\tthis.effectSendR.connect(this._filtersR[0]);\n\tTone.connect(this._filtersL[options.stages - 1], this.effectReturnL);\n\tTone.connect(this._filtersR[options.stages - 1], this.effectReturnR);\n\t//control the frequency with one LFO\n\tthis._lfoL.frequency.connect(this._lfoR.frequency);\n\t//set the options\n\tthis.baseFrequency = options.baseFrequency;\n\tthis.octaves = options.octaves;\n\t//start the lfo\n\tthis._lfoL.start();\n\tthis._lfoR.start();\n\tthis._readOnly([\"frequency\", \"Q\"]);\n};\n\nTone.extend(Tone.Phaser, Tone.StereoEffect);\n\n/**\n * defaults\n * @static\n * @type {object}\n */\nTone.Phaser.defaults = {\n\t\"frequency\" : 0.5,\n\t\"octaves\" : 3,\n\t\"stages\" : 10,\n\t\"Q\" : 10,\n\t\"baseFrequency\" : 350,\n};\n\n/**\n * @param {number} stages\n * @returns {Array} the number of filters all connected together\n * @private\n */\nTone.Phaser.prototype._makeFilters = function(stages, connectToFreq, Q){\n\tvar filters = new Array(stages);\n\t//make all the filters\n\tfor (var i = 0; i < stages; i++){\n\t\tvar filter = this.context.createBiquadFilter();\n\t\tfilter.type = \"allpass\";\n\t\tQ.connect(filter.Q);\n\t\tconnectToFreq.connect(filter.frequency);\n\t\tfilters[i] = filter;\n\t}\n\tTone.connectSeries.apply(Tone, filters);\n\treturn filters;\n};\n\n/**\n * The number of octaves the phase goes above\n * the baseFrequency\n * @memberOf Tone.Phaser#\n * @type {Positive}\n * @name octaves\n */\nObject.defineProperty(Tone.Phaser.prototype, \"octaves\", {\n\tget : function(){\n\t\treturn this._octaves;\n\t},\n\tset : function(octaves){\n\t\tthis._octaves = octaves;\n\t\tvar max = this._baseFrequency * Math.pow(2, octaves);\n\t\tthis._lfoL.max = max;\n\t\tthis._lfoR.max = max;\n\t}\n});\n\n/**\n * The the base frequency of the filters.\n * @memberOf Tone.Phaser#\n * @type {number}\n * @name baseFrequency\n */\nObject.defineProperty(Tone.Phaser.prototype, \"baseFrequency\", {\n\tget : function(){\n\t\treturn this._baseFrequency;\n\t},\n\tset : function(freq){\n\t\tthis._baseFrequency = freq;\n\t\tthis._lfoL.min = freq;\n\t\tthis._lfoR.min = freq;\n\t\tthis.octaves = this._octaves;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.Phaser} this\n */\nTone.Phaser.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tthis._writable([\"frequency\", \"Q\"]);\n\tthis.Q.dispose();\n\tthis.Q = null;\n\tthis._lfoL.dispose();\n\tthis._lfoL = null;\n\tthis._lfoR.dispose();\n\tthis._lfoR = null;\n\tfor (var i = 0; i < this._filtersL.length; i++){\n\t\tthis._filtersL[i].disconnect();\n\t\tthis._filtersL[i] = null;\n\t}\n\tthis._filtersL = null;\n\tfor (var j = 0; j < this._filtersR.length; j++){\n\t\tthis._filtersR[j].disconnect();\n\t\tthis._filtersR[j] = null;\n\t}\n\tthis._filtersR = null;\n\tthis.frequency = null;\n\treturn this;\n};\n\nexport default Tone.Phaser;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/FeedbackCombFilter\";\nimport \"../effect/StereoEffect\";\nimport \"../signal/Scale\";\n\n/**\n * an array of the comb filter delay time values\n * @private\n * @static\n * @type {Array}\n */\nvar combFilterDelayTimes = [1687 / 25000, 1601 / 25000, 2053 / 25000, 2251 / 25000];\n\n/**\n * the resonances of each of the comb filters\n * @private\n * @static\n * @type {Array}\n */\nvar combFilterResonances = [0.773, 0.802, 0.753, 0.733];\n\n/**\n * the allpass filter frequencies\n * @private\n * @static\n * @type {Array}\n */\nvar allpassFilterFreqs = [347, 113, 37];\n\n/**\n * @class Tone.JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)\n * tuned by John Chowning in 1970.\n * It is made up of three allpass filters and four Tone.FeedbackCombFilter.\n *\n *\n * @extends {Tone.Effect}\n * @constructor\n * @param {NormalRange|Object} [roomSize] Coorelates to the decay time.\n * @example\n * var reverb = new Tone.JCReverb(0.4).connect(Tone.Master);\n * var delay = new Tone.FeedbackDelay(0.5);\n * //connecting the synth to reverb through delay\n * var synth = new Tone.DuoSynth().chain(delay, reverb);\n * synth.triggerAttackRelease(\"A4\",\"8n\");\n */\nTone.JCReverb = function(){\n\n\tvar options = Tone.defaults(arguments, [\"roomSize\"], Tone.JCReverb);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * room size control values between [0,1]\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\n\t/**\n\t * scale the room size\n\t * @type {Tone.Scale}\n\t * @private\n\t */\n\tthis._scaleRoomSize = new Tone.Scale(-0.733, 0.197);\n\n\t/**\n\t * a series of allpass filters\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._allpassFilters = [];\n\n\t/**\n\t * parallel feedback comb filters\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._feedbackCombFilters = [];\n\n\t//make the allpass filters\n\tfor (var af = 0; af < allpassFilterFreqs.length; af++){\n\t\tvar allpass = this.context.createBiquadFilter();\n\t\tallpass.type = \"allpass\";\n\t\tallpass.frequency.value = allpassFilterFreqs[af];\n\t\tthis._allpassFilters.push(allpass);\n\t}\n\n\t//and the comb filters\n\tfor (var cf = 0; cf < combFilterDelayTimes.length; cf++){\n\t\tvar fbcf = new Tone.FeedbackCombFilter(combFilterDelayTimes[cf], 0.1);\n\t\tthis._scaleRoomSize.connect(fbcf.resonance);\n\t\tfbcf.resonance.value = combFilterResonances[cf];\n\t\tTone.connect(this._allpassFilters[this._allpassFilters.length - 1], fbcf);\n\t\tif (cf < combFilterDelayTimes.length / 2){\n\t\t\tfbcf.connect(this.effectReturnL);\n\t\t} else {\n\t\t\tfbcf.connect(this.effectReturnR);\n\t\t}\n\t\tthis._feedbackCombFilters.push(fbcf);\n\t}\n\n\t//chain the allpass filters together\n\tthis.roomSize.connect(this._scaleRoomSize);\n\tTone.connectSeries.apply(Tone, this._allpassFilters);\n\tthis.effectSendL.connect(this._allpassFilters[0]);\n\tthis.effectSendR.connect(this._allpassFilters[0]);\n\tthis._readOnly([\"roomSize\"]);\n};\n\nTone.extend(Tone.JCReverb, Tone.StereoEffect);\n\n/**\n * the default values\n * @static\n * @const\n * @type {Object}\n */\nTone.JCReverb.defaults = {\n\t\"roomSize\" : 0.5\n};\n\n/**\n * Clean up.\n * @returns {Tone.JCReverb} this\n */\nTone.JCReverb.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tfor (var apf = 0; apf < this._allpassFilters.length; apf++){\n\t\tthis._allpassFilters[apf].disconnect();\n\t\tthis._allpassFilters[apf] = null;\n\t}\n\tthis._allpassFilters = null;\n\tfor (var fbcf = 0; fbcf < this._feedbackCombFilters.length; fbcf++){\n\t\tthis._feedbackCombFilters[fbcf].dispose();\n\t\tthis._feedbackCombFilters[fbcf] = null;\n\t}\n\tthis._feedbackCombFilters = null;\n\tthis._writable([\"roomSize\"]);\n\tthis.roomSize.dispose();\n\tthis.roomSize = null;\n\tthis._scaleRoomSize.dispose();\n\tthis._scaleRoomSize = null;\n\treturn this;\n};\n\nexport default Tone.JCReverb;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/LowpassCombFilter\";\nimport \"../effect/StereoEffect\";\nimport \"../signal/Signal\";\nimport \"../component/Split\";\nimport \"../component/Merge\";\nimport \"../signal/ScaleExp\";\n\n/**\n * an array of comb filter delay values from Freeverb implementation\n * @static\n * @private\n * @type {Array}\n */\nvar combFilterTunings = [1557 / 44100, 1617 / 44100, 1491 / 44100, 1422 / 44100, 1277 / 44100, 1356 / 44100, 1188 / 44100, 1116 / 44100];\n\n/**\n * an array of allpass filter frequency values from Freeverb implementation\n * @private\n * @static\n * @type {Array}\n */\nvar allpassFilterFrequencies = [225, 556, 441, 341];\n\n/**\n * @class Tone.Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).\n * Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).\n *\n * @extends {Tone.Effect}\n * @constructor\n * @param {NormalRange|Object} [roomSize] Correlated to the decay time.\n * @param {Frequency} [dampening] The cutoff frequency of a lowpass filter as part\n * of the reverb.\n * @example\n * var freeverb = new Tone.Freeverb().toMaster();\n * freeverb.dampening.value = 1000;\n * //routing synth through the reverb\n * var synth = new Tone.AMSynth().connect(freeverb);\n */\nTone.Freeverb = function(){\n\n\tvar options = Tone.defaults(arguments, [\"roomSize\", \"dampening\"], Tone.Freeverb);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * The roomSize value between. A larger roomSize\n\t * will result in a longer decay.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.roomSize = new Tone.Signal(options.roomSize, Tone.Type.NormalRange);\n\n\t/**\n\t * The amount of dampening of the reverberant signal.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.dampening = new Tone.Signal(options.dampening, Tone.Type.Frequency);\n\n\t/**\n\t * the comb filters\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._combFilters = [];\n\n\t/**\n\t * the allpass filters on the left\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._allpassFiltersL = [];\n\n\t/**\n\t * the allpass filters on the right\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._allpassFiltersR = [];\n\n\t//make the allpass filters on the right\n\tfor (var l = 0; l < allpassFilterFrequencies.length; l++){\n\t\tvar allpassL = this.context.createBiquadFilter();\n\t\tallpassL.type = \"allpass\";\n\t\tallpassL.frequency.value = allpassFilterFrequencies[l];\n\t\tthis._allpassFiltersL.push(allpassL);\n\t}\n\n\t//make the allpass filters on the left\n\tfor (var r = 0; r < allpassFilterFrequencies.length; r++){\n\t\tvar allpassR = this.context.createBiquadFilter();\n\t\tallpassR.type = \"allpass\";\n\t\tallpassR.frequency.value = allpassFilterFrequencies[r];\n\t\tthis._allpassFiltersR.push(allpassR);\n\t}\n\n\t//make the comb filters\n\tfor (var c = 0; c < combFilterTunings.length; c++){\n\t\tvar lfpf = new Tone.LowpassCombFilter(combFilterTunings[c]);\n\t\tif (c < combFilterTunings.length / 2){\n\t\t\tthis.effectSendL.chain(lfpf, this._allpassFiltersL[0]);\n\t\t} else {\n\t\t\tthis.effectSendR.chain(lfpf, this._allpassFiltersR[0]);\n\t\t}\n\t\tthis.roomSize.connect(lfpf.resonance);\n\t\tthis.dampening.connect(lfpf.dampening);\n\t\tthis._combFilters.push(lfpf);\n\t}\n\n\t//chain the allpass filters togetehr\n\tTone.connectSeries.apply(Tone, this._allpassFiltersL);\n\tTone.connectSeries.apply(Tone, this._allpassFiltersR);\n\tTone.connect(this._allpassFiltersL[this._allpassFiltersL.length - 1], this.effectReturnL);\n\tTone.connect(this._allpassFiltersR[this._allpassFiltersR.length - 1], this.effectReturnR);\n\tthis._readOnly([\"roomSize\", \"dampening\"]);\n};\n\nTone.extend(Tone.Freeverb, Tone.StereoEffect);\n\n/**\n * @static\n * @type {Object}\n */\nTone.Freeverb.defaults = {\n\t\"roomSize\" : 0.7,\n\t\"dampening\" : 3000\n};\n\n/**\n * Clean up.\n * @returns {Tone.Freeverb} this\n */\nTone.Freeverb.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tfor (var al = 0; al < this._allpassFiltersL.length; al++){\n\t\tthis._allpassFiltersL[al].disconnect();\n\t\tthis._allpassFiltersL[al] = null;\n\t}\n\tthis._allpassFiltersL = null;\n\tfor (var ar = 0; ar < this._allpassFiltersR.length; ar++){\n\t\tthis._allpassFiltersR[ar].disconnect();\n\t\tthis._allpassFiltersR[ar] = null;\n\t}\n\tthis._allpassFiltersR = null;\n\tfor (var cf = 0; cf < this._combFilters.length; cf++){\n\t\tthis._combFilters[cf].dispose();\n\t\tthis._combFilters[cf] = null;\n\t}\n\tthis._combFilters = null;\n\tthis._writable([\"roomSize\", \"dampening\"]);\n\tthis.roomSize.dispose();\n\tthis.roomSize = null;\n\tthis.dampening.dispose();\n\tthis.dampening = null;\n\treturn this;\n};\n\nexport default Tone.Freeverb;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/FeedbackEffect\";\nimport \"../signal/Signal\";\nimport \"../core/Delay\";\n\n/**\n * @class Tone.FeedbackDelay is a DelayNode in which part of output\n * signal is fed back into the delay.\n *\n * @constructor\n * @extends {Tone.FeedbackEffect}\n * @param {Time|Object} [delayTime] The delay applied to the incoming signal.\n * @param {NormalRange=} feedback The amount of the effected signal which\n * is fed back through the delay.\n * @example\n * var feedbackDelay = new Tone.FeedbackDelay(\"8n\", 0.5).toMaster();\n * var tom = new Tone.MembraneSynth({\n * \t\"octaves\" : 4,\n * \t\"pitchDecay\" : 0.1\n * }).connect(feedbackDelay);\n * tom.triggerAttackRelease(\"A2\",\"32n\");\n */\nTone.FeedbackDelay = function(){\n\n\tvar options = Tone.defaults(arguments, [\"delayTime\", \"feedback\"], Tone.FeedbackDelay);\n\tTone.FeedbackEffect.call(this, options);\n\n\t/**\n\t * the delay node\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._delayNode = new Tone.Delay(options.delayTime, options.maxDelay);\n\n\t/**\n\t * The delayTime of the DelayNode.\n\t * @type {Time}\n\t * @signal\n\t */\n\tthis.delayTime = this._delayNode.delayTime;\n\n\t// connect it up\n\tthis.connectEffect(this._delayNode);\n\tthis._readOnly([\"delayTime\"]);\n};\n\nTone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);\n\n/**\n * The default values.\n * @const\n * @static\n * @type {Object}\n */\nTone.FeedbackDelay.defaults = {\n\t\"delayTime\" : 0.25,\n\t\"maxDelay\" : 1\n};\n\n/**\n * clean up\n * @returns {Tone.FeedbackDelay} this\n */\nTone.FeedbackDelay.prototype.dispose = function(){\n\tTone.FeedbackEffect.prototype.dispose.call(this);\n\tthis._delayNode.dispose();\n\tthis._delayNode = null;\n\tthis._writable([\"delayTime\"]);\n\tthis.delayTime = null;\n\treturn this;\n};\n\nexport default Tone.FeedbackDelay;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../signal/WaveShaper\";\n\n/**\n * @class Tone.Distortion is a simple distortion effect using Tone.WaveShaper.\n * Algorithm from [a stackoverflow answer](http://stackoverflow.com/a/22313408).\n *\n * @extends {Tone.Effect}\n * @constructor\n * @param {Number|Object} [distortion] The amount of distortion (nominal range of 0-1)\n * @example\n * var dist = new Tone.Distortion(0.8).toMaster();\n * var fm = new Tone.SimpleFM().connect(dist);\n * //this sounds good on bass notes\n * fm.triggerAttackRelease(\"A1\", \"8n\");\n */\nTone.Distortion = function(){\n\n\tvar options = Tone.defaults(arguments, [\"distortion\"], Tone.Distortion);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * @type {Tone.WaveShaper}\n\t * @private\n\t */\n\tthis._shaper = new Tone.WaveShaper(4096);\n\n\t/**\n\t * holds the distortion amount\n\t * @type {number}\n\t * @private\n\t */\n\tthis._distortion = options.distortion;\n\n\tthis.connectEffect(this._shaper);\n\tthis.distortion = options.distortion;\n\tthis.oversample = options.oversample;\n};\n\nTone.extend(Tone.Distortion, Tone.Effect);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.Distortion.defaults = {\n\t\"distortion\" : 0.4,\n\t\"oversample\" : \"none\"\n};\n\n/**\n * The amount of distortion.\n * @memberOf Tone.Distortion#\n * @type {NormalRange}\n * @name distortion\n */\nObject.defineProperty(Tone.Distortion.prototype, \"distortion\", {\n\tget : function(){\n\t\treturn this._distortion;\n\t},\n\tset : function(amount){\n\t\tthis._distortion = amount;\n\t\tvar k = amount * 100;\n\t\tvar deg = Math.PI / 180;\n\t\tthis._shaper.setMap(function(x){\n\t\t\tif (Math.abs(x) < 0.001){\n\t\t\t\t//should output 0 when input is 0\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn (3 + k) * x * 20 * deg / (Math.PI + k * Math.abs(x));\n\t\t\t}\n\t\t});\n\t} \n});\n\n/**\n * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n * @memberOf Tone.Distortion#\n * @type {string}\n * @name oversample\n */\nObject.defineProperty(Tone.Distortion.prototype, \"oversample\", {\n\tget : function(){\n\t\treturn this._shaper.oversample;\n\t},\n\tset : function(oversampling){\n\t\tthis._shaper.oversample = oversampling;\n\t} \n});\n\n/**\n * Clean up. \n * @returns {Tone.Distortion} this\n */\nTone.Distortion.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._shaper.dispose();\n\tthis._shaper = null;\n\treturn this;\n};\n\nexport default Tone.Distortion;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/LFO\";\nimport \"../effect/StereoEffect\";\nimport \"../core/Delay\";\n\n/**\n * @class Tone.Chorus is a stereo chorus effect composed of\n * a left and right delay with a Tone.LFO applied to the delayTime of each channel.\n * Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).\n * Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).\n *\n *\t@constructor\n *\t@extends {Tone.StereoEffect}\n *\t@param {Frequency|Object} [frequency] The frequency of the LFO.\n *\t@param {Milliseconds} [delayTime] The delay of the chorus effect in ms.\n *\t@param {NormalRange} [depth] The depth of the chorus.\n *\t@example\n * var chorus = new Tone.Chorus(4, 2.5, 0.5);\n * var synth = new Tone.PolySynth(4, Tone.MonoSynth).connect(chorus);\n * synth.triggerAttackRelease([\"C3\",\"E3\",\"G3\"], \"8n\");\n */\nTone.Chorus = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"delayTime\", \"depth\"], Tone.Chorus);\n\tTone.StereoEffect.call(this, options);\n\n\t/**\n\t * the depth of the chorus\n\t * @type {number}\n\t * @private\n\t */\n\tthis._depth = options.depth;\n\n\t/**\n\t * the delayTime\n\t * @type {number}\n\t * @private\n\t */\n\tthis._delayTime = options.delayTime / 1000;\n\n\t/**\n\t * the lfo which controls the delayTime\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoL = new Tone.LFO({\n\t\t\"frequency\" : options.frequency,\n\t\t\"min\" : 0,\n\t\t\"max\" : 1,\n\t});\n\n\t/**\n\t * another LFO for the right side with a 180 degree phase diff\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfoR = new Tone.LFO({\n\t\t\"frequency\" : options.frequency,\n\t\t\"min\" : 0,\n\t\t\"max\" : 1,\n\t\t\"phase\" : 180\n\t});\n\n\t/**\n\t * delay for left\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._delayNodeL = new Tone.Delay();\n\n\t/**\n\t * delay for right\n\t * @type {Tone.Delay}\n\t * @private\n\t */\n\tthis._delayNodeR = new Tone.Delay();\n\n\t/**\n\t * The frequency of the LFO which modulates the delayTime.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._lfoL.frequency;\n\n\t//connections\n\tthis.effectSendL.chain(this._delayNodeL, this.effectReturnL);\n\tthis.effectSendR.chain(this._delayNodeR, this.effectReturnR);\n\t//and pass through to make the detune apparent\n\tthis.effectSendL.connect(this.effectReturnL);\n\tthis.effectSendR.connect(this.effectReturnR);\n\t//lfo setup\n\tthis._lfoL.connect(this._delayNodeL.delayTime);\n\tthis._lfoR.connect(this._delayNodeR.delayTime);\n\t//start the lfo\n\tthis._lfoL.start();\n\tthis._lfoR.start();\n\t//have one LFO frequency control the other\n\tthis._lfoL.frequency.connect(this._lfoR.frequency);\n\t//set the initial values\n\tthis.depth = this._depth;\n\tthis.frequency.value = options.frequency;\n\tthis.type = options.type;\n\tthis._readOnly([\"frequency\"]);\n\tthis.spread = options.spread;\n};\n\nTone.extend(Tone.Chorus, Tone.StereoEffect);\n\n/**\n * @static\n * @type {Object}\n */\nTone.Chorus.defaults = {\n\t\"frequency\" : 1.5,\n\t\"delayTime\" : 3.5,\n\t\"depth\" : 0.7,\n\t\"type\" : \"sine\",\n\t\"spread\" : 180\n};\n\n/**\n * The depth of the effect. A depth of 1 makes the delayTime\n * modulate between 0 and 2*delayTime (centered around the delayTime).\n * @memberOf Tone.Chorus#\n * @type {NormalRange}\n * @name depth\n */\nObject.defineProperty(Tone.Chorus.prototype, \"depth\", {\n\tget : function(){\n\t\treturn this._depth;\n\t},\n\tset : function(depth){\n\t\tthis._depth = depth;\n\t\tvar deviation = this._delayTime * depth;\n\t\tthis._lfoL.min = Math.max(this._delayTime - deviation, 0);\n\t\tthis._lfoL.max = this._delayTime + deviation;\n\t\tthis._lfoR.min = Math.max(this._delayTime - deviation, 0);\n\t\tthis._lfoR.max = this._delayTime + deviation;\n\t}\n});\n\n/**\n * The delayTime in milliseconds of the chorus. A larger delayTime\n * will give a more pronounced effect. Nominal range a delayTime\n * is between 2 and 20ms.\n * @memberOf Tone.Chorus#\n * @type {Milliseconds}\n * @name delayTime\n */\nObject.defineProperty(Tone.Chorus.prototype, \"delayTime\", {\n\tget : function(){\n\t\treturn this._delayTime * 1000;\n\t},\n\tset : function(delayTime){\n\t\tthis._delayTime = delayTime / 1000;\n\t\tthis.depth = this._depth;\n\t}\n});\n\n/**\n * The oscillator type of the LFO.\n * @memberOf Tone.Chorus#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.Chorus.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._lfoL.type;\n\t},\n\tset : function(type){\n\t\tthis._lfoL.type = type;\n\t\tthis._lfoR.type = type;\n\t}\n});\n\n/**\n * Amount of stereo spread. When set to 0, both LFO's will be panned centrally.\n * When set to 180, LFO's will be panned hard left and right respectively.\n * @memberOf Tone.Chorus#\n * @type {Degrees}\n * @name spread\n */\nObject.defineProperty(Tone.Chorus.prototype, \"spread\", {\n\tget : function(){\n\t\treturn this._lfoR.phase - this._lfoL.phase;\n\t},\n\tset : function(spread){\n\t\tthis._lfoL.phase = 90 - (spread/2);\n\t\tthis._lfoR.phase = (spread/2) + 90;\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.Chorus} this\n */\nTone.Chorus.prototype.dispose = function(){\n\tTone.StereoEffect.prototype.dispose.call(this);\n\tthis._lfoL.dispose();\n\tthis._lfoL = null;\n\tthis._lfoR.dispose();\n\tthis._lfoR = null;\n\tthis._delayNodeL.dispose();\n\tthis._delayNodeL = null;\n\tthis._delayNodeR.dispose();\n\tthis._delayNodeR = null;\n\tthis._writable(\"frequency\");\n\tthis.frequency = null;\n\treturn this;\n};\n\nexport default Tone.Chorus;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../signal/WaveShaper\";\n\n/**\n * @class Tone.ChebyShev is a Chebyshev waveshaper, an effect which is good \n * for making different types of distortion sounds.\n * Note that odd orders sound very different from even ones, \n * and order = 1 is no change. \n * Read more at [music.columbia.edu](http://music.columbia.edu/cmc/musicandcomputers/chapter4/04_06.php).\n *\n * @extends {Tone.Effect}\n * @constructor\n * @param {Positive|Object} [order] The order of the chebyshev polynomial. Normal range between 1-100. \n * @example\n * //create a new cheby\n * var cheby = new Tone.Chebyshev(50);\n * //create a monosynth connected to our cheby\n * synth = new Tone.MonoSynth().connect(cheby);\n */\nTone.Chebyshev = function(){\n\n\tvar options = Tone.defaults(arguments, [\"order\"], Tone.Chebyshev);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * @type {WaveShaperNode}\n\t * @private\n\t */\n\tthis._shaper = new Tone.WaveShaper(4096);\n\n\t/**\n\t * holds onto the order of the filter\n\t * @type {number}\n\t * @private\n\t */\n\tthis._order = options.order;\n\n\tthis.connectEffect(this._shaper);\n\tthis.order = options.order;\n\tthis.oversample = options.oversample;\n};\n\nTone.extend(Tone.Chebyshev, Tone.Effect);\n\n/**\n * @static\n * @const\n * @type {Object}\n */\nTone.Chebyshev.defaults = {\n\t\"order\" : 1,\n\t\"oversample\" : \"none\"\n};\n\n/**\n * get the coefficient for that degree\n * @param {number} x the x value\n * @param {number} degree \n * @param {Object} memo memoize the computed value. \n * this speeds up computation greatly. \n * @return {number} the coefficient \n * @private\n */\nTone.Chebyshev.prototype._getCoefficient = function(x, degree, memo){\n\tif (memo.hasOwnProperty(degree)){\n\t\treturn memo[degree];\n\t} else if (degree === 0){\n\t\tmemo[degree] = 0;\n\t} else if (degree === 1){\n\t\tmemo[degree] = x;\n\t} else {\n\t\tmemo[degree] = 2 * x * this._getCoefficient(x, degree - 1, memo) - this._getCoefficient(x, degree - 2, memo);\n\t}\n\treturn memo[degree];\n};\n\n/**\n * The order of the Chebyshev polynomial which creates\n * the equation which is applied to the incoming \n * signal through a Tone.WaveShaper. The equations\n * are in the form:
\n * order 2: 2x^2 + 1
\n * order 3: 4x^3 + 3x
\n * @memberOf Tone.Chebyshev#\n * @type {Positive}\n * @name order\n */\nObject.defineProperty(Tone.Chebyshev.prototype, \"order\", {\n\tget : function(){\n\t\treturn this._order;\n\t},\n\tset : function(order){\n\t\tthis._order = order;\n\t\tvar curve = new Array(4096);\n\t\tvar len = curve.length;\n\t\tfor (var i = 0; i < len; ++i){\n\t\t\tvar x = i * 2 / len - 1;\n\t\t\tif (x === 0){\n\t\t\t\t//should output 0 when input is 0\n\t\t\t\tcurve[i] = 0;\n\t\t\t} else {\n\t\t\t\tcurve[i] = this._getCoefficient(x, order, {});\n\t\t\t}\n\t\t}\n\t\tthis._shaper.curve = curve;\n\t} \n});\n\n/**\n * The oversampling of the effect. Can either be \"none\", \"2x\" or \"4x\".\n * @memberOf Tone.Chebyshev#\n * @type {string}\n * @name oversample\n */\nObject.defineProperty(Tone.Chebyshev.prototype, \"oversample\", {\n\tget : function(){\n\t\treturn this._shaper.oversample;\n\t},\n\tset : function(oversampling){\n\t\tthis._shaper.oversample = oversampling;\n\t} \n});\n\n/**\n * Clean up. \n * @returns {Tone.Chebyshev} this\n */\nTone.Chebyshev.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._shaper.dispose();\n\tthis._shaper = null;\n\treturn this;\n};\n\nexport default Tone.Chebyshev;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../signal/Subtract\";\nimport \"../signal/Modulo\";\n\n/**\n * @class Tone.Bitcrusher downsamples the incoming signal to a different bitdepth.\n * Lowering the bitdepth of the signal creates distortion. Read more about Bitcrushing\n * on [Wikipedia](https://en.wikipedia.org/wiki/Bitcrusher).\n *\n * @constructor\n * @extends {Tone.Effect}\n * @param {Number} bits The number of bits to downsample the signal. Nominal range\n * of 1 to 8.\n * @example\n * //initialize crusher and route a synth through it\n * var crusher = new Tone.BitCrusher(4).toMaster();\n * var synth = new Tone.MonoSynth().connect(crusher);\n */\nTone.BitCrusher = function(){\n\n\tvar options = Tone.defaults(arguments, [\"bits\"], Tone.BitCrusher);\n\tTone.Effect.call(this, options);\n\n\tvar invStepSize = 1 / Math.pow(2, options.bits - 1);\n\n\t/**\n\t * Subtract the input signal and the modulus of the input signal\n\t * @type {Tone.Subtract}\n\t * @private\n\t */\n\tthis._subtract = new Tone.Subtract();\n\n\t/**\n\t * The mod function\n\t * @type {Tone.Modulo}\n\t * @private\n\t */\n\tthis._modulo = new Tone.Modulo(invStepSize);\n\n\t/**\n\t * keeps track of the bits\n\t * @type {number}\n\t * @private\n\t */\n\tthis._bits = options.bits;\n\n\t//connect it up\n\tthis.effectSend.fan(this._subtract, this._modulo);\n\tthis._modulo.connect(this._subtract, 0, 1);\n\tthis._subtract.connect(this.effectReturn);\n};\n\nTone.extend(Tone.BitCrusher, Tone.Effect);\n\n/**\n * the default values\n * @static\n * @type {Object}\n */\nTone.BitCrusher.defaults = {\n\t\"bits\" : 4\n};\n\n/**\n * The bit depth of the effect. Nominal range of 1-8.\n * @memberOf Tone.BitCrusher#\n * @type {number}\n * @name bits\n */\nObject.defineProperty(Tone.BitCrusher.prototype, \"bits\", {\n\tget : function(){\n\t\treturn this._bits;\n\t},\n\tset : function(bits){\n\t\tthis._bits = bits;\n\t\tvar invStepSize = 1 / Math.pow(2, bits - 1);\n\t\tthis._modulo.value = invStepSize;\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.BitCrusher} this\n */\nTone.BitCrusher.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._subtract.dispose();\n\tthis._subtract = null;\n\tthis._modulo.dispose();\n\tthis._modulo = null;\n\treturn this;\n};\n\nexport default Tone.BitCrusher;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Follower\";\nimport \"../signal/ScaleExp\";\nimport \"../effect/Effect\";\nimport \"../component/Filter\";\n\n/**\n * @class Tone.AutoWah connects a Tone.Follower to a bandpass filter (Tone.Filter).\n * The frequency of the filter is adjusted proportionally to the\n * incoming signal's amplitude. Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna).\n *\n * @constructor\n * @extends {Tone.Effect}\n * @param {Frequency|Object} [baseFrequency] The frequency the filter is set\n * to at the low point of the wah\n * @param {Positive} [octaves] The number of octaves above the baseFrequency\n * the filter will sweep to when fully open\n * @param {Decibels} [sensitivity] The decibel threshold sensitivity for\n * the incoming signal. Normal range of -40 to 0.\n * @example\n * var autoWah = new Tone.AutoWah(50, 6, -30).toMaster();\n * //initialize the synth and connect to autowah\n * var synth = new Synth.connect(autoWah);\n * //Q value influences the effect of the wah - default is 2\n * autoWah.Q.value = 6;\n * //more audible on higher notes\n * synth.triggerAttackRelease(\"C4\", \"8n\")\n */\nTone.AutoWah = function(){\n\n\tvar options = Tone.defaults(arguments, [\"baseFrequency\", \"octaves\", \"sensitivity\"], Tone.AutoWah);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * The envelope follower. Set the attack/release\n\t * timing to adjust how the envelope is followed.\n\t * @type {Tone.Follower}\n\t * @private\n\t */\n\tthis.follower = new Tone.Follower(options.follower);\n\n\t/**\n\t * scales the follower value to the frequency domain\n\t * @type {Tone}\n\t * @private\n\t */\n\tthis._sweepRange = new Tone.ScaleExp(0, 1, 0.5);\n\n\t/**\n\t * @type {number}\n\t * @private\n\t */\n\tthis._baseFrequency = options.baseFrequency;\n\n\t/**\n\t * @type {number}\n\t * @private\n\t */\n\tthis._octaves = options.octaves;\n\n\t/**\n\t * the input gain to adjust the sensitivity\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._inputBoost = new Tone.Gain();\n\n\t/**\n\t * @type {BiquadFilterNode}\n\t * @private\n\t */\n\tthis._bandpass = new Tone.Filter({\n\t\t\"rolloff\" : -48,\n\t\t\"frequency\" : 0,\n\t\t\"Q\" : options.Q,\n\t});\n\n\t/**\n\t * @type {Tone.Filter}\n\t * @private\n\t */\n\tthis._peaking = new Tone.Filter(0, \"peaking\");\n\tthis._peaking.gain.value = options.gain;\n\n\t/**\n\t * The gain of the filter.\n\t * @type {Number}\n\t * @signal\n\t */\n\tthis.gain = this._peaking.gain;\n\n\t/**\n\t * The quality of the filter.\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis.Q = this._bandpass.Q;\n\n\t//the control signal path\n\tthis.effectSend.chain(this._inputBoost, this.follower, this._sweepRange);\n\tthis._sweepRange.connect(this._bandpass.frequency);\n\tthis._sweepRange.connect(this._peaking.frequency);\n\t//the filtered path\n\tthis.effectSend.chain(this._bandpass, this._peaking, this.effectReturn);\n\t//set the initial value\n\tthis._setSweepRange();\n\tthis.sensitivity = options.sensitivity;\n\n\tthis._readOnly([\"gain\", \"Q\"]);\n};\n\nTone.extend(Tone.AutoWah, Tone.Effect);\n\n/**\n * @static\n * @type {Object}\n */\nTone.AutoWah.defaults = {\n\t\"baseFrequency\" : 100,\n\t\"octaves\" : 6,\n\t\"sensitivity\" : 0,\n\t\"Q\" : 2,\n\t\"gain\" : 2,\n\t\"follower\" : {\n\t\t\"attack\" : 0.3,\n\t\t\"release\" : 0.5\n\t}\n};\n\n/**\n * The number of octaves that the filter will sweep above the\n * baseFrequency.\n * @memberOf Tone.AutoWah#\n * @type {Number}\n * @name octaves\n */\nObject.defineProperty(Tone.AutoWah.prototype, \"octaves\", {\n\tget : function(){\n\t\treturn this._octaves;\n\t},\n\tset : function(octaves){\n\t\tthis._octaves = octaves;\n\t\tthis._setSweepRange();\n\t}\n});\n\n/**\n * The base frequency from which the sweep will start from.\n * @memberOf Tone.AutoWah#\n * @type {Frequency}\n * @name baseFrequency\n */\nObject.defineProperty(Tone.AutoWah.prototype, \"baseFrequency\", {\n\tget : function(){\n\t\treturn this._baseFrequency;\n\t},\n\tset : function(baseFreq){\n\t\tthis._baseFrequency = baseFreq;\n\t\tthis._setSweepRange();\n\t}\n});\n\n/**\n * The sensitivity to control how responsive to the input signal the filter is.\n * @memberOf Tone.AutoWah#\n * @type {Decibels}\n * @name sensitivity\n */\nObject.defineProperty(Tone.AutoWah.prototype, \"sensitivity\", {\n\tget : function(){\n\t\treturn Tone.gainToDb(1 / this._inputBoost.gain.value);\n\t},\n\tset : function(sensitivy){\n\t\tthis._inputBoost.gain.value = 1 / Tone.dbToGain(sensitivy);\n\t}\n});\n\n/**\n * sets the sweep range of the scaler\n * @private\n */\nTone.AutoWah.prototype._setSweepRange = function(){\n\tthis._sweepRange.min = this._baseFrequency;\n\tthis._sweepRange.max = Math.min(this._baseFrequency * Math.pow(2, this._octaves), this.context.sampleRate / 2);\n};\n\n/**\n * Clean up.\n * @returns {Tone.AutoWah} this\n */\nTone.AutoWah.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis.follower.dispose();\n\tthis.follower = null;\n\tthis._sweepRange.dispose();\n\tthis._sweepRange = null;\n\tthis._bandpass.dispose();\n\tthis._bandpass = null;\n\tthis._peaking.dispose();\n\tthis._peaking = null;\n\tthis._inputBoost.dispose();\n\tthis._inputBoost = null;\n\tthis._writable([\"gain\", \"Q\"]);\n\tthis.gain = null;\n\tthis.Q = null;\n\treturn this;\n};\n\nexport default Tone.AutoWah;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../component/LFO\";\nimport \"../component/Panner\";\n\n/**\n * @class Tone.AutoPanner is a Tone.Panner with an LFO connected to the pan amount. \n * More on using autopanners [here](https://www.ableton.com/en/blog/autopan-chopper-effect-and-more-liveschool/).\n *\n * @constructor\n * @extends {Tone.Effect}\n * @param {Frequency|Object} [frequency] Rate of left-right oscillation. \n * @example\n * //create an autopanner and start it's LFO\n * var autoPanner = new Tone.AutoPanner(\"4n\").toMaster().start();\n * //route an oscillator through the panner and start it\n * var oscillator = new Tone.Oscillator().connect(autoPanner).start();\n */\nTone.AutoPanner = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\"], Tone.AutoPanner);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * the lfo which drives the panning\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfo = new Tone.LFO({\n\t\t\"frequency\" : options.frequency,\n\t\t\"amplitude\" : options.depth,\n\t\t\"min\" : -1,\n\t\t\"max\" : 1,\n\t});\n\n\t/**\n\t * The amount of panning between left and right. \n\t * 0 = always center. 1 = full range between left and right. \n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.depth = this._lfo.amplitude;\n\n\t/**\n\t * the panner node which does the panning\n\t * @type {Tone.Panner}\n\t * @private\n\t */\n\tthis._panner = new Tone.Panner();\n\n\t/**\n\t * How fast the panner modulates between left and right. \n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._lfo.frequency;\n\n\t//connections\n\tthis.connectEffect(this._panner);\n\tthis._lfo.connect(this._panner.pan);\n\tthis.type = options.type;\n\tthis._readOnly([\"depth\", \"frequency\"]);\n};\n\n//extend Effect\nTone.extend(Tone.AutoPanner, Tone.Effect);\n\n/**\n * defaults\n * @static\n * @type {Object}\n */\nTone.AutoPanner.defaults = {\n\t\"frequency\" : 1,\n\t\"type\" : \"sine\",\n\t\"depth\" : 1\n};\n\n/**\n * Start the effect.\n * @param {Time} [time=now] When the LFO will start. \n * @returns {Tone.AutoPanner} this\n */\nTone.AutoPanner.prototype.start = function(time){\n\tthis._lfo.start(time);\n\treturn this;\n};\n\n/**\n * Stop the effect.\n * @param {Time} [time=now] When the LFO will stop. \n * @returns {Tone.AutoPanner} this\n */\nTone.AutoPanner.prototype.stop = function(time){\n\tthis._lfo.stop(time);\n\treturn this;\n};\n\n/**\n * Sync the panner to the transport.\n * @param {Time} [delay=0] Delay time before starting the effect after the\n * Transport has started. \n * @returns {Tone.AutoPanner} this\n */\nTone.AutoPanner.prototype.sync = function(delay){\n\tthis._lfo.sync(delay);\n\treturn this;\n};\n\n/**\n * Unsync the panner from the transport\n * @returns {Tone.AutoPanner} this\n */\nTone.AutoPanner.prototype.unsync = function(){\n\tthis._lfo.unsync();\n\treturn this;\n};\n\n/**\n * Type of oscillator attached to the AutoFilter. \n * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n * @memberOf Tone.AutoFilter#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.AutoPanner.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._lfo.type;\n\t},\n\tset : function(type){\n\t\tthis._lfo.type = type;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.AutoPanner} this\n */\nTone.AutoPanner.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._lfo.dispose();\n\tthis._lfo = null;\n\tthis._panner.dispose();\n\tthis._panner = null;\n\tthis._writable([\"depth\", \"frequency\"]);\n\tthis.frequency = null;\n\tthis.depth = null;\n\treturn this;\n};\n\nexport default Tone.AutoPanner;\n\n","import Tone from \"../core/Tone\";\nimport \"../effect/Effect\";\nimport \"../component/LFO\";\nimport \"../component/Filter\";\n\n/**\n * @class Tone.AutoFilter is a Tone.Filter with a Tone.LFO connected to the filter cutoff frequency.\n * Setting the LFO rate and depth allows for control over the filter modulation rate \n * and depth.\n *\n * @constructor\n * @extends {Tone.Effect}\n * @param {Time|Object} [frequency] The rate of the LFO.\n * @param {Frequency=} baseFrequency The lower value of the LFOs oscillation\n \t * @param {Frequency=} octaves The number of octaves above the baseFrequency\n * @example\n * //create an autofilter and start it's LFO\n * var autoFilter = new Tone.AutoFilter(\"4n\").toMaster().start();\n * //route an oscillator through the filter and start it\n * var oscillator = new Tone.Oscillator().connect(autoFilter).start();\n */\nTone.AutoFilter = function(){\n\n\tvar options = Tone.defaults(arguments, [\"frequency\", \"baseFrequency\", \"octaves\"], Tone.AutoFilter);\n\tTone.Effect.call(this, options);\n\n\t/**\n\t * the lfo which drives the filter cutoff\n\t * @type {Tone.LFO}\n\t * @private\n\t */\n\tthis._lfo = new Tone.LFO({\n\t\t\"frequency\" : options.frequency,\n\t\t\"amplitude\" : options.depth,\n\t});\n\n\t/**\n\t * The range of the filter modulating between the min and max frequency. \n\t * 0 = no modulation. 1 = full modulation.\n\t * @type {NormalRange}\n\t * @signal\n\t */\n\tthis.depth = this._lfo.amplitude;\n\n\t/**\n\t * How fast the filter modulates between min and max. \n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.frequency = this._lfo.frequency;\n\n\t/**\n\t * The filter node\n\t * @type {Tone.Filter}\n\t */\n\tthis.filter = new Tone.Filter(options.filter);\n\n\t/**\n\t * The octaves placeholder\n\t * @type {Positive}\n\t * @private\n\t */\n\tthis._octaves = 0;\n\n\t//connections\n\tthis.connectEffect(this.filter);\n\tthis._lfo.connect(this.filter.frequency);\n\tthis.type = options.type;\n\tthis._readOnly([\"frequency\", \"depth\"]);\n\tthis.octaves = options.octaves;\n\tthis.baseFrequency = options.baseFrequency;\n};\n\n//extend Effect\nTone.extend(Tone.AutoFilter, Tone.Effect);\n\n/**\n * defaults\n * @static\n * @type {Object}\n */\nTone.AutoFilter.defaults = {\n\t\"frequency\" : 1,\n\t\"type\" : \"sine\",\n\t\"depth\" : 1,\n\t\"baseFrequency\" : 200,\n\t\"octaves\" : 2.6,\n\t\"filter\" : {\n\t\t\"type\" : \"lowpass\",\n\t\t\"rolloff\" : -12,\n\t\t\"Q\" : 1,\n\t}\n};\n\n/**\n * Start the effect.\n * @param {Time} [time=now] When the LFO will start. \n * @returns {Tone.AutoFilter} this\n */\nTone.AutoFilter.prototype.start = function(time){\n\tthis._lfo.start(time);\n\treturn this;\n};\n\n/**\n * Stop the effect.\n * @param {Time} [time=now] When the LFO will stop. \n * @returns {Tone.AutoFilter} this\n */\nTone.AutoFilter.prototype.stop = function(time){\n\tthis._lfo.stop(time);\n\treturn this;\n};\n\n/**\n * Sync the filter to the transport.\n * @param {Time} [delay=0] Delay time before starting the effect after the\n * Transport has started. \n * @returns {Tone.AutoFilter} this\n */\nTone.AutoFilter.prototype.sync = function(delay){\n\tthis._lfo.sync(delay);\n\treturn this;\n};\n\n/**\n * Unsync the filter from the transport.\n * @returns {Tone.AutoFilter} this\n */\nTone.AutoFilter.prototype.unsync = function(){\n\tthis._lfo.unsync();\n\treturn this;\n};\n\n/**\n * Type of oscillator attached to the AutoFilter. \n * Possible values: \"sine\", \"square\", \"triangle\", \"sawtooth\".\n * @memberOf Tone.AutoFilter#\n * @type {string}\n * @name type\n */\nObject.defineProperty(Tone.AutoFilter.prototype, \"type\", {\n\tget : function(){\n\t\treturn this._lfo.type;\n\t},\n\tset : function(type){\n\t\tthis._lfo.type = type;\n\t}\n});\n\n/**\n * The minimum value of the filter's cutoff frequency.\n * @memberOf Tone.AutoFilter#\n * @type {Frequency}\n * @name baseFrequency\n */\nObject.defineProperty(Tone.AutoFilter.prototype, \"baseFrequency\", {\n\tget : function(){\n\t\treturn this._lfo.min;\n\t},\n\tset : function(freq){\n\t\tthis._lfo.min = this.toFrequency(freq);\n\t\t//and set the max\n\t\tthis.octaves = this._octaves;\n\t}\n});\n\n/**\n * The maximum value of the filter's cutoff frequency. \n * @memberOf Tone.AutoFilter#\n * @type {Positive}\n * @name octaves\n */\nObject.defineProperty(Tone.AutoFilter.prototype, \"octaves\", {\n\tget : function(){\n\t\treturn this._octaves;\n\t},\n\tset : function(oct){\n\t\tthis._octaves = oct;\n\t\tthis._lfo.max = this.baseFrequency * Math.pow(2, oct);\n\t}\n});\n\n/**\n * Clean up. \n * @returns {Tone.AutoFilter} this\n */\nTone.AutoFilter.prototype.dispose = function(){\n\tTone.Effect.prototype.dispose.call(this);\n\tthis._lfo.dispose();\n\tthis._lfo = null;\n\tthis.filter.dispose();\n\tthis.filter = null;\n\tthis._writable([\"frequency\", \"depth\"]);\n\tthis.frequency = null;\n\tthis.depth = null;\n\treturn this;\n};\n\nexport default Tone.AutoFilter;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/CrossFade\";\nimport \"../component/Merge\";\nimport \"../component/Split\";\nimport \"../signal/Signal\";\nimport \"../signal/AudioToGain\";\nimport \"../signal/Zero\";\n\n/**\n * @class Both Tone.Panner3D and Tone.Listener have a position in 3D space\n * using a right-handed cartesian coordinate system.\n * The units used in the coordinate system are not defined;\n * these coordinates are independent/invariant of any particular\n * units such as meters or feet. Tone.Panner3D objects have an forward\n * vector representing the direction the sound is projecting. Additionally,\n * they have a sound cone representing how directional the sound is.\n * For example, the sound could be omnidirectional, in which case it would\n * be heard anywhere regardless of its forward, or it can be more directional\n * and heard only if it is facing the listener. Tone.Listener objects\n * (representing a person's ears) have an forward and up vector\n * representing in which direction the person is facing. Because both the\n * source stream and the listener can be moving, they both have a velocity\n * vector representing both the speed and direction of movement. Taken together,\n * these two velocities can be used to generate a doppler shift effect which changes the pitch.\n *
\n * Note: the position of the Listener will have no effect on nodes not connected to a Tone.Panner3D\n *\n * @constructor\n * @extends {Tone}\n * @singleton\n */\nTone.Listener = function(){\n\n\tTone.call(this);\n\n\t/**\n\t * Holds the current forward orientation\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._orientation = [0, 0, 0, 0, 0, 0];\n\n\t/**\n\t * Holds the current position\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._position = [0, 0, 0];\n\n\tTone.getContext(function(){\n\t\t// set the default position/forward\n\t\tthis.set(ListenerConstructor.defaults);\n\n\t\t//listener is a singleton so it adds itself to the context\n\t\t// this.context.listener = this;\n\t}.bind(this));\n\n};\n\nTone.extend(Tone.Listener);\n\n/**\n * Defaults according to the specification\n * @static\n * @const\n * @type {Object}\n */\nTone.Listener.defaults = {\n\t\"positionX\" : 0,\n\t\"positionY\" : 0,\n\t\"positionZ\" : 0,\n\t\"forwardX\" : 0,\n\t\"forwardY\" : 0,\n\t\"forwardZ\" : 1,\n\t\"upX\" : 0,\n\t\"upY\" : 1,\n\t\"upZ\" : 0\n};\n\n/**\n * Is an instanceof Tone.Listener\n * @type {Boolean}\n */\nTone.Listener.prototype.isListener = true;\n\n/**\n * The ramp time which is applied to the setTargetAtTime\n * @type {Number}\n * @private\n */\nTone.Listener.prototype._rampTimeConstant = 0.01;\n\n/**\n * Sets the position of the listener in 3d space.\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @return {Tone.Listener} this\n */\nTone.Listener.prototype.setPosition = function(x, y, z){\n\tif (this.context.rawContext.listener.positionX){\n\t\tvar now = this.now();\n\t\tthis.context.rawContext.listener.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t} else {\n\t\tthis.context.rawContext.listener.setPosition(x, y, z);\n\t}\n\tthis._position = Array.prototype.slice.call(arguments);\n\treturn this;\n};\n\n/**\n * Sets the orientation of the listener using two vectors, the forward\n * vector (which direction the listener is facing) and the up vector\n * (which the up direction of the listener). An up vector\n * of 0, 0, 1 is equivalent to the listener standing up in the Z direction.\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @param {Number} upX\n * @param {Number} upY\n * @param {Number} upZ\n * @return {Tone.Listener} this\n */\nTone.Listener.prototype.setOrientation = function(x, y, z, upX, upY, upZ){\n\tif (this.context.rawContext.listener.forwardX){\n\t\tvar now = this.now();\n\t\tthis.context.rawContext.listener.forwardX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.forwardY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.forwardZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.upX.setTargetAtTime(upX, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.upY.setTargetAtTime(upY, now, this._rampTimeConstant);\n\t\tthis.context.rawContext.listener.upZ.setTargetAtTime(upZ, now, this._rampTimeConstant);\n\t} else {\n\t\tthis.context.rawContext.listener.setOrientation(x, y, z, upX, upY, upZ);\n\t}\n\tthis._orientation = Array.prototype.slice.call(arguments);\n\treturn this;\n};\n\n/**\n * The x position of the panner object.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name positionX\n */\nObject.defineProperty(Tone.Listener.prototype, \"positionX\", {\n\tset : function(pos){\n\t\tthis._position[0] = pos;\n\t\tthis.setPosition.apply(this, this._position);\n\t},\n\tget : function(){\n\t\treturn this._position[0];\n\t}\n});\n\n/**\n * The y position of the panner object.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name positionY\n */\nObject.defineProperty(Tone.Listener.prototype, \"positionY\", {\n\tset : function(pos){\n\t\tthis._position[1] = pos;\n\t\tthis.setPosition.apply(this, this._position);\n\t},\n\tget : function(){\n\t\treturn this._position[1];\n\t}\n});\n\n/**\n * The z position of the panner object.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name positionZ\n */\nObject.defineProperty(Tone.Listener.prototype, \"positionZ\", {\n\tset : function(pos){\n\t\tthis._position[2] = pos;\n\t\tthis.setPosition.apply(this, this._position);\n\t},\n\tget : function(){\n\t\treturn this._position[2];\n\t}\n});\n\n/**\n * The x coordinate of the listeners front direction. i.e.\n * which way they are facing.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name forwardX\n */\nObject.defineProperty(Tone.Listener.prototype, \"forwardX\", {\n\tset : function(pos){\n\t\tthis._orientation[0] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[0];\n\t}\n});\n\n/**\n * The y coordinate of the listeners front direction. i.e.\n * which way they are facing.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name forwardY\n */\nObject.defineProperty(Tone.Listener.prototype, \"forwardY\", {\n\tset : function(pos){\n\t\tthis._orientation[1] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[1];\n\t}\n});\n\n/**\n * The z coordinate of the listeners front direction. i.e.\n * which way they are facing.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name forwardZ\n */\nObject.defineProperty(Tone.Listener.prototype, \"forwardZ\", {\n\tset : function(pos){\n\t\tthis._orientation[2] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[2];\n\t}\n});\n\n/**\n * The x coordinate of the listener's up direction. i.e.\n * the direction the listener is standing in.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name upX\n */\nObject.defineProperty(Tone.Listener.prototype, \"upX\", {\n\tset : function(pos){\n\t\tthis._orientation[3] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[3];\n\t}\n});\n\n/**\n * The y coordinate of the listener's up direction. i.e.\n * the direction the listener is standing in.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name upY\n */\nObject.defineProperty(Tone.Listener.prototype, \"upY\", {\n\tset : function(pos){\n\t\tthis._orientation[4] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[4];\n\t}\n});\n\n/**\n * The z coordinate of the listener's up direction. i.e.\n * the direction the listener is standing in.\n * @type {Number}\n * @memberOf Tone.Listener#\n * @name upZ\n */\nObject.defineProperty(Tone.Listener.prototype, \"upZ\", {\n\tset : function(pos){\n\t\tthis._orientation[5] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[5];\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.Listener} this\n */\nTone.Listener.prototype.dispose = function(){\n\tthis._orientation = null;\n\tthis._position = null;\n\treturn this;\n};\n\n//SINGLETON SETUP\nvar ListenerConstructor = Tone.Listener;\nTone.Listener = new ListenerConstructor();\n\nTone.Context.on(\"init\", function(context){\n\tif (context.listener && context.listener.isListener){\n\t\t//a single listener object\n\t\tTone.Listener = context.listener;\n\t} else {\n\t\t//make new Listener insides\n\t\tTone.Listener = new ListenerConstructor();\n\t}\n});\n//END SINGLETON SETUP\n\nexport default Tone.Listener;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Timeline\";\n\n/**\n * @class Tone.Draw is useful for synchronizing visuals and audio events.\n * Callbacks from Tone.Transport or any of the Tone.Event classes\n * always happen _before_ the scheduled time and are not synchronized\n * to the animation frame so they are not good for triggering tightly\n * synchronized visuals and sound. Tone.Draw makes it easy to schedule\n * callbacks using the AudioContext time and uses requestAnimationFrame.\n * \n * @singleton\n * @extends {Tone}\n * @example\n * Tone.Transport.schedule(function(time){\n * \t//use the time argument to schedule a callback with Tone.Draw\n * \tTone.Draw.schedule(function(){\n * \t\t//do drawing or DOM manipulation here\n * \t}, time)\n * }, \"+0.5\")\n */\nTone.Draw = function(){\n\n\tTone.call(this);\n\t\n\t/**\n\t * All of the events.\n\t * @type {Tone.Timeline}\n\t * @private\n\t */\n\tthis._events = new Tone.Timeline();\n\n\t/**\n\t * The duration after which events are not invoked.\n\t * @type {Number}\n\t * @default 0.25\n\t */\n\tthis.expiration = 0.25;\n\n\t/**\n\t * The amount of time before the scheduled time \n\t * that the callback can be invoked. Default is\n\t * half the time of an animation frame (0.008 seconds).\n\t * @type {Number}\n\t * @default 0.008\n\t */\n\tthis.anticipation = 0.008;\n\n\t/**\n\t * The draw loop\n\t * @type {Function}\n\t * @private\n\t */\n\tthis._boundDrawLoop = this._drawLoop.bind(this);\n};\n\nTone.extend(Tone.Draw);\n\n/**\n * Schedule a function at the given time to be invoked\n * on the nearest animation frame.\n * @param {Function} callback Callback is invoked at the given time.\n * @param {Time} time The time relative to the AudioContext time\n * to invoke the callback.\n * @return {Tone.Draw} this\n */\nTone.Draw.prototype.schedule = function(callback, time){\n\tthis._events.add({\n\t\tcallback : callback,\n\t\ttime : this.toSeconds(time)\n\t});\n\t//start the draw loop on the first event\n\tif (this._events.length === 1){\n\t\trequestAnimationFrame(this._boundDrawLoop);\n\t}\n\treturn this;\n};\n\n/**\n * Cancel events scheduled after the given time\n * @param {Time=} after Time after which scheduled events will \n * be removed from the scheduling timeline.\n * @return {Tone.Draw} this\n */\nTone.Draw.prototype.cancel = function(after){\n\tthis._events.cancel(this.toSeconds(after));\n\treturn this;\n};\n\n/**\n * The draw loop\n * @private\n */\nTone.Draw.prototype._drawLoop = function(){\n\tvar now = Tone.context.currentTime;\n\twhile (this._events.length && this._events.peek().time - this.anticipation <= now){\n\t\tvar event = this._events.shift();\n\t\tif (now - event.time <= this.expiration){\n\t\t\tevent.callback();\n\t\t}\n\t}\n\tif (this._events.length > 0){\n\t\trequestAnimationFrame(this._boundDrawLoop);\n\t}\n};\n\n//make a singleton\nTone.Draw = new Tone.Draw();\n\nexport default Tone.Draw;\n\n","import Tone from \"../core/Tone\";\nimport \"../core/Gain\";\n\n/**\n * buses are another way of routing audio\n *\n * augments Tone.prototype to include send and receive\n */\n\n/**\n * All of the routes\n *\n * @type {Object}\n * @static\n * @private\n */\nvar Buses = {};\n\n/**\n * Send this signal to the channel name.\n * @param {String} channelName A named channel to send the signal to.\n * @param {Decibels} amount The amount of the source to send to the bus.\n * @return {GainNode} The gain node which connects this node to the desired channel.\n * Can be used to adjust the levels of the send.\n * @example\n * source.send(\"reverb\", -12);\n */\nTone.prototype.send = function(channelName, amount){\n\tif (!Buses.hasOwnProperty(channelName)){\n\t\tBuses[channelName] = this.context.createGain();\n\t}\n\tamount = Tone.defaultArg(amount, 0);\n\tvar sendKnob = new Tone.Gain(amount, Tone.Type.Decibels);\n\tthis.connect(sendKnob);\n\tsendKnob.connect(Buses[channelName]);\n\treturn sendKnob;\n};\n\n/**\n * Receive the input from the desired channelName to the input\n *\n * @param {String} channelName A named channel to send the signal to.\n * @param {Number=} channelNumber The channel to connect to\n * @returns {Tone} this\n * @example\n * reverbEffect.receive(\"reverb\");\n */\nTone.prototype.receive = function(channelName, inputNum){\n\tif (!Buses.hasOwnProperty(channelName)){\n\t\tBuses[channelName] = this.context.createGain();\n\t}\n\tTone.connect(Buses[channelName], this, 0, inputNum);\n\treturn this;\n};\n\n//remove all the send/receives when a new audio context is passed in\nTone.Context.on(\"init\", function(context){\n\tif (context.buses){\n\t\tBuses = context.buses;\n\t} else {\n\t\tBuses = {};\n\t\tcontext.buses = Buses;\n\t}\n});\n\nexport default Tone;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Type\";\n\n/**\n * @class Choose a random value.\n * @extends {Tone}\n * @example\n * var randomWalk = new Tone.CtrlRandom({\n * \t\"min\" : 0,\n * \t\"max\" : 10,\n * \t\"integer\" : true\n * });\n * randomWalk.eval();\n *\n * @param {Number|Time=} min The minimum return value.\n * @param {Number|Time=} max The maximum return value.\n */\nTone.CtrlRandom = function(){\n\n\tvar options = Tone.defaults(arguments, [\"min\", \"max\"], Tone.CtrlRandom);\n\tTone.call(this);\n\n\t/**\n\t * The minimum return value\n\t * @type {Number|Time}\n\t */\n\tthis.min = options.min;\n\n\t/**\n\t * The maximum return value\n\t * @type {Number|Time}\n\t */\n\tthis.max = options.max;\n\n\t/**\n\t * If the return value should be an integer\n\t * @type {Boolean}\n\t */\n\tthis.integer = options.integer;\n};\n\nTone.extend(Tone.CtrlRandom);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.CtrlRandom.defaults = {\n\t\"min\" : 0,\n\t\"max\" : 1,\n\t\"integer\" : false\n};\n\n/**\n * Return a random value between min and max. \n * @readOnly\n * @memberOf Tone.CtrlRandom#\n * @type {*}\n * @name value\n */\nObject.defineProperty(Tone.CtrlRandom.prototype, \"value\", {\n\tget : function(){\n\t\tvar min = this.toSeconds(this.min);\n\t\tvar max = this.toSeconds(this.max);\n\t\tvar rand = Math.random(); \n\t\tvar val = rand * min + (1 - rand) * max;\n\t\tif (this.integer){\n\t\t\tval = Math.floor(val);\n\t\t}\n\t\treturn val;\n\t}\n});\n\nexport default Tone.CtrlRandom;\n\n","import Tone from \"../core/Tone\";\n\n/**\n * @class Tone.CtrlMarkov represents a Markov Chain where each call\n * to Tone.CtrlMarkov.next will move to the next state. If the next\n * state choice is an array, the next state is chosen randomly with\n * even probability for all of the choices. For a weighted probability\n * of the next choices, pass in an object with \"state\" and \"probability\" attributes. \n * The probabilities will be normalized and then chosen. If no next options\n * are given for the current state, the state will stay there. \n * @extends {Tone}\n * @example\n * var chain = new Tone.CtrlMarkov({\n * \t\"beginning\" : [\"end\", \"middle\"],\n * \t\"middle\" : \"end\"\n * });\n * chain.value = \"beginning\";\n * chain.next(); //returns \"end\" or \"middle\" with 50% probability\n *\n * @example\n * var chain = new Tone.CtrlMarkov({\n * \t\"beginning\" : [{\"value\" : \"end\", \"probability\" : 0.8}, \n * \t\t\t\t\t{\"value\" : \"middle\", \"probability\" : 0.2}],\n * \t\"middle\" : \"end\"\n * });\n * chain.value = \"beginning\";\n * chain.next(); //returns \"end\" with 80% probability or \"middle\" with 20%.\n * @param {Object} values An object with the state names as the keys\n * and the next state(s) as the values. \n */\nTone.CtrlMarkov = function(values, initial){\n\n\tTone.call(this);\n\n\t/**\n\t * The Markov values with states as the keys\n\t * and next state(s) as the values. \n\t * @type {Object}\n\t */\n\tthis.values = Tone.defaultArg(values, {});\n\t\n\t/**\n\t * The current state of the Markov values. The next\n\t * state will be evaluated and returned when Tone.CtrlMarkov.next\n\t * is invoked.\n\t * @type {String}\n\t */\n\tthis.value = Tone.defaultArg(initial, Object.keys(this.values)[0]);\n};\n\nTone.extend(Tone.CtrlMarkov);\n\n/**\n * Returns the next state of the Markov values. \n * @return {String}\n */\nTone.CtrlMarkov.prototype.next = function(){\n\tif (this.values.hasOwnProperty(this.value)){\n\t\tvar next = this.values[this.value];\n\t\tif (Tone.isArray(next)){\n\t\t\tvar distribution = this._getProbDistribution(next);\n\t\t\tvar rand = Math.random();\n\t\t\tvar total = 0;\n\t\t\tfor (var i = 0; i < distribution.length; i++){\n\t\t\t\tvar dist = distribution[i];\n\t\t\t\tif (rand > total && rand < total + dist){\n\t\t\t\t\tvar chosen = next[i];\n\t\t\t\t\tif (Tone.isObject(chosen)){\n\t\t\t\t\t\tthis.value = chosen.value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.value = chosen;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttotal += dist;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.value = next;\n\t\t}\n\t} \n\treturn this.value;\n};\n\n/**\n * Choose randomly from an array weighted options in the form \n * {\"state\" : string, \"probability\" : number} or an array of values\n * @param {Array} options \n * @return {Array} The randomly selected choice\n * @private\n */\nTone.CtrlMarkov.prototype._getProbDistribution = function(options){\n\tvar distribution = [];\n\tvar total = 0;\n\tvar needsNormalizing = false;\n\tfor (var i = 0; i < options.length; i++){\n\t\tvar option = options[i];\n\t\tif (Tone.isObject(option)){\n\t\t\tneedsNormalizing = true;\n\t\t\tdistribution[i] = option.probability;\n\t\t} else {\n\t\t\tdistribution[i] = 1 / options.length;\n\t\t}\n\t\ttotal += distribution[i];\n\t}\n\tif (needsNormalizing){\n\t\t//normalize the values\n\t\tfor (var j = 0; j < distribution.length; j++){\n\t\t\tdistribution[j] = distribution[j] / total;\n\t\t}\n\t}\n\treturn distribution;\n};\n\n/**\n * Clean up\n * @return {Tone.CtrlMarkov} this\n */\nTone.CtrlMarkov.prototype.dispose = function(){\n\tthis.values = null;\n};\n\nexport default Tone.CtrlMarkov;\n\n","import Tone from \"../core/Tone\";\nimport \"../type/Type\";\n\n/**\n * @class Tone.CtrlInterpolate will interpolate between given values based\n * on the \"index\" property. Passing in an array or object literal\n * will interpolate each of the parameters. Note (i.e. \"C3\")\n * and Time (i.e. \"4n + 2\") can be interpolated. All other values are\n * assumed to be numbers. \n * @example\n * var interp = new Tone.CtrlInterpolate([0, 2, 9, 4]);\n * interp.index = 0.75;\n * interp.value; //returns 1.5\n *\n * @example\n * var interp = new Tone.CtrlInterpolate([\n * \t[2, 4, 5],\n * \t[9, 3, 2],\n * ]);\n * @param {Array} values The array of values to interpolate over\n * @param {Positive} index The initial interpolation index.\n * @extends {Tone}\n */\nTone.CtrlInterpolate = function(){\n\n\tvar options = Tone.defaults(arguments, [\"values\", \"index\"], Tone.CtrlInterpolate);\n\tTone.call(this);\n\n\t/**\n\t * The values to interpolate between\n\t * @type {Array}\n\t */\n\tthis.values = options.values;\n\n\t/**\n\t * The interpolated index between values. For example: a value of 1.5\n\t * would interpolate equally between the value at index 1\n\t * and the value at index 2. \n\t * @example\n\t * interp.index = 0; \n\t * interp.value; //returns the value at 0\n\t * interp.index = 0.5;\n\t * interp.value; //returns the value between indices 0 and 1. \n\t * @type {Positive}\n\t */\n\tthis.index = options.index;\n};\n\nTone.extend(Tone.CtrlInterpolate);\n\n/**\n * The defaults\n * @const\n * @type {Object}\n */\nTone.CtrlInterpolate.defaults = {\n\t\"index\" : 0,\n\t\"values\" : []\n};\n\n/**\n * The current interpolated value based on the index\n * @readOnly\n * @memberOf Tone.CtrlInterpolate#\n * @type {*}\n * @name value\n */\nObject.defineProperty(Tone.CtrlInterpolate.prototype, \"value\", {\n\tget : function(){\n\t\tvar index = this.index;\n\t\tindex = Math.min(index, this.values.length - 1);\n\t\tvar lowerPosition = Math.floor(index);\n\t\tvar lower = this.values[lowerPosition];\n\t\tvar upper = this.values[Math.ceil(index)];\n\t\treturn this._interpolate(index - lowerPosition, lower, upper);\n\t}\n});\n\n/**\n * Internal interpolation routine\n * @param {NormalRange} index The index between the lower and upper\n * @param {*} lower \n * @param {*} upper \n * @return {*} The interpolated value\n * @private\n */\nTone.CtrlInterpolate.prototype._interpolate = function(index, lower, upper){\n\tif (Tone.isArray(lower)){\n\t\tvar retArray = [];\n\t\tfor (var i = 0; i < lower.length; i++){\n\t\t\tretArray[i] = this._interpolate(index, lower[i], upper[i]);\n\t\t}\n\t\treturn retArray;\n\t} else if (Tone.isObject(lower)){\n\t\tvar retObj = {};\n\t\tfor (var attr in lower){\n\t\t\tretObj[attr] = this._interpolate(index, lower[attr], upper[attr]);\n\t\t}\n\t\treturn retObj;\n\t} else {\n\t\tlower = this._toNumber(lower);\n\t\tupper = this._toNumber(upper);\n\t\treturn (1 - index) * lower + index * upper;\n\t}\n};\n\n/**\n * Convert from the given type into a number\n * @param {Number|String} value\n * @return {Number}\n * @private\n */\nTone.CtrlInterpolate.prototype._toNumber = function(val){\n\tif (Tone.isNumber(val)){\n\t\treturn val;\n\t} else {\n\t\t//otherwise assume that it's Time...\n\t\treturn this.toSeconds(val);\n\t}\n};\n\n/**\n * Clean up\n * @return {Tone.CtrlInterpolate} this\n */\nTone.CtrlInterpolate.prototype.dispose = function(){\n\tthis.values = null;\n};\n\nexport default Tone.CtrlInterpolate;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Analyser\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Get the current waveform data of the connected audio source.\n * @extends {Tone.AudioNode}\n * @param {Number=} size The size of the FFT. Value must be a power of\n * two in the range 32 to 32768.\n */\nTone.Waveform = function(){\n\n\tvar options = Tone.defaults(arguments, [\"size\"], Tone.Waveform);\n\toptions.type = Tone.Analyser.Type.Waveform;\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The analyser node.\n\t * @private\n\t * @type {Tone.Analyser}\n\t */\n\tthis._analyser = this.input = this.output = new Tone.Analyser(options);\n};\n\nTone.extend(Tone.Waveform, Tone.AudioNode);\n\n/**\n * The default values.\n * @type {Object}\n * @const\n */\nTone.Waveform.defaults = {\n\t\"size\" : 1024\n};\n\n/**\n * Gets the waveform of the audio source. Returns the waveform data\n * of length [size](#size) as a Float32Array with values between -1 and 1.\n * @returns {TypedArray}\n */\nTone.Waveform.prototype.getValue = function(){\n\treturn this._analyser.getValue();\n};\n\n/**\n * The size of analysis. This must be a power of two in the range 32 to 32768.\n * @memberOf Tone.Waveform#\n * @type {Number}\n * @name size\n */\nObject.defineProperty(Tone.Waveform.prototype, \"size\", {\n\tget : function(){\n\t\treturn this._analyser.size;\n\t},\n\tset : function(size){\n\t\tthis._analyser.size = size;\n\t}\n});\n/**\n * Clean up.\n * @return {Tone.Waveform} this\n */\nTone.Waveform.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._analyser.dispose();\n\tthis._analyser = null;\n};\n\nexport default Tone.Waveform;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/CrossFade\";\nimport \"../component/Merge\";\nimport \"../component/Split\";\nimport \"../signal/Signal\";\nimport \"../signal/AudioToGain\";\nimport \"../signal/Zero\";\nimport \"../core/AudioNode\";\n\n/**\n * @class A spatialized panner node which supports equalpower or HRTF panning.\n * Tries to normalize the API across various browsers. See Tone.Listener\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Number} positionX The initial x position.\n * @param {Number} positionY The initial y position.\n * @param {Number} positionZ The initial z position.\n */\nTone.Panner3D = function(){\n\n\tvar options = Tone.defaults(arguments, [\"positionX\", \"positionY\", \"positionZ\"], Tone.Panner3D);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The panner node\n\t * @type {PannerNode}\n\t * @private\n\t */\n\tthis._panner = this.input = this.output = this.context.createPanner();\n\t//set some values\n\tthis._panner.panningModel = options.panningModel;\n\tthis._panner.maxDistance = options.maxDistance;\n\tthis._panner.distanceModel = options.distanceModel;\n\tthis._panner.coneOuterGain = options.coneOuterGain;\n\tthis._panner.coneOuterAngle = options.coneOuterAngle;\n\tthis._panner.coneInnerAngle = options.coneInnerAngle;\n\tthis._panner.refDistance = options.refDistance;\n\tthis._panner.rolloffFactor = options.rolloffFactor;\n\n\t/**\n\t * Holds the current orientation\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._orientation = [options.orientationX, options.orientationY, options.orientationZ];\n\n\t/**\n\t * Holds the current position\n\t * @type {Array}\n\t * @private\n\t */\n\tthis._position = [options.positionX, options.positionY, options.positionZ];\n\n\t// set the default position/orientation\n\tthis.orientationX = options.orientationX;\n\tthis.orientationY = options.orientationY;\n\tthis.orientationZ = options.orientationZ;\n\tthis.positionX = options.positionX;\n\tthis.positionY = options.positionY;\n\tthis.positionZ = options.positionZ;\n};\n\nTone.extend(Tone.Panner3D, Tone.AudioNode);\n\n/**\n * Defaults according to the specification\n * @static\n * @const\n * @type {Object}\n */\nTone.Panner3D.defaults = {\n\t\"positionX\" : 0,\n\t\"positionY\" : 0,\n\t\"positionZ\" : 0,\n\t\"orientationX\" : 0,\n\t\"orientationY\" : 0,\n\t\"orientationZ\" : 0,\n\t\"panningModel\" : \"equalpower\",\n\t\"maxDistance\" : 10000,\n\t\"distanceModel\" : \"inverse\",\n\t\"coneOuterGain\" : 0,\n\t\"coneOuterAngle\" : 360,\n\t\"coneInnerAngle\" : 360,\n\t\"refDistance\" : 1,\n\t\"rolloffFactor\" : 1\n};\n\n/**\n * The ramp time which is applied to the setTargetAtTime\n * @type {Number}\n * @private\n */\nTone.Panner3D.prototype._rampTimeConstant = 0.01;\n\n/**\n * Sets the position of the source in 3d space.\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @return {Tone.Panner3D} this\n */\nTone.Panner3D.prototype.setPosition = function(x, y, z){\n\tif (this._panner.positionX){\n\t\tvar now = this.now();\n\t\tthis._panner.positionX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t\tthis._panner.positionY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t\tthis._panner.positionZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t} else {\n\t\tthis._panner.setPosition(x, y, z);\n\t}\n\tthis._position = Array.prototype.slice.call(arguments);\n\treturn this;\n};\n\n/**\n * Sets the orientation of the source in 3d space.\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @return {Tone.Panner3D} this\n */\nTone.Panner3D.prototype.setOrientation = function(x, y, z){\n\tif (this._panner.orientationX){\n\t\tvar now = this.now();\n\t\tthis._panner.orientationX.setTargetAtTime(x, now, this._rampTimeConstant);\n\t\tthis._panner.orientationY.setTargetAtTime(y, now, this._rampTimeConstant);\n\t\tthis._panner.orientationZ.setTargetAtTime(z, now, this._rampTimeConstant);\n\t} else {\n\t\tthis._panner.setOrientation(x, y, z);\n\t}\n\tthis._orientation = Array.prototype.slice.call(arguments);\n\treturn this;\n};\n\n/**\n * The x position of the panner object.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name positionX\n */\nObject.defineProperty(Tone.Panner3D.prototype, \"positionX\", {\n\tset : function(pos){\n\t\tthis._position[0] = pos;\n\t\tthis.setPosition.apply(this, this._position);\n\t},\n\tget : function(){\n\t\treturn this._position[0];\n\t}\n});\n\n/**\n * The y position of the panner object.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name positionY\n */\nObject.defineProperty(Tone.Panner3D.prototype, \"positionY\", {\n\tset : function(pos){\n\t\tthis._position[1] = pos;\n\t\tthis.setPosition.apply(this, this._position);\n\t},\n\tget : function(){\n\t\treturn this._position[1];\n\t}\n});\n\n/**\n * The z position of the panner object.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name positionZ\n */\nObject.defineProperty(Tone.Panner3D.prototype, \"positionZ\", {\n\tset : function(pos){\n\t\tthis._position[2] = pos;\n\t\tthis.setPosition.apply(this, this._position);\n\t},\n\tget : function(){\n\t\treturn this._position[2];\n\t}\n});\n\n/**\n * The x orientation of the panner object.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name orientationX\n */\nObject.defineProperty(Tone.Panner3D.prototype, \"orientationX\", {\n\tset : function(pos){\n\t\tthis._orientation[0] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[0];\n\t}\n});\n\n/**\n * The y orientation of the panner object.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name orientationY\n */\nObject.defineProperty(Tone.Panner3D.prototype, \"orientationY\", {\n\tset : function(pos){\n\t\tthis._orientation[1] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[1];\n\t}\n});\n\n/**\n * The z orientation of the panner object.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name orientationZ\n */\nObject.defineProperty(Tone.Panner3D.prototype, \"orientationZ\", {\n\tset : function(pos){\n\t\tthis._orientation[2] = pos;\n\t\tthis.setOrientation.apply(this, this._orientation);\n\t},\n\tget : function(){\n\t\treturn this._orientation[2];\n\t}\n});\n\n/**\n * Proxy a property on the panner to an exposed public propery\n * @param {String} prop\n * @private\n */\nTone.Panner3D._aliasProperty = function(prop){\n\tObject.defineProperty(Tone.Panner3D.prototype, prop, {\n\t\tset : function(val){\n\t\t\tthis._panner[prop] = val;\n\t\t},\n\t\tget : function(){\n\t\t\treturn this._panner[prop];\n\t\t}\n\t});\n};\n\n/**\n * The panning model. Either \"equalpower\" or \"HRTF\".\n * @type {String}\n * @memberOf Tone.Panner3D#\n * @name panningModel\n */\nTone.Panner3D._aliasProperty(\"panningModel\");\n\n/**\n * A reference distance for reducing volume as source move further from the listener\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name refDistance\n */\nTone.Panner3D._aliasProperty(\"refDistance\");\n\n/**\n * Describes how quickly the volume is reduced as source moves away from listener.\n * @type {Number}\n * @memberOf Tone.Panner3D#\n * @name rolloffFactor\n */\nTone.Panner3D._aliasProperty(\"rolloffFactor\");\n\n/**\n * The distance model used by, \"linear\", \"inverse\", or \"exponential\".\n * @type {String}\n * @memberOf Tone.Panner3D#\n * @name distanceModel\n */\nTone.Panner3D._aliasProperty(\"distanceModel\");\n\n/**\n * The angle, in degrees, inside of which there will be no volume reduction\n * @type {Degrees}\n * @memberOf Tone.Panner3D#\n * @name coneInnerAngle\n */\nTone.Panner3D._aliasProperty(\"coneInnerAngle\");\n\n/**\n * The angle, in degrees, outside of which the volume will be reduced\n * to a constant value of coneOuterGain\n * @type {Degrees}\n * @memberOf Tone.Panner3D#\n * @name coneOuterAngle\n */\nTone.Panner3D._aliasProperty(\"coneOuterAngle\");\n\n/**\n * The gain outside of the coneOuterAngle\n * @type {Gain}\n * @memberOf Tone.Panner3D#\n * @name coneOuterGain\n */\nTone.Panner3D._aliasProperty(\"coneOuterGain\");\n\n/**\n * The maximum distance between source and listener,\n * after which the volume will not be reduced any further.\n * @type {Positive}\n * @memberOf Tone.Panner3D#\n * @name maxDistance\n */\nTone.Panner3D._aliasProperty(\"maxDistance\");\n\n/**\n * Clean up.\n * @returns {Tone.Panner3D} this\n */\nTone.Panner3D.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._panner.disconnect();\n\tthis._panner = null;\n\tthis._orientation = null;\n\tthis._position = null;\n\treturn this;\n};\n\nexport default Tone.Panner3D;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/MultibandSplit\";\nimport \"../component/Compressor\";\nimport \"../core/AudioNode\";\n\n/**\n * @class A compressor with seperate controls over low/mid/high dynamics\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Object} options The low/mid/high compressor settings.\n * @example\n * var multiband = new Tone.MultibandCompressor({\n * \t\"lowFrequency\" : 200,\n * \t\"highFrequency\" : 1300\n * \t\"low\" : {\n * \t\t\"threshold\" : -12\n * \t}\n * })\n */\nTone.MultibandCompressor = function(options){\n\n\tTone.AudioNode.call(this);\n\toptions = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);\n\n\t/**\n\t * split the incoming signal into high/mid/low\n\t * @type {Tone.MultibandSplit}\n\t * @private\n\t */\n\tthis._splitter = this.input = new Tone.MultibandSplit({\n\t\t\"lowFrequency\" : options.lowFrequency,\n\t\t\"highFrequency\" : options.highFrequency\n\t});\n\n\t/**\n\t * low/mid crossover frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.lowFrequency = this._splitter.lowFrequency;\n\n\t/**\n\t * mid/high crossover frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.highFrequency = this._splitter.highFrequency;\n\n\t/**\n\t * the output\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis.output = new Tone.Gain();\n\n\t/**\n\t * The compressor applied to the low frequencies.\n\t * @type {Tone.Compressor}\n\t */\n\tthis.low = new Tone.Compressor(options.low);\n\n\t/**\n\t * The compressor applied to the mid frequencies.\n\t * @type {Tone.Compressor}\n\t */\n\tthis.mid = new Tone.Compressor(options.mid);\n\n\t/**\n\t * The compressor applied to the high frequencies.\n\t * @type {Tone.Compressor}\n\t */\n\tthis.high = new Tone.Compressor(options.high);\n\n\t//connect the compressor\n\tthis._splitter.low.chain(this.low, this.output);\n\tthis._splitter.mid.chain(this.mid, this.output);\n\tthis._splitter.high.chain(this.high, this.output);\n\n\tthis._readOnly([\"high\", \"mid\", \"low\", \"highFrequency\", \"lowFrequency\"]);\n};\n\nTone.extend(Tone.MultibandCompressor, Tone.AudioNode);\n\n/**\n * @const\n * @static\n * @type {Object}\n */\nTone.MultibandCompressor.defaults = {\n\t\"low\" : Tone.Compressor.defaults,\n\t\"mid\" : Tone.Compressor.defaults,\n\t\"high\" : Tone.Compressor.defaults,\n\t\"lowFrequency\" : 250,\n\t\"highFrequency\" : 2000\n};\n\n/**\n * clean up\n * @returns {Tone.MultibandCompressor} this\n */\nTone.MultibandCompressor.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._splitter.dispose();\n\tthis._writable([\"high\", \"mid\", \"low\", \"highFrequency\", \"lowFrequency\"]);\n\tthis.low.dispose();\n\tthis.mid.dispose();\n\tthis.high.dispose();\n\tthis._splitter = null;\n\tthis.low = null;\n\tthis.mid = null;\n\tthis.high = null;\n\tthis.lowFrequency = null;\n\tthis.highFrequency = null;\n\treturn this;\n};\n\nexport default Tone.MultibandCompressor;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Merge\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal\n * where both left and right channels have the same value. This can be useful\n * for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).\n *\n * @extends {Tone.AudioNode}\n * @constructor\n */\nTone.Mono = function(){\n\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(1, 0);\n\n\t/**\n\t * merge the signal\n\t * @type {Tone.Merge}\n\t * @private\n\t */\n\tthis._merge = this.output = new Tone.Merge();\n\n\tTone.connect(this.input, this._merge, 0, 0);\n\tTone.connect(this.input, this._merge, 0, 1);\n};\n\nTone.extend(Tone.Mono, Tone.AudioNode);\n\n/**\n * clean up\n * @returns {Tone.Mono} this\n */\nTone.Mono.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._merge.dispose();\n\tthis._merge = null;\n\treturn this;\n};\n\nexport default Tone.Mono;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/MidSideSplit\";\nimport \"../component/MidSideMerge\";\nimport \"../component/Compressor\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.MidSideCompressor applies two different compressors to the mid\n * and side signal components. See Tone.MidSideSplit.\n *\n * @extends {Tone.AudioNode}\n * @param {Object} options The options that are passed to the mid and side\n * compressors.\n * @constructor\n */\nTone.MidSideCompressor = function(options){\n\n\tTone.AudioNode.call(this);\n\toptions = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);\n\n\t/**\n\t * the mid/side split\n\t * @type {Tone.MidSideSplit}\n\t * @private\n\t */\n\tthis._midSideSplit = this.input = new Tone.MidSideSplit();\n\n\t/**\n\t * the mid/side recombination\n\t * @type {Tone.MidSideMerge}\n\t * @private\n\t */\n\tthis._midSideMerge = this.output = new Tone.MidSideMerge();\n\n\t/**\n\t * The compressor applied to the mid signal\n\t * @type {Tone.Compressor}\n\t */\n\tthis.mid = new Tone.Compressor(options.mid);\n\n\t/**\n\t * The compressor applied to the side signal\n\t * @type {Tone.Compressor}\n\t */\n\tthis.side = new Tone.Compressor(options.side);\n\n\tthis._midSideSplit.mid.chain(this.mid, this._midSideMerge.mid);\n\tthis._midSideSplit.side.chain(this.side, this._midSideMerge.side);\n\tthis._readOnly([\"mid\", \"side\"]);\n};\n\nTone.extend(Tone.MidSideCompressor, Tone.AudioNode);\n\n/**\n * @const\n * @static\n * @type {Object}\n */\nTone.MidSideCompressor.defaults = {\n\t\"mid\" : {\n\t\t\"ratio\" : 3,\n\t\t\"threshold\" : -24,\n\t\t\"release\" : 0.03,\n\t\t\"attack\" : 0.02,\n\t\t\"knee\" : 16\n\t},\n\t\"side\" : {\n\t\t\"ratio\" : 6,\n\t\t\"threshold\" : -30,\n\t\t\"release\" : 0.25,\n\t\t\"attack\" : 0.03,\n\t\t\"knee\" : 10\n\t}\n};\n\n/**\n * Clean up.\n * @returns {Tone.MidSideCompressor} this\n */\nTone.MidSideCompressor.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"mid\", \"side\"]);\n\tthis.mid.dispose();\n\tthis.mid = null;\n\tthis.side.dispose();\n\tthis.side = null;\n\tthis._midSideSplit.dispose();\n\tthis._midSideSplit = null;\n\tthis._midSideMerge.dispose();\n\tthis._midSideMerge = null;\n\treturn this;\n};\n\nexport default Tone.MidSideCompressor;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Analyser\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)\n * of an input signal. It can also get the raw\n * value of the input signal.\n *\n * @constructor\n * @param {Number} smoothing The amount of smoothing applied between frames.\n * @extends {Tone.AudioNode}\n * @example\n * var meter = new Tone.Meter();\n * var mic = new Tone.UserMedia().open();\n * //connect mic to the meter\n * mic.connect(meter);\n * //the current level of the mic input in decibels\n * var level = meter.getLevel();\n */\nTone.Meter = function(){\n\n\tvar options = Tone.defaults(arguments, [\"smoothing\"], Tone.Meter);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * A value from 0 -> 1 where 0 represents no time averaging with the last analysis frame.\n\t * @type {Number}\n\t */\n\tthis.smoothing = options.smoothing;\n\n\t/**\n\t * The previous frame's value\n\t * @type {Number}\n\t * @private\n\t */\n\tthis._rms = 0;\n\n\t/**\n\t * The analyser node which computes the levels.\n\t * @private\n\t * @type {Tone.Analyser}\n\t */\n\tthis.input = this.output = this._analyser = new Tone.Analyser(\"waveform\", 256);\n};\n\nTone.extend(Tone.Meter, Tone.AudioNode);\n\n/**\n * The defaults\n * @type {Object}\n * @static\n * @const\n */\nTone.Meter.defaults = {\n\t\"smoothing\" : 0.8,\n};\n\n/**\n * Get the current decibel value of the incoming signal\n * @returns {Decibels}\n */\nTone.Meter.prototype.getLevel = function(){\n\tvar values = this._analyser.getValue();\n\tvar totalSquared = 0;\n\tfor (var i = 0; i < values.length; i++){\n\t\tvar value = values[i];\n\t\ttotalSquared += value * value;\n\t}\n\tvar rms = Math.sqrt(totalSquared / values.length);\n\n\t//the rms can only fall at the rate of the smoothing\n\t//but can jump up instantly\n\tthis._rms = Math.max(rms, this._rms * this.smoothing);\n\n\treturn Tone.gainToDb(this._rms);\n};\n\n/**\n * Get the signal value of the incoming signal\n * @returns {Number}\n */\nTone.Meter.prototype.getValue = function(){\n\tvar value = this._analyser.getValue();\n\treturn value[0];\n};\n\n/**\n * Clean up.\n * @returns {Tone.Meter} this\n */\nTone.Meter.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._analyser.dispose();\n\tthis._analyser = null;\n\treturn this;\n};\n\nexport default Tone.Meter;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Compressor\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Limiter will limit the loudness of an incoming signal.\n * It is composed of a Tone.Compressor with a fast attack\n * and release. Limiters are commonly used to safeguard against\n * signal clipping. Unlike a compressor, limiters do not provide\n * smooth gain reduction and almost completely prevent\n * additional gain above the threshold.\n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {number} threshold The theshold above which the limiting is applied.\n * @example\n * var limiter = new Tone.Limiter(-6);\n */\nTone.Limiter = function(){\n\n\tvar options = Tone.defaults(arguments, [\"threshold\"], Tone.Limiter);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * the compressor\n\t * @private\n\t * @type {Tone.Compressor}\n\t */\n\tthis._compressor = this.input = this.output = new Tone.Compressor({\n\t\t\"attack\" : 0.001,\n\t\t\"decay\" : 0.001,\n\t\t\"threshold\" : options.threshold\n\t});\n\n\t/**\n\t * The threshold of of the limiter\n\t * @type {Decibel}\n\t * @signal\n\t */\n\tthis.threshold = this._compressor.threshold;\n\n\tthis._readOnly(\"threshold\");\n};\n\nTone.extend(Tone.Limiter, Tone.AudioNode);\n\n/**\n * The default value\n * @type {Object}\n * @const\n * @static\n */\nTone.Limiter.defaults = {\n\t\"threshold\" : -12\n};\n\n/**\n * Clean up.\n * @returns {Tone.Limiter} this\n */\nTone.Limiter.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._compressor.dispose();\n\tthis._compressor = null;\n\tthis._writable(\"threshold\");\n\tthis.threshold = null;\n\treturn this;\n};\n\nexport default Tone.Limiter;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Follower\";\nimport \"../signal/GreaterThan\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Gate only passes a signal through when the incoming\n * signal exceeds a specified threshold. To do this, Gate uses\n * a Tone.Follower to follow the amplitude of the incoming signal.\n * A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).\n *\n * @constructor\n * @extends {Tone.AudioNode}\n * @param {Decibels|Object} [threshold] The threshold above which the gate will open.\n * @param {Time=} smoothing The follower's smoothing time\n * @example\n * var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();\n * var mic = new Tone.UserMedia().connect(gate);\n * //the gate will only pass through the incoming\n * //signal when it's louder than -30db\n */\nTone.Gate = function(){\n\n\tvar options = Tone.defaults(arguments, [\"threshold\", \"smoothing\"], Tone.Gate);\n\tTone.AudioNode.call(this);\n\tthis.createInsOuts(1, 1);\n\n\t/**\n\t * @type {Tone.Follower}\n\t * @private\n\t */\n\tthis._follower = new Tone.Follower(options.smoothing);\n\n\t/**\n\t * @type {Tone.GreaterThan}\n\t * @private\n\t */\n\tthis._gt = new Tone.GreaterThan(Tone.dbToGain(options.threshold));\n\n\t//the connections\n\tTone.connect(this.input, this.output);\n\t//the control signal\n\tTone.connectSeries(this.input, this._follower, this._gt, this.output.gain);\n};\n\nTone.extend(Tone.Gate, Tone.AudioNode);\n\n/**\n * @const\n * @static\n * @type {Object}\n */\nTone.Gate.defaults = {\n\t\"smoothing\" : 0.1,\n\t\"threshold\" : -40\n};\n\n/**\n * The threshold of the gate in decibels\n * @memberOf Tone.Gate#\n * @type {Decibels}\n * @name threshold\n */\nObject.defineProperty(Tone.Gate.prototype, \"threshold\", {\n\tget : function(){\n\t\treturn Tone.gainToDb(this._gt.value);\n\t},\n\tset : function(thresh){\n\t\tthis._gt.value = Tone.dbToGain(thresh);\n\t}\n});\n\n/**\n * The attack/decay speed of the gate\n * @memberOf Tone.Gate#\n * @type {Time}\n * @name smoothing\n */\nObject.defineProperty(Tone.Gate.prototype, \"smoothing\", {\n\tget : function(){\n\t\treturn this._follower.smoothing;\n\t},\n\tset : function(smoothingTime){\n\t\tthis._follower.smoothing = smoothingTime;\n\t}\n});\n\n/**\n * Clean up.\n * @returns {Tone.Gate} this\n */\nTone.Gate.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._follower.dispose();\n\tthis._gt.dispose();\n\tthis._follower = null;\n\tthis._gt = null;\n\treturn this;\n};\n\nexport default Tone.Gate;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/Analyser\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Get the current frequency data of the connected audio source\n * using a fast Fourier transform.\n * @extends {Tone.AudioNode}\n * @param {Number=} size The size of the FFT. Value must be a power of\n * two in the range 16 to 16384.\n */\nTone.FFT = function(){\n\n\tvar options = Tone.defaults(arguments, [\"size\"], Tone.FFT);\n\toptions.type = Tone.Analyser.Type.FFT;\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * The analyser node.\n\t * @private\n\t * @type {Tone.Analyser}\n\t */\n\tthis._analyser = this.input = this.output = new Tone.Analyser(options);\n};\n\nTone.extend(Tone.FFT, Tone.AudioNode);\n\n/**\n * The default values.\n * @type {Object}\n * @const\n */\nTone.FFT.defaults = {\n\t\"size\" : 1024\n};\n\n/**\n * Gets the current frequency data from the connected audio source. \n * Returns the frequency data of length [size](#size) as a Float32Array of decibel values. \n * @returns {TypedArray}\n */\nTone.FFT.prototype.getValue = function(){\n\treturn this._analyser.getValue();\n};\n\n/**\n * The size of analysis. This must be a power of two in the range 16 to 16384.\n * Determines the size of the array returned by [getValue](#getvalue) (i.e. the number of\n * frequency bins). Large FFT sizes may be costly to compute.\n * @memberOf Tone.FFT#\n * @type {Number}\n * @name size\n */\nObject.defineProperty(Tone.FFT.prototype, \"size\", {\n\tget : function(){\n\t\treturn this._analyser.size;\n\t},\n\tset : function(size){\n\t\tthis._analyser.size = size;\n\t}\n});\n\n/**\n * Clean up.\n * @return {Tone.FFT} this\n */\nTone.FFT.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._analyser.dispose();\n\tthis._analyser = null;\n};\n\nexport default Tone.FFT;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/MultibandSplit\";\nimport \"../core/Gain\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.EQ3 is a three band EQ with control over low, mid, and high gain as\n * well as the low and high crossover frequencies.\n *\n * @constructor\n * @extends {Tone.AudioNode}\n *\n * @param {Decibels|Object} [lowLevel] The gain applied to the lows.\n * @param {Decibels} [midLevel] The gain applied to the mid.\n * @param {Decibels} [highLevel] The gain applied to the high.\n * @example\n * var eq = new Tone.EQ3(-10, 3, -20);\n */\nTone.EQ3 = function(){\n\n\tvar options = Tone.defaults(arguments, [\"low\", \"mid\", \"high\"], Tone.EQ3);\n\tTone.AudioNode.call(this);\n\n\t/**\n\t * the output node\n\t * @type {GainNode}\n\t * @private\n\t */\n\tthis.output = new Tone.Gain();\n\n\t/**\n\t * the multiband split\n\t * @type {Tone.MultibandSplit}\n\t * @private\n\t */\n\tthis._multibandSplit = this.input = new Tone.MultibandSplit({\n\t\t\"lowFrequency\" : options.lowFrequency,\n\t\t\"highFrequency\" : options.highFrequency\n\t});\n\n\t/**\n\t * The gain for the lower signals\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._lowGain = new Tone.Gain(options.low, Tone.Type.Decibels);\n\n\t/**\n\t * The gain for the mid signals\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._midGain = new Tone.Gain(options.mid, Tone.Type.Decibels);\n\n\t/**\n\t * The gain in decibels of the high part\n\t * @type {Tone.Gain}\n\t * @private\n\t */\n\tthis._highGain = new Tone.Gain(options.high, Tone.Type.Decibels);\n\n\t/**\n\t * The gain in decibels of the low part\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.low = this._lowGain.gain;\n\n\t/**\n\t * The gain in decibels of the mid part\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.mid = this._midGain.gain;\n\n\t/**\n\t * The gain in decibels of the high part\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.high = this._highGain.gain;\n\n\t/**\n\t * The Q value for all of the filters.\n\t * @type {Positive}\n\t * @signal\n\t */\n\tthis.Q = this._multibandSplit.Q;\n\n\t/**\n\t * The low/mid crossover frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.lowFrequency = this._multibandSplit.lowFrequency;\n\n\t/**\n\t * The mid/high crossover frequency.\n\t * @type {Frequency}\n\t * @signal\n\t */\n\tthis.highFrequency = this._multibandSplit.highFrequency;\n\n\t//the frequency bands\n\tthis._multibandSplit.low.chain(this._lowGain, this.output);\n\tthis._multibandSplit.mid.chain(this._midGain, this.output);\n\tthis._multibandSplit.high.chain(this._highGain, this.output);\n\tthis._readOnly([\"low\", \"mid\", \"high\", \"lowFrequency\", \"highFrequency\"]);\n};\n\nTone.extend(Tone.EQ3, Tone.AudioNode);\n\n/**\n * the default values\n */\nTone.EQ3.defaults = {\n\t\"low\" : 0,\n\t\"mid\" : 0,\n\t\"high\" : 0,\n\t\"lowFrequency\" : 400,\n\t\"highFrequency\" : 2500\n};\n\n/**\n * clean up\n * @returns {Tone.EQ3} this\n */\nTone.EQ3.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"low\", \"mid\", \"high\", \"lowFrequency\", \"highFrequency\"]);\n\tthis._multibandSplit.dispose();\n\tthis._multibandSplit = null;\n\tthis.lowFrequency = null;\n\tthis.highFrequency = null;\n\tthis._lowGain.dispose();\n\tthis._lowGain = null;\n\tthis._midGain.dispose();\n\tthis._midGain = null;\n\tthis._highGain.dispose();\n\tthis._highGain = null;\n\tthis.low = null;\n\tthis.mid = null;\n\tthis.high = null;\n\tthis.Q = null;\n\treturn this;\n};\n\nexport default Tone.EQ3;\n\n","import Tone from \"../core/Tone\";\nimport \"../component/PanVol\";\nimport \"../component/Solo\";\nimport \"../core/AudioNode\";\n\n/**\n * @class Tone.Channel provides a channel strip interface with \n * volume, pan, solo and mute controls. \n *\n * @extends {Tone.AudioNode}\n * @constructor\n * @param {Decibels} volume The output volume.\n * @param {AudioRange} pan the initial pan\n * @example\n * //pan the incoming signal left and drop the volume\n * var channel = new Tone.Channel(-0.25, -12);\n */\nTone.Channel = function(){\n\n\tvar options = Tone.defaults(arguments, [\"volume\", \"pan\"], Tone.PanVol);\n\tTone.AudioNode.call(this, options);\n\n\t/**\n\t * The soloing interface\n\t * @type {Tone.Solo}\n\t * @private\n\t */\n\tthis._solo = this.input = new Tone.Solo(options.solo);\n\n\t/**\n\t * The panning and volume node\n\t * @type {Tone.PanVol}\n\t * @private\n\t */\n\tthis._panVol = this.output = new Tone.PanVol({\n\t\t\"pan\" : options.pan, \n\t\t\"volume\" : options.volume,\n\t\t\"mute\" : options.mute\n\t});\n\n\t/**\n\t * The L/R panning control.\n\t * @type {AudioRange}\n\t * @signal\n\t */\n\tthis.pan = this._panVol.pan;\n\n\t/**\n\t * The volume control in decibels.\n\t * @type {Decibels}\n\t * @signal\n\t */\n\tthis.volume = this._panVol.volume;\n\n\tthis._solo.connect(this._panVol);\n\tthis._readOnly([\"pan\", \"volume\"]);\n};\n\nTone.extend(Tone.Channel, Tone.AudioNode);\n\n/**\n * The defaults\n * @type {Object}\n * @const\n * @static\n */\nTone.Channel.defaults = {\n\t\"pan\" : 0,\n\t\"volume\" : 0,\n\t\"mute\" : false,\n\t\"solo\" : false\n};\n\n/**\n * Solo/unsolo the channel. Soloing is only relative to other\n * Tone.Channels and Tone.Solos. \n * @memberOf Tone.Channel#\n * @name solo\n * @type {Boolean}\n */\nObject.defineProperty(Tone.Channel.prototype, \"solo\", {\n\tget : function(){\n\t\treturn this._solo.solo;\n\t},\n\tset : function(solo){\n\t\tthis._solo.solo = solo;\n\t}\n});\n\n/**\n * If the current instance is muted, i.e. another instance is soloed,\n * or the channel is muted\n * @memberOf Tone.Channel#\n * @type {Boolean}\n * @name muted\n * @readOnly\n */\nObject.defineProperty(Tone.Channel.prototype, \"muted\", {\n\tget : function(){\n\t\treturn this._solo.muted || this.mute;\n\t}\n});\n\n/**\n * Mute/unmute the volume\n * @memberOf Tone.Channel#\n * @name mute\n * @type {Boolean}\n */\nObject.defineProperty(Tone.Channel.prototype, \"mute\", {\n\tget : function(){\n\t\treturn this._panVol.mute;\n\t},\n\tset : function(mute){\n\t\tthis._panVol.mute = mute;\n\t}\n});\n\n/**\n * clean up\n * @returns {Tone.Channel} this\n */\nTone.Channel.prototype.dispose = function(){\n\tTone.AudioNode.prototype.dispose.call(this);\n\tthis._writable([\"pan\", \"volume\"]);\n\tthis._panVol.dispose();\n\tthis._panVol = null;\n\tthis.pan = null;\n\tthis.volume = null;\n\tthis._solo.dispose();\n\tthis._solo = null;\n\treturn this;\n};\n\nexport default Tone.Channel;\n\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","require(\"./component/AmplitudeEnvelope\");\nrequire(\"./component/Analyser\");\nrequire(\"./component/Channel\");\nrequire(\"./component/Compressor\");\nrequire(\"./component/CrossFade\");\nrequire(\"./component/Envelope\");\nrequire(\"./component/EQ3\");\nrequire(\"./component/FeedbackCombFilter\");\nrequire(\"./component/FFT\");\nrequire(\"./component/Filter\");\nrequire(\"./component/Follower\");\nrequire(\"./component/FrequencyEnvelope\");\nrequire(\"./component/Gate\");\nrequire(\"./component/LFO\");\nrequire(\"./component/Limiter\");\nrequire(\"./component/LowpassCombFilter\");\nrequire(\"./component/Merge\");\nrequire(\"./component/Meter\");\nrequire(\"./component/MidSideCompressor\");\nrequire(\"./component/MidSideMerge\");\nrequire(\"./component/MidSideSplit\");\nrequire(\"./component/Mono\");\nrequire(\"./component/MultibandCompressor\");\nrequire(\"./component/MultibandSplit\");\nrequire(\"./component/Panner\");\nrequire(\"./component/Panner3D\");\nrequire(\"./component/PanVol\");\nrequire(\"./component/ScaledEnvelope\");\nrequire(\"./component/Solo\");\nrequire(\"./component/Split\");\nrequire(\"./component/Volume\");\nrequire(\"./component/Waveform\");\nrequire(\"./control/CtrlInterpolate\");\nrequire(\"./control/CtrlMarkov\");\nrequire(\"./control/CtrlPattern\");\nrequire(\"./control/CtrlRandom\");\nrequire(\"./core/AudioNode\");\nrequire(\"./core/Buffer\");\nrequire(\"./core/Buffers\");\nrequire(\"./core/Bus\");\nrequire(\"./core/Clock\");\nrequire(\"./core/Context\");\nrequire(\"./core/Delay\");\nrequire(\"./core/Draw\");\nrequire(\"./core/Emitter\");\nrequire(\"./core/Gain\");\nrequire(\"./core/IntervalTimeline\");\nrequire(\"./core/Listener\");\nrequire(\"./core/Master\");\nrequire(\"./core/Offline\");\nrequire(\"./core/OfflineContext\");\nrequire(\"./core/Param\");\nrequire(\"./core/Timeline\");\nrequire(\"./core/TimelineState\");\nrequire(\"./core/Transport\");\nrequire(\"./core/TransportEvent\");\nrequire(\"./core/TransportRepeatEvent\");\nrequire(\"./effect/AutoFilter\");\nrequire(\"./effect/AutoPanner\");\nrequire(\"./effect/AutoWah\");\nrequire(\"./effect/BitCrusher\");\nrequire(\"./effect/Chebyshev\");\nrequire(\"./effect/Chorus\");\nrequire(\"./effect/Convolver\");\nrequire(\"./effect/Distortion\");\nrequire(\"./effect/Effect\");\nrequire(\"./effect/FeedbackDelay\");\nrequire(\"./effect/FeedbackEffect\");\nrequire(\"./effect/Freeverb\");\nrequire(\"./effect/JCReverb\");\nrequire(\"./effect/MidSideEffect\");\nrequire(\"./effect/Phaser\");\nrequire(\"./effect/PingPongDelay\");\nrequire(\"./effect/PitchShift\");\nrequire(\"./effect/Reverb\");\nrequire(\"./effect/StereoEffect\");\nrequire(\"./effect/StereoFeedbackEffect\");\nrequire(\"./effect/StereoWidener\");\nrequire(\"./effect/StereoXFeedbackEffect\");\nrequire(\"./effect/Tremolo\");\nrequire(\"./effect/Vibrato\");\nrequire(\"./event/Event\");\nrequire(\"./event/Loop\");\nrequire(\"./event/Part\");\nrequire(\"./event/Pattern\");\nrequire(\"./event/Sequence\");\nrequire(\"./instrument/AMSynth\");\nrequire(\"./instrument/DuoSynth\");\nrequire(\"./instrument/FMSynth\");\nrequire(\"./instrument/Instrument\");\nrequire(\"./instrument/MembraneSynth\");\nrequire(\"./instrument/MetalSynth\");\nrequire(\"./instrument/Monophonic\");\nrequire(\"./instrument/MonoSynth\");\nrequire(\"./instrument/NoiseSynth\");\nrequire(\"./instrument/PluckSynth\");\nrequire(\"./instrument/PolySynth\");\nrequire(\"./instrument/Sampler\");\nrequire(\"./instrument/Synth\");\nrequire(\"./signal/Abs\");\nrequire(\"./signal/Add\");\nrequire(\"./signal/AudioToGain\");\nrequire(\"./signal/EqualPowerGain\");\nrequire(\"./signal/GainToAudio\");\nrequire(\"./signal/GreaterThan\");\nrequire(\"./signal/GreaterThanZero\");\nrequire(\"./signal/Modulo\");\nrequire(\"./signal/Multiply\");\nrequire(\"./signal/Negate\");\nrequire(\"./signal/Normalize\");\nrequire(\"./signal/Pow\");\nrequire(\"./signal/Scale\");\nrequire(\"./signal/ScaleExp\");\nrequire(\"./signal/Signal\");\nrequire(\"./signal/SignalBase\");\nrequire(\"./signal/Subtract\");\nrequire(\"./signal/TickSignal\");\nrequire(\"./signal/TransportTimelineSignal\");\nrequire(\"./signal/WaveShaper\");\nrequire(\"./signal/Zero\");\nrequire(\"./source/AMOscillator\");\nrequire(\"./source/BufferSource\");\nrequire(\"./source/FatOscillator\");\nrequire(\"./source/FMOscillator\");\nrequire(\"./source/GrainPlayer\");\nrequire(\"./source/Noise\");\nrequire(\"./source/OmniOscillator\");\nrequire(\"./source/Oscillator\");\nrequire(\"./source/OscillatorNode\");\nrequire(\"./source/Player\");\nrequire(\"./source/Players\");\nrequire(\"./source/PulseOscillator\");\nrequire(\"./source/PWMOscillator\");\nrequire(\"./source/Source\");\nrequire(\"./source/TickSource\");\nrequire(\"./source/UserMedia\");\nrequire(\"./type/Frequency\");\nrequire(\"./type/Midi\");\nrequire(\"./type/Ticks\");\nrequire(\"./type/Time\");\nrequire(\"./type/TimeBase\");\nrequire(\"./type/TransportTime\");\nrequire(\"./type/Type\");\nmodule.exports = require(\"./core/Tone\").default;\n"],"sourceRoot":""}