tone 14.8.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +313 -0
- package/LICENSE.md +21 -0
- package/README.md +255 -0
- package/Tone/classes.ts +7 -0
- package/Tone/component/analysis/Analyser.test.ts +78 -0
- package/Tone/component/analysis/Analyser.ts +168 -0
- package/Tone/component/analysis/DCMeter.test.ts +34 -0
- package/Tone/component/analysis/DCMeter.ts +38 -0
- package/Tone/component/analysis/FFT.test.ts +83 -0
- package/Tone/component/analysis/FFT.ts +92 -0
- package/Tone/component/analysis/Follower.test.ts +111 -0
- package/Tone/component/analysis/Follower.ts +85 -0
- package/Tone/component/analysis/Meter.test.ts +91 -0
- package/Tone/component/analysis/Meter.ts +123 -0
- package/Tone/component/analysis/MeterBase.ts +45 -0
- package/Tone/component/analysis/Waveform.test.ts +49 -0
- package/Tone/component/analysis/Waveform.ts +57 -0
- package/Tone/component/channel/Channel.test.ts +77 -0
- package/Tone/component/channel/Channel.ts +178 -0
- package/Tone/component/channel/CrossFade.test.ts +57 -0
- package/Tone/component/channel/CrossFade.ts +143 -0
- package/Tone/component/channel/Merge.test.ts +59 -0
- package/Tone/component/channel/Merge.ts +62 -0
- package/Tone/component/channel/MidSideMerge.test.ts +28 -0
- package/Tone/component/channel/MidSideMerge.ts +105 -0
- package/Tone/component/channel/MidSideSplit.test.ts +79 -0
- package/Tone/component/channel/MidSideSplit.ts +90 -0
- package/Tone/component/channel/Mono.test.ts +43 -0
- package/Tone/component/channel/Mono.ts +55 -0
- package/Tone/component/channel/MultibandSplit.test.ts +66 -0
- package/Tone/component/channel/MultibandSplit.ts +166 -0
- package/Tone/component/channel/PanVol.test.ts +58 -0
- package/Tone/component/channel/PanVol.ts +110 -0
- package/Tone/component/channel/Panner.test.ts +86 -0
- package/Tone/component/channel/Panner.ts +89 -0
- package/Tone/component/channel/Panner3D.test.ts +77 -0
- package/Tone/component/channel/Panner3D.ts +234 -0
- package/Tone/component/channel/Recorder.test.ts +119 -0
- package/Tone/component/channel/Recorder.ts +162 -0
- package/Tone/component/channel/Solo.test.ts +138 -0
- package/Tone/component/channel/Solo.ts +148 -0
- package/Tone/component/channel/Split.test.ts +62 -0
- package/Tone/component/channel/Split.ts +51 -0
- package/Tone/component/channel/Volume.test.ts +129 -0
- package/Tone/component/channel/Volume.ts +109 -0
- package/Tone/component/dynamics/Compressor.test.ts +85 -0
- package/Tone/component/dynamics/Compressor.ts +163 -0
- package/Tone/component/dynamics/Gate.test.ts +72 -0
- package/Tone/component/dynamics/Gate.ts +110 -0
- package/Tone/component/dynamics/Limiter.test.ts +43 -0
- package/Tone/component/dynamics/Limiter.ts +78 -0
- package/Tone/component/dynamics/MidSideCompressor.test.ts +59 -0
- package/Tone/component/dynamics/MidSideCompressor.ts +87 -0
- package/Tone/component/dynamics/MultibandCompressor.test.ts +54 -0
- package/Tone/component/dynamics/MultibandCompressor.ts +130 -0
- package/Tone/component/envelope/AmplitudeEnvelope.test.ts +92 -0
- package/Tone/component/envelope/AmplitudeEnvelope.ts +65 -0
- package/Tone/component/envelope/Envelope.test.ts +834 -0
- package/Tone/component/envelope/Envelope.ts +623 -0
- package/Tone/component/envelope/FrequencyEnvelope.test.ts +92 -0
- package/Tone/component/envelope/FrequencyEnvelope.ts +134 -0
- package/Tone/component/filter/BiquadFilter.test.ts +94 -0
- package/Tone/component/filter/BiquadFilter.ts +158 -0
- package/Tone/component/filter/Convolver.test.ts +106 -0
- package/Tone/component/filter/Convolver.ts +134 -0
- package/Tone/component/filter/EQ3.test.ts +60 -0
- package/Tone/component/filter/EQ3.ts +163 -0
- package/Tone/component/filter/FeedbackCombFilter.test.ts +80 -0
- package/Tone/component/filter/FeedbackCombFilter.ts +105 -0
- package/Tone/component/filter/FeedbackCombFilter.worklet.ts +39 -0
- package/Tone/component/filter/Filter.test.ts +114 -0
- package/Tone/component/filter/Filter.ts +202 -0
- package/Tone/component/filter/LowpassCombFilter.test.ts +75 -0
- package/Tone/component/filter/LowpassCombFilter.ts +100 -0
- package/Tone/component/filter/OnePoleFilter.test.ts +90 -0
- package/Tone/component/filter/OnePoleFilter.ts +146 -0
- package/Tone/component/filter/PhaseShiftAllpass.test.ts +71 -0
- package/Tone/component/filter/PhaseShiftAllpass.ts +81 -0
- package/Tone/component/index.ts +39 -0
- package/Tone/core/Global.ts +73 -0
- package/Tone/core/Tone.ts +107 -0
- package/Tone/core/clock/Clock.test.ts +663 -0
- package/Tone/core/clock/Clock.ts +317 -0
- package/Tone/core/clock/TickParam.test.ts +15 -0
- package/Tone/core/clock/TickParam.ts +271 -0
- package/Tone/core/clock/TickSignal.test.ts +455 -0
- package/Tone/core/clock/TickSignal.ts +94 -0
- package/Tone/core/clock/TickSource.test.ts +655 -0
- package/Tone/core/clock/TickSource.ts +338 -0
- package/Tone/core/clock/Ticker.test.ts +86 -0
- package/Tone/core/clock/Ticker.ts +149 -0
- package/Tone/core/clock/Transport.test.ts +972 -0
- package/Tone/core/clock/Transport.ts +731 -0
- package/Tone/core/clock/TransportEvent.test.ts +45 -0
- package/Tone/core/clock/TransportEvent.ts +105 -0
- package/Tone/core/clock/TransportRepeatEvent.test.ts +43 -0
- package/Tone/core/clock/TransportRepeatEvent.ts +150 -0
- package/Tone/core/context/AbstractParam.ts +260 -0
- package/Tone/core/context/AudioContext.ts +60 -0
- package/Tone/core/context/BaseContext.ts +162 -0
- package/Tone/core/context/Context.test.ts +358 -0
- package/Tone/core/context/Context.ts +628 -0
- package/Tone/core/context/ContextInitialization.ts +42 -0
- package/Tone/core/context/Delay.test.ts +105 -0
- package/Tone/core/context/Delay.ts +103 -0
- package/Tone/core/context/Destination.test.ts +76 -0
- package/Tone/core/context/Destination.ts +128 -0
- package/Tone/core/context/DummyContext.test.ts +47 -0
- package/Tone/core/context/DummyContext.ts +201 -0
- package/Tone/core/context/Gain.test.ts +75 -0
- package/Tone/core/context/Gain.ts +90 -0
- package/Tone/core/context/Listener.test.ts +22 -0
- package/Tone/core/context/Listener.ts +117 -0
- package/Tone/core/context/Offline.test.ts +79 -0
- package/Tone/core/context/Offline.ts +65 -0
- package/Tone/core/context/OfflineContext.test.ts +64 -0
- package/Tone/core/context/OfflineContext.ts +118 -0
- package/Tone/core/context/Param.test.ts +607 -0
- package/Tone/core/context/Param.ts +541 -0
- package/Tone/core/context/ToneAudioBuffer.test.ts +360 -0
- package/Tone/core/context/ToneAudioBuffer.ts +412 -0
- package/Tone/core/context/ToneAudioBuffers.test.ts +159 -0
- package/Tone/core/context/ToneAudioBuffers.ts +167 -0
- package/Tone/core/context/ToneAudioNode.test.ts +345 -0
- package/Tone/core/context/ToneAudioNode.ts +396 -0
- package/Tone/core/context/ToneWithContext.ts +205 -0
- package/Tone/core/index.ts +38 -0
- package/Tone/core/type/Conversions.test.ts +34 -0
- package/Tone/core/type/Conversions.ts +78 -0
- package/Tone/core/type/Frequency.test.ts +220 -0
- package/Tone/core/type/Frequency.ts +249 -0
- package/Tone/core/type/Midi.test.ts +137 -0
- package/Tone/core/type/Midi.ts +82 -0
- package/Tone/core/type/NoteUnits.ts +36 -0
- package/Tone/core/type/Ticks.test.ts +190 -0
- package/Tone/core/type/Ticks.ts +69 -0
- package/Tone/core/type/Time.test.ts +181 -0
- package/Tone/core/type/Time.ts +156 -0
- package/Tone/core/type/TimeBase.ts +324 -0
- package/Tone/core/type/TransportTime.test.ts +184 -0
- package/Tone/core/type/TransportTime.ts +34 -0
- package/Tone/core/type/Units.ts +204 -0
- package/Tone/core/util/AdvancedTypeCheck.ts +40 -0
- package/Tone/core/util/Debug.test.ts +74 -0
- package/Tone/core/util/Debug.ts +63 -0
- package/Tone/core/util/Decorator.ts +51 -0
- package/Tone/core/util/Defaults.ts +123 -0
- package/Tone/core/util/Draw.test.ts +72 -0
- package/Tone/core/util/Draw.ts +125 -0
- package/Tone/core/util/Emitter.test.ts +109 -0
- package/Tone/core/util/Emitter.ts +125 -0
- package/Tone/core/util/Interface.ts +45 -0
- package/Tone/core/util/IntervalTimeline.test.ts +465 -0
- package/Tone/core/util/IntervalTimeline.ts +569 -0
- package/Tone/core/util/Math.ts +40 -0
- package/Tone/core/util/StateTimeline.test.ts +103 -0
- package/Tone/core/util/StateTimeline.ts +96 -0
- package/Tone/core/util/Timeline.test.ts +606 -0
- package/Tone/core/util/Timeline.ts +399 -0
- package/Tone/core/util/TimelineValue.test.ts +29 -0
- package/Tone/core/util/TimelineValue.ts +56 -0
- package/Tone/core/util/TypeCheck.ts +65 -0
- package/Tone/core/util/global.d.ts +7 -0
- package/Tone/core/worklet/DelayLine.worklet.ts +49 -0
- package/Tone/core/worklet/SingleIOProcessor.worklet.ts +73 -0
- package/Tone/core/worklet/ToneAudioWorklet.ts +76 -0
- package/Tone/core/worklet/ToneAudioWorkletProcessor.worklet.ts +35 -0
- package/Tone/core/worklet/WorkletGlobalScope.ts +26 -0
- package/Tone/effect/AutoFilter.test.ts +113 -0
- package/Tone/effect/AutoFilter.ts +102 -0
- package/Tone/effect/AutoPanner.test.ts +90 -0
- package/Tone/effect/AutoPanner.ts +63 -0
- package/Tone/effect/AutoWah.test.ts +61 -0
- package/Tone/effect/AutoWah.ts +208 -0
- package/Tone/effect/BitCrusher.test.ts +42 -0
- package/Tone/effect/BitCrusher.ts +129 -0
- package/Tone/effect/BitCrusher.worklet.ts +27 -0
- package/Tone/effect/Chebyshev.test.ts +49 -0
- package/Tone/effect/Chebyshev.ts +123 -0
- package/Tone/effect/Chorus.test.ts +87 -0
- package/Tone/effect/Chorus.ts +225 -0
- package/Tone/effect/Distortion.test.ts +41 -0
- package/Tone/effect/Distortion.ts +98 -0
- package/Tone/effect/Effect.ts +88 -0
- package/Tone/effect/FeedbackDelay.test.ts +75 -0
- package/Tone/effect/FeedbackDelay.ts +73 -0
- package/Tone/effect/FeedbackEffect.ts +68 -0
- package/Tone/effect/Freeverb.test.ts +45 -0
- package/Tone/effect/Freeverb.ts +137 -0
- package/Tone/effect/FrequencyShifter.test.ts +55 -0
- package/Tone/effect/FrequencyShifter.ts +155 -0
- package/Tone/effect/JCReverb.test.ts +41 -0
- package/Tone/effect/JCReverb.ts +130 -0
- package/Tone/effect/LFOEffect.ts +115 -0
- package/Tone/effect/MidSideEffect.ts +93 -0
- package/Tone/effect/Phaser.test.ts +44 -0
- package/Tone/effect/Phaser.ts +187 -0
- package/Tone/effect/PingPongDelay.test.ts +41 -0
- package/Tone/effect/PingPongDelay.ts +105 -0
- package/Tone/effect/PitchShift.test.ts +66 -0
- package/Tone/effect/PitchShift.ts +218 -0
- package/Tone/effect/Reverb.test.ts +75 -0
- package/Tone/effect/Reverb.ts +145 -0
- package/Tone/effect/StereoEffect.ts +99 -0
- package/Tone/effect/StereoFeedbackEffect.ts +91 -0
- package/Tone/effect/StereoWidener.test.ts +41 -0
- package/Tone/effect/StereoWidener.ts +112 -0
- package/Tone/effect/StereoXFeedbackEffect.ts +37 -0
- package/Tone/effect/Tremolo.test.ts +88 -0
- package/Tone/effect/Tremolo.ts +191 -0
- package/Tone/effect/Vibrato.test.ts +52 -0
- package/Tone/effect/Vibrato.ts +104 -0
- package/Tone/effect/index.ts +18 -0
- package/Tone/event/Loop.test.ts +334 -0
- package/Tone/event/Loop.ts +210 -0
- package/Tone/event/Part.test.ts +848 -0
- package/Tone/event/Part.ts +473 -0
- package/Tone/event/Pattern.test.ts +137 -0
- package/Tone/event/Pattern.ts +121 -0
- package/Tone/event/PatternGenerator.test.ts +95 -0
- package/Tone/event/PatternGenerator.ts +176 -0
- package/Tone/event/Sequence.test.ts +453 -0
- package/Tone/event/Sequence.ts +300 -0
- package/Tone/event/ToneEvent.test.ts +485 -0
- package/Tone/event/ToneEvent.ts +392 -0
- package/Tone/event/index.ts +5 -0
- package/Tone/fromContext.test.ts +29 -0
- package/Tone/fromContext.ts +77 -0
- package/Tone/index.test.ts +54 -0
- package/Tone/index.ts +116 -0
- package/Tone/instrument/AMSynth.test.ts +79 -0
- package/Tone/instrument/AMSynth.ts +51 -0
- package/Tone/instrument/DuoSynth.test.ts +95 -0
- package/Tone/instrument/DuoSynth.ts +216 -0
- package/Tone/instrument/FMSynth.test.ts +72 -0
- package/Tone/instrument/FMSynth.ts +65 -0
- package/Tone/instrument/Instrument.ts +180 -0
- package/Tone/instrument/MembraneSynth.test.ts +74 -0
- package/Tone/instrument/MembraneSynth.ts +96 -0
- package/Tone/instrument/MetalSynth.test.ts +66 -0
- package/Tone/instrument/MetalSynth.ts +272 -0
- package/Tone/instrument/ModulationSynth.ts +217 -0
- package/Tone/instrument/MonoSynth.test.ts +88 -0
- package/Tone/instrument/MonoSynth.ts +177 -0
- package/Tone/instrument/Monophonic.ts +135 -0
- package/Tone/instrument/NoiseSynth.test.ts +82 -0
- package/Tone/instrument/NoiseSynth.ts +127 -0
- package/Tone/instrument/PluckSynth.test.ts +62 -0
- package/Tone/instrument/PluckSynth.ts +127 -0
- package/Tone/instrument/PolySynth.test.ts +298 -0
- package/Tone/instrument/PolySynth.ts +393 -0
- package/Tone/instrument/Sampler.test.ts +275 -0
- package/Tone/instrument/Sampler.ts +329 -0
- package/Tone/instrument/Synth.test.ts +132 -0
- package/Tone/instrument/Synth.ts +141 -0
- package/Tone/instrument/index.ts +11 -0
- package/Tone/signal/Abs.test.ts +42 -0
- package/Tone/signal/Abs.ts +53 -0
- package/Tone/signal/Add.test.ts +60 -0
- package/Tone/signal/Add.ts +63 -0
- package/Tone/signal/AudioToGain.test.ts +53 -0
- package/Tone/signal/AudioToGain.ts +40 -0
- package/Tone/signal/GainToAudio.test.ts +41 -0
- package/Tone/signal/GainToAudio.ts +40 -0
- package/Tone/signal/GreaterThan.test.ts +81 -0
- package/Tone/signal/GreaterThan.ts +88 -0
- package/Tone/signal/GreaterThanZero.test.ts +49 -0
- package/Tone/signal/GreaterThanZero.ts +67 -0
- package/Tone/signal/Multiply.test.ts +46 -0
- package/Tone/signal/Multiply.ts +85 -0
- package/Tone/signal/Negate.test.ts +30 -0
- package/Tone/signal/Negate.ts +41 -0
- package/Tone/signal/Pow.test.ts +40 -0
- package/Tone/signal/Pow.ts +84 -0
- package/Tone/signal/Scale.test.ts +58 -0
- package/Tone/signal/Scale.ts +119 -0
- package/Tone/signal/ScaleExp.test.ts +49 -0
- package/Tone/signal/ScaleExp.ts +69 -0
- package/Tone/signal/Signal.test.ts +519 -0
- package/Tone/signal/Signal.ts +226 -0
- package/Tone/signal/SignalOperator.ts +21 -0
- package/Tone/signal/Subtract.test.ts +60 -0
- package/Tone/signal/Subtract.ts +74 -0
- package/Tone/signal/SyncedSignal.test.ts +245 -0
- package/Tone/signal/SyncedSignal.ts +172 -0
- package/Tone/signal/ToneConstantSource.test.ts +202 -0
- package/Tone/signal/ToneConstantSource.ts +90 -0
- package/Tone/signal/WaveShaper.test.ts +95 -0
- package/Tone/signal/WaveShaper.ts +136 -0
- package/Tone/signal/Zero.test.ts +25 -0
- package/Tone/signal/Zero.ts +45 -0
- package/Tone/signal/index.ts +16 -0
- package/Tone/source/Noise.test.ts +121 -0
- package/Tone/source/Noise.ts +287 -0
- package/Tone/source/OneShotSource.ts +260 -0
- package/Tone/source/Source.test.ts +408 -0
- package/Tone/source/Source.ts +339 -0
- package/Tone/source/UserMedia.test.ts +177 -0
- package/Tone/source/UserMedia.ts +260 -0
- package/Tone/source/buffer/GrainPlayer.test.ts +235 -0
- package/Tone/source/buffer/GrainPlayer.ts +322 -0
- package/Tone/source/buffer/Player.test.ts +651 -0
- package/Tone/source/buffer/Player.ts +440 -0
- package/Tone/source/buffer/Players.test.ts +288 -0
- package/Tone/source/buffer/Players.ts +235 -0
- package/Tone/source/buffer/ToneBufferSource.test.ts +578 -0
- package/Tone/source/buffer/ToneBufferSource.ts +253 -0
- package/Tone/source/index.ts +15 -0
- package/Tone/source/oscillator/AMOscillator.test.ts +69 -0
- package/Tone/source/oscillator/AMOscillator.ts +222 -0
- package/Tone/source/oscillator/FMOscillator.test.ts +85 -0
- package/Tone/source/oscillator/FMOscillator.ts +236 -0
- package/Tone/source/oscillator/FatOscillator.test.ts +91 -0
- package/Tone/source/oscillator/FatOscillator.ts +255 -0
- package/Tone/source/oscillator/LFO.test.ts +234 -0
- package/Tone/source/oscillator/LFO.ts +332 -0
- package/Tone/source/oscillator/OmniOscillator.test.ts +303 -0
- package/Tone/source/oscillator/OmniOscillator.ts +428 -0
- package/Tone/source/oscillator/Oscillator.test.ts +278 -0
- package/Tone/source/oscillator/Oscillator.ts +448 -0
- package/Tone/source/oscillator/OscillatorInterface.ts +462 -0
- package/Tone/source/oscillator/PWMOscillator.test.ts +49 -0
- package/Tone/source/oscillator/PWMOscillator.ts +190 -0
- package/Tone/source/oscillator/PulseOscillator.test.ts +126 -0
- package/Tone/source/oscillator/PulseOscillator.ts +225 -0
- package/Tone/source/oscillator/ToneOscillatorNode.test.ts +241 -0
- package/Tone/source/oscillator/ToneOscillatorNode.ts +131 -0
- package/Tone/version.ts +1 -0
- package/build/Tone.js +22 -0
- package/build/Tone.js.map +1 -0
- package/build/esm/classes.d.ts +7 -0
- package/build/esm/classes.js +8 -0
- package/build/esm/classes.js.map +1 -0
- package/build/esm/component/analysis/Analyser.d.ts +77 -0
- package/build/esm/component/analysis/Analyser.js +121 -0
- package/build/esm/component/analysis/Analyser.js.map +1 -0
- package/build/esm/component/analysis/DCMeter.d.ts +23 -0
- package/build/esm/component/analysis/DCMeter.js +31 -0
- package/build/esm/component/analysis/DCMeter.js.map +1 -0
- package/build/esm/component/analysis/FFT.d.ts +50 -0
- package/build/esm/component/analysis/FFT.js +65 -0
- package/build/esm/component/analysis/FFT.js.map +1 -0
- package/build/esm/component/analysis/Follower.d.ts +44 -0
- package/build/esm/component/analysis/Follower.js +51 -0
- package/build/esm/component/analysis/Follower.js.map +1 -0
- package/build/esm/component/analysis/Meter.d.ts +62 -0
- package/build/esm/component/analysis/Meter.js +90 -0
- package/build/esm/component/analysis/Meter.js.map +1 -0
- package/build/esm/component/analysis/MeterBase.d.ts +23 -0
- package/build/esm/component/analysis/MeterBase.js +23 -0
- package/build/esm/component/analysis/MeterBase.js.map +1 -0
- package/build/esm/component/analysis/Waveform.d.ts +32 -0
- package/build/esm/component/analysis/Waveform.js +38 -0
- package/build/esm/component/analysis/Waveform.js.map +1 -0
- package/build/esm/component/channel/Channel.d.ts +91 -0
- package/build/esm/component/channel/Channel.js +124 -0
- package/build/esm/component/channel/Channel.js.map +1 -0
- package/build/esm/component/channel/CrossFade.d.ts +80 -0
- package/build/esm/component/channel/CrossFade.js +106 -0
- package/build/esm/component/channel/CrossFade.js.map +1 -0
- package/build/esm/component/channel/Merge.d.ts +39 -0
- package/build/esm/component/channel/Merge.js +32 -0
- package/build/esm/component/channel/Merge.js.map +1 -0
- package/build/esm/component/channel/MidSideMerge.d.ts +52 -0
- package/build/esm/component/channel/MidSideMerge.js +53 -0
- package/build/esm/component/channel/MidSideMerge.js.map +1 -0
- package/build/esm/component/channel/MidSideSplit.d.ts +42 -0
- package/build/esm/component/channel/MidSideSplit.js +51 -0
- package/build/esm/component/channel/MidSideSplit.js.map +1 -0
- package/build/esm/component/channel/Mono.d.ts +26 -0
- package/build/esm/component/channel/Mono.js +30 -0
- package/build/esm/component/channel/Mono.js.map +1 -0
- package/build/esm/component/channel/MultibandSplit.d.ts +80 -0
- package/build/esm/component/channel/MultibandSplit.js +121 -0
- package/build/esm/component/channel/MultibandSplit.js.map +1 -0
- package/build/esm/component/channel/PanVol.d.ts +53 -0
- package/build/esm/component/channel/PanVol.js +61 -0
- package/build/esm/component/channel/PanVol.js.map +1 -0
- package/build/esm/component/channel/Panner.d.ts +49 -0
- package/build/esm/component/channel/Panner.js +55 -0
- package/build/esm/component/channel/Panner.js.map +1 -0
- package/build/esm/component/channel/Panner3D.d.ts +98 -0
- package/build/esm/component/channel/Panner3D.js +177 -0
- package/build/esm/component/channel/Panner3D.js.map +1 -0
- package/build/esm/component/channel/Recorder.d.ts +77 -0
- package/build/esm/component/channel/Recorder.js +131 -0
- package/build/esm/component/channel/Recorder.js.map +1 -0
- package/build/esm/component/channel/Solo.d.ts +68 -0
- package/build/esm/component/channel/Solo.js +121 -0
- package/build/esm/component/channel/Solo.js.map +1 -0
- package/build/esm/component/channel/Split.d.ts +29 -0
- package/build/esm/component/channel/Split.js +30 -0
- package/build/esm/component/channel/Split.js.map +1 -0
- package/build/esm/component/channel/Volume.d.ts +60 -0
- package/build/esm/component/channel/Volume.js +66 -0
- package/build/esm/component/channel/Volume.js.map +1 -0
- package/build/esm/component/dynamics/Compressor.d.ts +73 -0
- package/build/esm/component/dynamics/Compressor.js +99 -0
- package/build/esm/component/dynamics/Compressor.js.map +1 -0
- package/build/esm/component/dynamics/Gate.d.ts +53 -0
- package/build/esm/component/dynamics/Gate.js +72 -0
- package/build/esm/component/dynamics/Gate.js.map +1 -0
- package/build/esm/component/dynamics/Limiter.d.ts +39 -0
- package/build/esm/component/dynamics/Limiter.js +51 -0
- package/build/esm/component/dynamics/Limiter.js.map +1 -0
- package/build/esm/component/dynamics/MidSideCompressor.d.ts +36 -0
- package/build/esm/component/dynamics/MidSideCompressor.js +52 -0
- package/build/esm/component/dynamics/MidSideCompressor.js.map +1 -0
- package/build/esm/component/dynamics/MultibandCompressor.d.ts +57 -0
- package/build/esm/component/dynamics/MultibandCompressor.js +79 -0
- package/build/esm/component/dynamics/MultibandCompressor.js.map +1 -0
- package/build/esm/component/envelope/AmplitudeEnvelope.d.ts +46 -0
- package/build/esm/component/envelope/AmplitudeEnvelope.js +49 -0
- package/build/esm/component/envelope/AmplitudeEnvelope.js.map +1 -0
- package/build/esm/component/envelope/Envelope.d.ts +302 -0
- package/build/esm/component/envelope/Envelope.js +470 -0
- package/build/esm/component/envelope/Envelope.js.map +1 -0
- package/build/esm/component/envelope/FrequencyEnvelope.d.ts +71 -0
- package/build/esm/component/envelope/FrequencyEnvelope.js +91 -0
- package/build/esm/component/envelope/FrequencyEnvelope.js.map +1 -0
- package/build/esm/component/filter/BiquadFilter.d.ts +64 -0
- package/build/esm/component/filter/BiquadFilter.js +101 -0
- package/build/esm/component/filter/BiquadFilter.js.map +1 -0
- package/build/esm/component/filter/Convolver.d.ts +59 -0
- package/build/esm/component/filter/Convolver.js +104 -0
- package/build/esm/component/filter/Convolver.js.map +1 -0
- package/build/esm/component/filter/EQ3.d.ts +77 -0
- package/build/esm/component/filter/EQ3.js +81 -0
- package/build/esm/component/filter/EQ3.js.map +1 -0
- package/build/esm/component/filter/FeedbackCombFilter.d.ts +45 -0
- package/build/esm/component/filter/FeedbackCombFilter.js +72 -0
- package/build/esm/component/filter/FeedbackCombFilter.js.map +1 -0
- package/build/esm/component/filter/FeedbackCombFilter.worklet.d.ts +3 -0
- package/build/esm/component/filter/FeedbackCombFilter.worklet.js +37 -0
- package/build/esm/component/filter/FeedbackCombFilter.worklet.js.map +1 -0
- package/build/esm/component/filter/Filter.d.ts +79 -0
- package/build/esm/component/filter/Filter.js +150 -0
- package/build/esm/component/filter/Filter.js.map +1 -0
- package/build/esm/component/filter/LowpassCombFilter.d.ts +50 -0
- package/build/esm/component/filter/LowpassCombFilter.js +53 -0
- package/build/esm/component/filter/LowpassCombFilter.js.map +1 -0
- package/build/esm/component/filter/OnePoleFilter.d.ts +64 -0
- package/build/esm/component/filter/OnePoleFilter.js +104 -0
- package/build/esm/component/filter/OnePoleFilter.js.map +1 -0
- package/build/esm/component/filter/PhaseShiftAllpass.d.ts +40 -0
- package/build/esm/component/filter/PhaseShiftAllpass.js +54 -0
- package/build/esm/component/filter/PhaseShiftAllpass.js.map +1 -0
- package/build/esm/component/index.d.ts +35 -0
- package/build/esm/component/index.js +36 -0
- package/build/esm/component/index.js.map +1 -0
- package/build/esm/core/Global.d.ts +26 -0
- package/build/esm/core/Global.js +69 -0
- package/build/esm/core/Global.js.map +1 -0
- package/build/esm/core/Tone.d.ts +60 -0
- package/build/esm/core/Tone.js +87 -0
- package/build/esm/core/Tone.js.map +1 -0
- package/build/esm/core/clock/Clock.d.ts +156 -0
- package/build/esm/core/clock/Clock.js +251 -0
- package/build/esm/core/clock/Clock.js.map +1 -0
- package/build/esm/core/clock/TickParam.d.ts +97 -0
- package/build/esm/core/clock/TickParam.js +237 -0
- package/build/esm/core/clock/TickParam.js.map +1 -0
- package/build/esm/core/clock/TickSignal.d.ts +43 -0
- package/build/esm/core/clock/TickSignal.js +64 -0
- package/build/esm/core/clock/TickSignal.js.map +1 -0
- package/build/esm/core/clock/TickSource.d.ts +115 -0
- package/build/esm/core/clock/TickSource.js +284 -0
- package/build/esm/core/clock/TickSource.js.map +1 -0
- package/build/esm/core/clock/Ticker.d.ts +59 -0
- package/build/esm/core/clock/Ticker.js +110 -0
- package/build/esm/core/clock/Ticker.js.map +1 -0
- package/build/esm/core/clock/Transport.d.ts +331 -0
- package/build/esm/core/clock/Transport.js +591 -0
- package/build/esm/core/clock/Transport.js.map +1 -0
- package/build/esm/core/clock/TransportEvent.d.ts +62 -0
- package/build/esm/core/clock/TransportEvent.js +66 -0
- package/build/esm/core/clock/TransportEvent.js.map +1 -0
- package/build/esm/core/clock/TransportRepeatEvent.d.ts +70 -0
- package/build/esm/core/clock/TransportRepeatEvent.js +110 -0
- package/build/esm/core/clock/TransportRepeatEvent.js.map +1 -0
- package/build/esm/core/context/AbstractParam.d.ts +239 -0
- package/build/esm/core/context/AbstractParam.js +6 -0
- package/build/esm/core/context/AbstractParam.js.map +1 -0
- package/build/esm/core/context/AudioContext.d.ts +36 -0
- package/build/esm/core/context/AudioContext.js +38 -0
- package/build/esm/core/context/AudioContext.js.map +1 -0
- package/build/esm/core/context/BaseContext.d.ts +56 -0
- package/build/esm/core/context/BaseContext.js +16 -0
- package/build/esm/core/context/BaseContext.js.map +1 -0
- package/build/esm/core/context/Context.d.ts +255 -0
- package/build/esm/core/context/Context.js +474 -0
- package/build/esm/core/context/Context.js.map +1 -0
- package/build/esm/core/context/ContextInitialization.d.ts +15 -0
- package/build/esm/core/context/ContextInitialization.js +35 -0
- package/build/esm/core/context/ContextInitialization.js.map +1 -0
- package/build/esm/core/context/Delay.d.ts +58 -0
- package/build/esm/core/context/Delay.js +58 -0
- package/build/esm/core/context/Delay.js.map +1 -0
- package/build/esm/core/context/Destination.d.ts +73 -0
- package/build/esm/core/context/Destination.js +105 -0
- package/build/esm/core/context/Destination.js.map +1 -0
- package/build/esm/core/context/DummyContext.d.ts +54 -0
- package/build/esm/core/context/DummyContext.js +138 -0
- package/build/esm/core/context/DummyContext.js.map +1 -0
- package/build/esm/core/context/Gain.d.ts +53 -0
- package/build/esm/core/context/Gain.js +58 -0
- package/build/esm/core/context/Gain.js.map +1 -0
- package/build/esm/core/context/Listener.d.ts +38 -0
- package/build/esm/core/context/Listener.js +87 -0
- package/build/esm/core/context/Listener.js.map +1 -0
- package/build/esm/core/context/Offline.d.ts +37 -0
- package/build/esm/core/context/Offline.js +56 -0
- package/build/esm/core/context/Offline.js.map +1 -0
- package/build/esm/core/context/OfflineContext.d.ts +58 -0
- package/build/esm/core/context/OfflineContext.js +87 -0
- package/build/esm/core/context/OfflineContext.js.map +1 -0
- package/build/esm/core/context/Param.d.ts +132 -0
- package/build/esm/core/context/Param.js +446 -0
- package/build/esm/core/context/Param.js.map +1 -0
- package/build/esm/core/context/ToneAudioBuffer.d.ts +162 -0
- package/build/esm/core/context/ToneAudioBuffer.js +364 -0
- package/build/esm/core/context/ToneAudioBuffer.js.map +1 -0
- package/build/esm/core/context/ToneAudioBuffers.d.ts +89 -0
- package/build/esm/core/context/ToneAudioBuffers.js +119 -0
- package/build/esm/core/context/ToneAudioBuffers.js.map +1 -0
- package/build/esm/core/context/ToneAudioNode.d.ts +173 -0
- package/build/esm/core/context/ToneAudioNode.js +342 -0
- package/build/esm/core/context/ToneAudioNode.js.map +1 -0
- package/build/esm/core/context/ToneWithContext.d.ts +108 -0
- package/build/esm/core/context/ToneWithContext.js +170 -0
- package/build/esm/core/context/ToneWithContext.js.map +1 -0
- package/build/esm/core/index.d.ts +28 -0
- package/build/esm/core/index.js +33 -0
- package/build/esm/core/index.js.map +1 -0
- package/build/esm/core/type/Conversions.d.ts +44 -0
- package/build/esm/core/type/Conversions.js +68 -0
- package/build/esm/core/type/Conversions.js.map +1 -0
- package/build/esm/core/type/Frequency.d.ts +101 -0
- package/build/esm/core/type/Frequency.js +225 -0
- package/build/esm/core/type/Frequency.js.map +1 -0
- package/build/esm/core/type/Midi.d.ts +53 -0
- package/build/esm/core/type/Midi.js +73 -0
- package/build/esm/core/type/Midi.js.map +1 -0
- package/build/esm/core/type/NoteUnits.d.ts +12 -0
- package/build/esm/core/type/NoteUnits.js +3 -0
- package/build/esm/core/type/NoteUnits.js.map +1 -0
- package/build/esm/core/type/Ticks.d.ts +44 -0
- package/build/esm/core/type/Ticks.js +61 -0
- package/build/esm/core/type/Ticks.js.map +1 -0
- package/build/esm/core/type/Time.d.ts +69 -0
- package/build/esm/core/type/Time.js +147 -0
- package/build/esm/core/type/Time.js.map +1 -0
- package/build/esm/core/type/TimeBase.d.ts +120 -0
- package/build/esm/core/type/TimeBase.js +251 -0
- package/build/esm/core/type/TimeBase.js.map +1 -0
- package/build/esm/core/type/TransportTime.d.ts +25 -0
- package/build/esm/core/type/TransportTime.js +32 -0
- package/build/esm/core/type/TransportTime.js.map +1 -0
- package/build/esm/core/type/Units.d.ts +176 -0
- package/build/esm/core/type/Units.js +2 -0
- package/build/esm/core/type/Units.js.map +1 -0
- package/build/esm/core/util/AdvancedTypeCheck.d.ts +21 -0
- package/build/esm/core/util/AdvancedTypeCheck.js +32 -0
- package/build/esm/core/util/AdvancedTypeCheck.js.map +1 -0
- package/build/esm/core/util/Debug.d.ts +34 -0
- package/build/esm/core/util/Debug.js +50 -0
- package/build/esm/core/util/Debug.js.map +1 -0
- package/build/esm/core/util/Decorator.d.ts +9 -0
- package/build/esm/core/util/Decorator.js +41 -0
- package/build/esm/core/util/Decorator.js.map +1 -0
- package/build/esm/core/util/Defaults.d.ts +32 -0
- package/build/esm/core/util/Defaults.js +99 -0
- package/build/esm/core/util/Defaults.js.map +1 -0
- package/build/esm/core/util/Draw.d.ts +67 -0
- package/build/esm/core/util/Draw.js +110 -0
- package/build/esm/core/util/Draw.js.map +1 -0
- package/build/esm/core/util/Emitter.d.ts +52 -0
- package/build/esm/core/util/Emitter.js +113 -0
- package/build/esm/core/util/Emitter.js.map +1 -0
- package/build/esm/core/util/Interface.d.ts +16 -0
- package/build/esm/core/util/Interface.js +32 -0
- package/build/esm/core/util/Interface.js.map +1 -0
- package/build/esm/core/util/IntervalTimeline.d.ts +106 -0
- package/build/esm/core/util/IntervalTimeline.js +539 -0
- package/build/esm/core/util/IntervalTimeline.js.map +1 -0
- package/build/esm/core/util/Math.d.ts +20 -0
- package/build/esm/core/util/Math.js +36 -0
- package/build/esm/core/util/Math.js.map +1 -0
- package/build/esm/core/util/StateTimeline.d.ts +47 -0
- package/build/esm/core/util/StateTimeline.js +78 -0
- package/build/esm/core/util/StateTimeline.js.map +1 -0
- package/build/esm/core/util/Timeline.d.ts +156 -0
- package/build/esm/core/util/Timeline.js +351 -0
- package/build/esm/core/util/Timeline.js.map +1 -0
- package/build/esm/core/util/TimelineValue.d.ts +28 -0
- package/build/esm/core/util/TimelineValue.js +41 -0
- package/build/esm/core/util/TimelineValue.js.map +1 -0
- package/build/esm/core/util/TypeCheck.d.ts +38 -0
- package/build/esm/core/util/TypeCheck.js +56 -0
- package/build/esm/core/util/TypeCheck.js.map +1 -0
- package/build/esm/core/worklet/DelayLine.worklet.d.ts +1 -0
- package/build/esm/core/worklet/DelayLine.worklet.js +48 -0
- package/build/esm/core/worklet/DelayLine.worklet.js.map +1 -0
- package/build/esm/core/worklet/SingleIOProcessor.worklet.d.ts +2 -0
- package/build/esm/core/worklet/SingleIOProcessor.worklet.js +72 -0
- package/build/esm/core/worklet/SingleIOProcessor.worklet.js.map +1 -0
- package/build/esm/core/worklet/ToneAudioWorklet.d.ts +35 -0
- package/build/esm/core/worklet/ToneAudioWorklet.js +40 -0
- package/build/esm/core/worklet/ToneAudioWorklet.js.map +1 -0
- package/build/esm/core/worklet/ToneAudioWorkletProcessor.worklet.d.ts +1 -0
- package/build/esm/core/worklet/ToneAudioWorkletProcessor.worklet.js +34 -0
- package/build/esm/core/worklet/ToneAudioWorkletProcessor.worklet.js.map +1 -0
- package/build/esm/core/worklet/WorkletGlobalScope.d.ts +12 -0
- package/build/esm/core/worklet/WorkletGlobalScope.js +24 -0
- package/build/esm/core/worklet/WorkletGlobalScope.js.map +1 -0
- package/build/esm/effect/AutoFilter.d.ts +51 -0
- package/build/esm/effect/AutoFilter.js +68 -0
- package/build/esm/effect/AutoFilter.js.map +1 -0
- package/build/esm/effect/AutoPanner.d.ts +31 -0
- package/build/esm/effect/AutoPanner.js +41 -0
- package/build/esm/effect/AutoPanner.js.map +1 -0
- package/build/esm/effect/AutoWah.d.ts +99 -0
- package/build/esm/effect/AutoWah.js +131 -0
- package/build/esm/effect/AutoWah.js.map +1 -0
- package/build/esm/effect/BitCrusher.d.ts +40 -0
- package/build/esm/effect/BitCrusher.js +85 -0
- package/build/esm/effect/BitCrusher.js.map +1 -0
- package/build/esm/effect/BitCrusher.worklet.d.ts +3 -0
- package/build/esm/effect/BitCrusher.worklet.js +25 -0
- package/build/esm/effect/BitCrusher.worklet.js.map +1 -0
- package/build/esm/effect/Chebyshev.d.ts +62 -0
- package/build/esm/effect/Chebyshev.js +95 -0
- package/build/esm/effect/Chebyshev.js.map +1 -0
- package/build/esm/effect/Chorus.d.ts +104 -0
- package/build/esm/effect/Chorus.js +157 -0
- package/build/esm/effect/Chorus.js.map +1 -0
- package/build/esm/effect/Distortion.d.ts +43 -0
- package/build/esm/effect/Distortion.js +69 -0
- package/build/esm/effect/Distortion.js.map +1 -0
- package/build/esm/effect/Effect.d.ts +49 -0
- package/build/esm/effect/Effect.js +70 -0
- package/build/esm/effect/Effect.js.map +1 -0
- package/build/esm/effect/FeedbackDelay.d.ts +37 -0
- package/build/esm/effect/FeedbackDelay.js +47 -0
- package/build/esm/effect/FeedbackDelay.js.map +1 -0
- package/build/esm/effect/FeedbackEffect.d.ts +34 -0
- package/build/esm/effect/FeedbackEffect.js +34 -0
- package/build/esm/effect/FeedbackEffect.js.map +1 -0
- package/build/esm/effect/Freeverb.d.ts +51 -0
- package/build/esm/effect/Freeverb.js +104 -0
- package/build/esm/effect/Freeverb.js.map +1 -0
- package/build/esm/effect/FrequencyShifter.d.ts +68 -0
- package/build/esm/effect/FrequencyShifter.js +88 -0
- package/build/esm/effect/FrequencyShifter.js.map +1 -0
- package/build/esm/effect/JCReverb.d.ts +46 -0
- package/build/esm/effect/JCReverb.js +97 -0
- package/build/esm/effect/JCReverb.js.map +1 -0
- package/build/esm/effect/LFOEffect.d.ts +58 -0
- package/build/esm/effect/LFOEffect.js +77 -0
- package/build/esm/effect/LFOEffect.js.map +1 -0
- package/build/esm/effect/MidSideEffect.d.ts +50 -0
- package/build/esm/effect/MidSideEffect.js +51 -0
- package/build/esm/effect/MidSideEffect.js.map +1 -0
- package/build/esm/effect/Phaser.d.ts +80 -0
- package/build/esm/effect/Phaser.js +119 -0
- package/build/esm/effect/Phaser.js.map +1 -0
- package/build/esm/effect/PingPongDelay.d.ts +48 -0
- package/build/esm/effect/PingPongDelay.js +66 -0
- package/build/esm/effect/PingPongDelay.js.map +1 -0
- package/build/esm/effect/PitchShift.d.ts +89 -0
- package/build/esm/effect/PitchShift.js +140 -0
- package/build/esm/effect/PitchShift.js.map +1 -0
- package/build/esm/effect/Reverb.d.ts +62 -0
- package/build/esm/effect/Reverb.js +111 -0
- package/build/esm/effect/Reverb.js.map +1 -0
- package/build/esm/effect/StereoEffect.d.ts +44 -0
- package/build/esm/effect/StereoEffect.js +61 -0
- package/build/esm/effect/StereoEffect.js.map +1 -0
- package/build/esm/effect/StereoFeedbackEffect.d.ts +39 -0
- package/build/esm/effect/StereoFeedbackEffect.js +49 -0
- package/build/esm/effect/StereoFeedbackEffect.js.map +1 -0
- package/build/esm/effect/StereoWidener.d.ts +50 -0
- package/build/esm/effect/StereoWidener.js +65 -0
- package/build/esm/effect/StereoWidener.js.map +1 -0
- package/build/esm/effect/StereoXFeedbackEffect.d.ts +21 -0
- package/build/esm/effect/StereoXFeedbackEffect.js +28 -0
- package/build/esm/effect/StereoXFeedbackEffect.js.map +1 -0
- package/build/esm/effect/Tremolo.d.ts +86 -0
- package/build/esm/effect/Tremolo.js +131 -0
- package/build/esm/effect/Tremolo.js.map +1 -0
- package/build/esm/effect/Vibrato.d.ts +48 -0
- package/build/esm/effect/Vibrato.js +61 -0
- package/build/esm/effect/Vibrato.js.map +1 -0
- package/build/esm/effect/index.d.ts +18 -0
- package/build/esm/effect/index.js +19 -0
- package/build/esm/effect/index.js.map +1 -0
- package/build/esm/event/Loop.d.ts +107 -0
- package/build/esm/event/Loop.js +164 -0
- package/build/esm/event/Loop.js.map +1 -0
- package/build/esm/event/Part.d.ts +193 -0
- package/build/esm/event/Part.js +401 -0
- package/build/esm/event/Part.js.map +1 -0
- package/build/esm/event/Pattern.d.ts +67 -0
- package/build/esm/event/Pattern.js +67 -0
- package/build/esm/event/Pattern.js.map +1 -0
- package/build/esm/event/PatternGenerator.d.ts +12 -0
- package/build/esm/event/PatternGenerator.js +165 -0
- package/build/esm/event/PatternGenerator.js.map +1 -0
- package/build/esm/event/Sequence.d.ts +127 -0
- package/build/esm/event/Sequence.js +247 -0
- package/build/esm/event/Sequence.js.map +1 -0
- package/build/esm/event/ToneEvent.d.ts +188 -0
- package/build/esm/event/ToneEvent.js +299 -0
- package/build/esm/event/ToneEvent.js.map +1 -0
- package/build/esm/event/index.d.ts +5 -0
- package/build/esm/event/index.js +6 -0
- package/build/esm/event/index.js.map +1 -0
- package/build/esm/fromContext.d.ts +26 -0
- package/build/esm/fromContext.js +41 -0
- package/build/esm/fromContext.js.map +1 -0
- package/build/esm/index.d.ts +86 -0
- package/build/esm/index.js +102 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/instrument/AMSynth.d.ts +25 -0
- package/build/esm/instrument/AMSynth.js +37 -0
- package/build/esm/instrument/AMSynth.js.map +1 -0
- package/build/esm/instrument/DuoSynth.d.ts +72 -0
- package/build/esm/instrument/DuoSynth.js +140 -0
- package/build/esm/instrument/DuoSynth.js.map +1 -0
- package/build/esm/instrument/FMSynth.d.ts +31 -0
- package/build/esm/instrument/FMSynth.js +45 -0
- package/build/esm/instrument/FMSynth.js.map +1 -0
- package/build/esm/instrument/Instrument.d.ts +100 -0
- package/build/esm/instrument/Instrument.js +127 -0
- package/build/esm/instrument/Instrument.js.map +1 -0
- package/build/esm/instrument/MembraneSynth.d.ts +47 -0
- package/build/esm/instrument/MembraneSynth.js +69 -0
- package/build/esm/instrument/MembraneSynth.js.map +1 -0
- package/build/esm/instrument/MetalSynth.d.ts +109 -0
- package/build/esm/instrument/MetalSynth.js +198 -0
- package/build/esm/instrument/MetalSynth.js.map +1 -0
- package/build/esm/instrument/ModulationSynth.d.ts +81 -0
- package/build/esm/instrument/ModulationSynth.js +122 -0
- package/build/esm/instrument/ModulationSynth.js.map +1 -0
- package/build/esm/instrument/MonoSynth.d.ts +76 -0
- package/build/esm/instrument/MonoSynth.js +113 -0
- package/build/esm/instrument/MonoSynth.js.map +1 -0
- package/build/esm/instrument/Monophonic.d.ts +82 -0
- package/build/esm/instrument/Monophonic.js +83 -0
- package/build/esm/instrument/Monophonic.js.map +1 -0
- package/build/esm/instrument/NoiseSynth.d.ts +51 -0
- package/build/esm/instrument/NoiseSynth.js +93 -0
- package/build/esm/instrument/NoiseSynth.js.map +1 -0
- package/build/esm/instrument/PluckSynth.d.ts +57 -0
- package/build/esm/instrument/PluckSynth.js +80 -0
- package/build/esm/instrument/PluckSynth.js.map +1 -0
- package/build/esm/instrument/PolySynth.d.ts +176 -0
- package/build/esm/instrument/PolySynth.js +302 -0
- package/build/esm/instrument/PolySynth.js.map +1 -0
- package/build/esm/instrument/Sampler.d.ts +126 -0
- package/build/esm/instrument/Sampler.js +259 -0
- package/build/esm/instrument/Sampler.js.map +1 -0
- package/build/esm/instrument/Synth.d.ts +65 -0
- package/build/esm/instrument/Synth.js +91 -0
- package/build/esm/instrument/Synth.js.map +1 -0
- package/build/esm/instrument/index.d.ts +11 -0
- package/build/esm/instrument/index.js +12 -0
- package/build/esm/instrument/index.js.map +1 -0
- package/build/esm/signal/Abs.d.ts +34 -0
- package/build/esm/signal/Abs.js +51 -0
- package/build/esm/signal/Abs.js.map +1 -0
- package/build/esm/signal/Add.d.ts +40 -0
- package/build/esm/signal/Add.js +49 -0
- package/build/esm/signal/Add.js.map +1 -0
- package/build/esm/signal/AudioToGain.d.ts +27 -0
- package/build/esm/signal/AudioToGain.js +37 -0
- package/build/esm/signal/AudioToGain.js.map +1 -0
- package/build/esm/signal/GainToAudio.d.ts +27 -0
- package/build/esm/signal/GainToAudio.js +37 -0
- package/build/esm/signal/GainToAudio.js.map +1 -0
- package/build/esm/signal/GreaterThan.d.ts +47 -0
- package/build/esm/signal/GreaterThan.js +46 -0
- package/build/esm/signal/GreaterThan.js.map +1 -0
- package/build/esm/signal/GreaterThanZero.d.ts +29 -0
- package/build/esm/signal/GreaterThanZero.js +45 -0
- package/build/esm/signal/GreaterThanZero.js.map +1 -0
- package/build/esm/signal/Multiply.d.ts +52 -0
- package/build/esm/signal/Multiply.js +51 -0
- package/build/esm/signal/Multiply.js.map +1 -0
- package/build/esm/signal/Negate.d.ts +29 -0
- package/build/esm/signal/Negate.js +39 -0
- package/build/esm/signal/Negate.js.map +1 -0
- package/build/esm/signal/Pow.d.ts +42 -0
- package/build/esm/signal/Pow.js +58 -0
- package/build/esm/signal/Pow.js.map +1 -0
- package/build/esm/signal/Scale.d.ts +62 -0
- package/build/esm/signal/Scale.js +73 -0
- package/build/esm/signal/Scale.js.map +1 -0
- package/build/esm/signal/ScaleExp.d.ts +37 -0
- package/build/esm/signal/ScaleExp.js +46 -0
- package/build/esm/signal/ScaleExp.js.map +1 -0
- package/build/esm/signal/Signal.d.ts +92 -0
- package/build/esm/signal/Signal.js +183 -0
- package/build/esm/signal/Signal.js.map +1 -0
- package/build/esm/signal/SignalOperator.d.ts +9 -0
- package/build/esm/signal/SignalOperator.js +16 -0
- package/build/esm/signal/SignalOperator.js.map +1 -0
- package/build/esm/signal/Subtract.d.ts +48 -0
- package/build/esm/signal/Subtract.js +58 -0
- package/build/esm/signal/Subtract.js.map +1 -0
- package/build/esm/signal/SyncedSignal.d.ts +53 -0
- package/build/esm/signal/SyncedSignal.js +124 -0
- package/build/esm/signal/SyncedSignal.js.map +1 -0
- package/build/esm/signal/ToneConstantSource.d.ts +39 -0
- package/build/esm/signal/ToneConstantSource.js +61 -0
- package/build/esm/signal/ToneConstantSource.js.map +1 -0
- package/build/esm/signal/WaveShaper.d.ts +81 -0
- package/build/esm/signal/WaveShaper.js +99 -0
- package/build/esm/signal/WaveShaper.js.map +1 -0
- package/build/esm/signal/Zero.d.ts +29 -0
- package/build/esm/signal/Zero.js +38 -0
- package/build/esm/signal/Zero.js.map +1 -0
- package/build/esm/signal/index.d.ts +16 -0
- package/build/esm/signal/index.js +17 -0
- package/build/esm/signal/index.js.map +1 -0
- package/build/esm/source/Noise.d.ts +96 -0
- package/build/esm/source/Noise.js +225 -0
- package/build/esm/source/Noise.js.map +1 -0
- package/build/esm/source/OneShotSource.d.ts +102 -0
- package/build/esm/source/OneShotSource.js +183 -0
- package/build/esm/source/OneShotSource.js.map +1 -0
- package/build/esm/source/Source.d.ts +155 -0
- package/build/esm/source/Source.js +281 -0
- package/build/esm/source/Source.js.map +1 -0
- package/build/esm/source/UserMedia.d.ts +123 -0
- package/build/esm/source/UserMedia.js +214 -0
- package/build/esm/source/UserMedia.js.map +1 -0
- package/build/esm/source/buffer/GrainPlayer.d.ts +135 -0
- package/build/esm/source/buffer/GrainPlayer.js +235 -0
- package/build/esm/source/buffer/GrainPlayer.js.map +1 -0
- package/build/esm/source/buffer/Player.d.ts +190 -0
- package/build/esm/source/buffer/Player.js +352 -0
- package/build/esm/source/buffer/Player.js.map +1 -0
- package/build/esm/source/buffer/Players.d.ts +121 -0
- package/build/esm/source/buffer/Players.js +162 -0
- package/build/esm/source/buffer/Players.js.map +1 -0
- package/build/esm/source/buffer/ToneBufferSource.d.ts +97 -0
- package/build/esm/source/buffer/ToneBufferSource.js +196 -0
- package/build/esm/source/buffer/ToneBufferSource.js.map +1 -0
- package/build/esm/source/index.d.ts +15 -0
- package/build/esm/source/index.js +16 -0
- package/build/esm/source/index.js.map +1 -0
- package/build/esm/source/oscillator/AMOscillator.d.ts +101 -0
- package/build/esm/source/oscillator/AMOscillator.js +157 -0
- package/build/esm/source/oscillator/AMOscillator.js.map +1 -0
- package/build/esm/source/oscillator/FMOscillator.d.ts +101 -0
- package/build/esm/source/oscillator/FMOscillator.js +172 -0
- package/build/esm/source/oscillator/FMOscillator.js.map +1 -0
- package/build/esm/source/oscillator/FatOscillator.d.ts +99 -0
- package/build/esm/source/oscillator/FatOscillator.js +195 -0
- package/build/esm/source/oscillator/FatOscillator.js.map +1 -0
- package/build/esm/source/oscillator/LFO.d.ts +167 -0
- package/build/esm/source/oscillator/LFO.js +233 -0
- package/build/esm/source/oscillator/LFO.js.map +1 -0
- package/build/esm/source/oscillator/OmniOscillator.d.ts +162 -0
- package/build/esm/source/oscillator/OmniOscillator.js +348 -0
- package/build/esm/source/oscillator/OmniOscillator.js.map +1 -0
- package/build/esm/source/oscillator/Oscillator.d.ts +125 -0
- package/build/esm/source/oscillator/Oscillator.js +379 -0
- package/build/esm/source/oscillator/Oscillator.js.map +1 -0
- package/build/esm/source/oscillator/OscillatorInterface.d.ts +298 -0
- package/build/esm/source/oscillator/OscillatorInterface.js +22 -0
- package/build/esm/source/oscillator/OscillatorInterface.js.map +1 -0
- package/build/esm/source/oscillator/PWMOscillator.d.ts +94 -0
- package/build/esm/source/oscillator/PWMOscillator.js +136 -0
- package/build/esm/source/oscillator/PWMOscillator.js.map +1 -0
- package/build/esm/source/oscillator/PulseOscillator.d.ts +119 -0
- package/build/esm/source/oscillator/PulseOscillator.js +175 -0
- package/build/esm/source/oscillator/PulseOscillator.js.map +1 -0
- package/build/esm/source/oscillator/ToneOscillatorNode.d.ts +57 -0
- package/build/esm/source/oscillator/ToneOscillatorNode.js +90 -0
- package/build/esm/source/oscillator/ToneOscillatorNode.js.map +1 -0
- package/build/esm/version.d.ts +1 -0
- package/build/esm/version.js +2 -0
- package/build/esm/version.js.map +1 -0
- package/docs/tone.json +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Signal } from "../signal/Signal";
|
|
2
|
+
import { Multiply } from "../signal/Multiply";
|
|
3
|
+
import { Gain } from "../core/context/Gain";
|
|
4
|
+
import { Envelope } from "../component/envelope/Envelope";
|
|
5
|
+
import { ToneAudioNode } from "../core/context/ToneAudioNode";
|
|
6
|
+
import { Monophonic } from "./Monophonic";
|
|
7
|
+
import { OmniOscillator } from "../source/oscillator/OmniOscillator";
|
|
8
|
+
import { Source } from "../source/Source";
|
|
9
|
+
import { Synth } from "./Synth";
|
|
10
|
+
import { readOnly } from "../core/util/Interface";
|
|
11
|
+
import { omitFromObject, optionsFromArguments } from "../core/util/Defaults";
|
|
12
|
+
/**
|
|
13
|
+
* Base class for both AM and FM synths
|
|
14
|
+
*/
|
|
15
|
+
export class ModulationSynth extends Monophonic {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(optionsFromArguments(ModulationSynth.getDefaults(), arguments));
|
|
18
|
+
this.name = "ModulationSynth";
|
|
19
|
+
const options = optionsFromArguments(ModulationSynth.getDefaults(), arguments);
|
|
20
|
+
this._carrier = new Synth({
|
|
21
|
+
context: this.context,
|
|
22
|
+
oscillator: options.oscillator,
|
|
23
|
+
envelope: options.envelope,
|
|
24
|
+
onsilence: () => this.onsilence(this),
|
|
25
|
+
volume: -10,
|
|
26
|
+
});
|
|
27
|
+
this._modulator = new Synth({
|
|
28
|
+
context: this.context,
|
|
29
|
+
oscillator: options.modulation,
|
|
30
|
+
envelope: options.modulationEnvelope,
|
|
31
|
+
volume: -10,
|
|
32
|
+
});
|
|
33
|
+
this.oscillator = this._carrier.oscillator;
|
|
34
|
+
this.envelope = this._carrier.envelope;
|
|
35
|
+
this.modulation = this._modulator.oscillator;
|
|
36
|
+
this.modulationEnvelope = this._modulator.envelope;
|
|
37
|
+
this.frequency = new Signal({
|
|
38
|
+
context: this.context,
|
|
39
|
+
units: "frequency",
|
|
40
|
+
});
|
|
41
|
+
this.detune = new Signal({
|
|
42
|
+
context: this.context,
|
|
43
|
+
value: options.detune,
|
|
44
|
+
units: "cents"
|
|
45
|
+
});
|
|
46
|
+
this.harmonicity = new Multiply({
|
|
47
|
+
context: this.context,
|
|
48
|
+
value: options.harmonicity,
|
|
49
|
+
minValue: 0,
|
|
50
|
+
});
|
|
51
|
+
this._modulationNode = new Gain({
|
|
52
|
+
context: this.context,
|
|
53
|
+
gain: 0,
|
|
54
|
+
});
|
|
55
|
+
readOnly(this, ["frequency", "harmonicity", "oscillator", "envelope", "modulation", "modulationEnvelope", "detune"]);
|
|
56
|
+
}
|
|
57
|
+
static getDefaults() {
|
|
58
|
+
return Object.assign(Monophonic.getDefaults(), {
|
|
59
|
+
harmonicity: 3,
|
|
60
|
+
oscillator: Object.assign(omitFromObject(OmniOscillator.getDefaults(), [
|
|
61
|
+
...Object.keys(Source.getDefaults()),
|
|
62
|
+
"frequency",
|
|
63
|
+
"detune"
|
|
64
|
+
]), {
|
|
65
|
+
type: "sine"
|
|
66
|
+
}),
|
|
67
|
+
envelope: Object.assign(omitFromObject(Envelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), {
|
|
68
|
+
attack: 0.01,
|
|
69
|
+
decay: 0.01,
|
|
70
|
+
sustain: 1,
|
|
71
|
+
release: 0.5
|
|
72
|
+
}),
|
|
73
|
+
modulation: Object.assign(omitFromObject(OmniOscillator.getDefaults(), [
|
|
74
|
+
...Object.keys(Source.getDefaults()),
|
|
75
|
+
"frequency",
|
|
76
|
+
"detune"
|
|
77
|
+
]), {
|
|
78
|
+
type: "square"
|
|
79
|
+
}),
|
|
80
|
+
modulationEnvelope: Object.assign(omitFromObject(Envelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), {
|
|
81
|
+
attack: 0.5,
|
|
82
|
+
decay: 0.0,
|
|
83
|
+
sustain: 1,
|
|
84
|
+
release: 0.5
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Trigger the attack portion of the note
|
|
90
|
+
*/
|
|
91
|
+
_triggerEnvelopeAttack(time, velocity) {
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
this._carrier._triggerEnvelopeAttack(time, velocity);
|
|
94
|
+
// @ts-ignore
|
|
95
|
+
this._modulator._triggerEnvelopeAttack(time, velocity);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Trigger the release portion of the note
|
|
99
|
+
*/
|
|
100
|
+
_triggerEnvelopeRelease(time) {
|
|
101
|
+
// @ts-ignore
|
|
102
|
+
this._carrier._triggerEnvelopeRelease(time);
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
this._modulator._triggerEnvelopeRelease(time);
|
|
105
|
+
return this;
|
|
106
|
+
}
|
|
107
|
+
getLevelAtTime(time) {
|
|
108
|
+
time = this.toSeconds(time);
|
|
109
|
+
return this.envelope.getValueAtTime(time);
|
|
110
|
+
}
|
|
111
|
+
dispose() {
|
|
112
|
+
super.dispose();
|
|
113
|
+
this._carrier.dispose();
|
|
114
|
+
this._modulator.dispose();
|
|
115
|
+
this.frequency.dispose();
|
|
116
|
+
this.detune.dispose();
|
|
117
|
+
this.harmonicity.dispose();
|
|
118
|
+
this._modulationNode.dispose();
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=ModulationSynth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModulationSynth.js","sourceRoot":"","sources":["../../../Tone/instrument/ModulationSynth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,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;QACb,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACb,CAAC;IAED,cAAc,CAAC,IAAU;QACxB,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO;QACN,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope";
|
|
2
|
+
import { EnvelopeOptions } from "../component/envelope/Envelope";
|
|
3
|
+
import { Filter, FilterOptions } from "../component/filter/Filter";
|
|
4
|
+
import { RecursivePartial } from "../core/util/Interface";
|
|
5
|
+
import { Monophonic, MonophonicOptions } from "../instrument/Monophonic";
|
|
6
|
+
import { OmniOscillator } from "../source/oscillator/OmniOscillator";
|
|
7
|
+
import { FrequencyEnvelope, FrequencyEnvelopeOptions } from "../component/envelope/FrequencyEnvelope";
|
|
8
|
+
import { NormalRange, Seconds, Time } from "../core/type/Units";
|
|
9
|
+
import { Signal } from "../signal/Signal";
|
|
10
|
+
import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
|
11
|
+
import { OmniOscillatorSynthOptions } from "../source/oscillator/OscillatorInterface";
|
|
12
|
+
export interface MonoSynthOptions extends MonophonicOptions {
|
|
13
|
+
oscillator: OmniOscillatorSynthOptions;
|
|
14
|
+
envelope: Omit<EnvelopeOptions, keyof ToneAudioNodeOptions>;
|
|
15
|
+
filterEnvelope: Omit<FrequencyEnvelopeOptions, keyof ToneAudioNodeOptions>;
|
|
16
|
+
filter: Omit<FilterOptions, keyof ToneAudioNodeOptions>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* MonoSynth is composed of one `oscillator`, one `filter`, and two `envelopes`.
|
|
20
|
+
* The amplitude of the Oscillator and the cutoff frequency of the
|
|
21
|
+
* Filter are controlled by Envelopes.
|
|
22
|
+
* <img src="https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240">
|
|
23
|
+
* @example
|
|
24
|
+
* const synth = new Tone.MonoSynth({
|
|
25
|
+
* oscillator: {
|
|
26
|
+
* type: "square"
|
|
27
|
+
* },
|
|
28
|
+
* envelope: {
|
|
29
|
+
* attack: 0.1
|
|
30
|
+
* }
|
|
31
|
+
* }).toDestination();
|
|
32
|
+
* synth.triggerAttackRelease("C4", "8n");
|
|
33
|
+
* @category Instrument
|
|
34
|
+
*/
|
|
35
|
+
export declare class MonoSynth extends Monophonic<MonoSynthOptions> {
|
|
36
|
+
readonly name = "MonoSynth";
|
|
37
|
+
/**
|
|
38
|
+
* The oscillator.
|
|
39
|
+
*/
|
|
40
|
+
readonly oscillator: OmniOscillator<any>;
|
|
41
|
+
/**
|
|
42
|
+
* The frequency control.
|
|
43
|
+
*/
|
|
44
|
+
readonly frequency: Signal<"frequency">;
|
|
45
|
+
/**
|
|
46
|
+
* The detune control.
|
|
47
|
+
*/
|
|
48
|
+
readonly detune: Signal<"cents">;
|
|
49
|
+
/**
|
|
50
|
+
* The filter.
|
|
51
|
+
*/
|
|
52
|
+
readonly filter: Filter;
|
|
53
|
+
/**
|
|
54
|
+
* The filter envelope.
|
|
55
|
+
*/
|
|
56
|
+
readonly filterEnvelope: FrequencyEnvelope;
|
|
57
|
+
/**
|
|
58
|
+
* The amplitude envelope.
|
|
59
|
+
*/
|
|
60
|
+
readonly envelope: AmplitudeEnvelope;
|
|
61
|
+
constructor(options?: RecursivePartial<MonoSynthOptions>);
|
|
62
|
+
static getDefaults(): MonoSynthOptions;
|
|
63
|
+
/**
|
|
64
|
+
* start the attack portion of the envelope
|
|
65
|
+
* @param time the time the attack should start
|
|
66
|
+
* @param velocity the velocity of the note (0-1)
|
|
67
|
+
*/
|
|
68
|
+
protected _triggerEnvelopeAttack(time: Seconds, velocity?: number): void;
|
|
69
|
+
/**
|
|
70
|
+
* start the release portion of the envelope
|
|
71
|
+
* @param time the time the release should start
|
|
72
|
+
*/
|
|
73
|
+
protected _triggerEnvelopeRelease(time: Seconds): void;
|
|
74
|
+
getLevelAtTime(time: Time): NormalRange;
|
|
75
|
+
dispose(): this;
|
|
76
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope";
|
|
2
|
+
import { Envelope } from "../component/envelope/Envelope";
|
|
3
|
+
import { Filter } from "../component/filter/Filter";
|
|
4
|
+
import { omitFromObject, optionsFromArguments } from "../core/util/Defaults";
|
|
5
|
+
import { readOnly } from "../core/util/Interface";
|
|
6
|
+
import { Monophonic } from "../instrument/Monophonic";
|
|
7
|
+
import { OmniOscillator } from "../source/oscillator/OmniOscillator";
|
|
8
|
+
import { Source } from "../source/Source";
|
|
9
|
+
import { FrequencyEnvelope } from "../component/envelope/FrequencyEnvelope";
|
|
10
|
+
import { ToneAudioNode } from "../core/context/ToneAudioNode";
|
|
11
|
+
/**
|
|
12
|
+
* MonoSynth is composed of one `oscillator`, one `filter`, and two `envelopes`.
|
|
13
|
+
* The amplitude of the Oscillator and the cutoff frequency of the
|
|
14
|
+
* Filter are controlled by Envelopes.
|
|
15
|
+
* <img src="https://docs.google.com/drawings/d/1gaY1DF9_Hzkodqf8JI1Cg2VZfwSElpFQfI94IQwad38/pub?w=924&h=240">
|
|
16
|
+
* @example
|
|
17
|
+
* const synth = new Tone.MonoSynth({
|
|
18
|
+
* oscillator: {
|
|
19
|
+
* type: "square"
|
|
20
|
+
* },
|
|
21
|
+
* envelope: {
|
|
22
|
+
* attack: 0.1
|
|
23
|
+
* }
|
|
24
|
+
* }).toDestination();
|
|
25
|
+
* synth.triggerAttackRelease("C4", "8n");
|
|
26
|
+
* @category Instrument
|
|
27
|
+
*/
|
|
28
|
+
export class MonoSynth extends Monophonic {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(optionsFromArguments(MonoSynth.getDefaults(), arguments));
|
|
31
|
+
this.name = "MonoSynth";
|
|
32
|
+
const options = optionsFromArguments(MonoSynth.getDefaults(), arguments);
|
|
33
|
+
this.oscillator = new OmniOscillator(Object.assign(options.oscillator, {
|
|
34
|
+
context: this.context,
|
|
35
|
+
detune: options.detune,
|
|
36
|
+
onstop: () => this.onsilence(this),
|
|
37
|
+
}));
|
|
38
|
+
this.frequency = this.oscillator.frequency;
|
|
39
|
+
this.detune = this.oscillator.detune;
|
|
40
|
+
this.filter = new Filter(Object.assign(options.filter, { context: this.context }));
|
|
41
|
+
this.filterEnvelope = new FrequencyEnvelope(Object.assign(options.filterEnvelope, { context: this.context }));
|
|
42
|
+
this.envelope = new AmplitudeEnvelope(Object.assign(options.envelope, { context: this.context }));
|
|
43
|
+
// connect the oscillators to the output
|
|
44
|
+
this.oscillator.chain(this.filter, this.envelope, this.output);
|
|
45
|
+
// connect the filter envelope
|
|
46
|
+
this.filterEnvelope.connect(this.filter.frequency);
|
|
47
|
+
readOnly(this, ["oscillator", "frequency", "detune", "filter", "filterEnvelope", "envelope"]);
|
|
48
|
+
}
|
|
49
|
+
static getDefaults() {
|
|
50
|
+
return Object.assign(Monophonic.getDefaults(), {
|
|
51
|
+
envelope: Object.assign(omitFromObject(Envelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), {
|
|
52
|
+
attack: 0.005,
|
|
53
|
+
decay: 0.1,
|
|
54
|
+
release: 1,
|
|
55
|
+
sustain: 0.9,
|
|
56
|
+
}),
|
|
57
|
+
filter: Object.assign(omitFromObject(Filter.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), {
|
|
58
|
+
Q: 1,
|
|
59
|
+
rolloff: -12,
|
|
60
|
+
type: "lowpass",
|
|
61
|
+
}),
|
|
62
|
+
filterEnvelope: Object.assign(omitFromObject(FrequencyEnvelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), {
|
|
63
|
+
attack: 0.6,
|
|
64
|
+
baseFrequency: 200,
|
|
65
|
+
decay: 0.2,
|
|
66
|
+
exponent: 2,
|
|
67
|
+
octaves: 3,
|
|
68
|
+
release: 2,
|
|
69
|
+
sustain: 0.5,
|
|
70
|
+
}),
|
|
71
|
+
oscillator: Object.assign(omitFromObject(OmniOscillator.getDefaults(), Object.keys(Source.getDefaults())), {
|
|
72
|
+
type: "sawtooth",
|
|
73
|
+
}),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* start the attack portion of the envelope
|
|
78
|
+
* @param time the time the attack should start
|
|
79
|
+
* @param velocity the velocity of the note (0-1)
|
|
80
|
+
*/
|
|
81
|
+
_triggerEnvelopeAttack(time, velocity = 1) {
|
|
82
|
+
this.envelope.triggerAttack(time, velocity);
|
|
83
|
+
this.filterEnvelope.triggerAttack(time);
|
|
84
|
+
this.oscillator.start(time);
|
|
85
|
+
if (this.envelope.sustain === 0) {
|
|
86
|
+
const computedAttack = this.toSeconds(this.envelope.attack);
|
|
87
|
+
const computedDecay = this.toSeconds(this.envelope.decay);
|
|
88
|
+
this.oscillator.stop(time + computedAttack + computedDecay);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* start the release portion of the envelope
|
|
93
|
+
* @param time the time the release should start
|
|
94
|
+
*/
|
|
95
|
+
_triggerEnvelopeRelease(time) {
|
|
96
|
+
this.envelope.triggerRelease(time);
|
|
97
|
+
this.filterEnvelope.triggerRelease(time);
|
|
98
|
+
this.oscillator.stop(time + this.toSeconds(this.envelope.release));
|
|
99
|
+
}
|
|
100
|
+
getLevelAtTime(time) {
|
|
101
|
+
time = this.toSeconds(time);
|
|
102
|
+
return this.envelope.getValueAtTime(time);
|
|
103
|
+
}
|
|
104
|
+
dispose() {
|
|
105
|
+
super.dispose();
|
|
106
|
+
this.oscillator.dispose();
|
|
107
|
+
this.envelope.dispose();
|
|
108
|
+
this.filterEnvelope.dispose();
|
|
109
|
+
this.filter.dispose();
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=MonoSynth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonoSynth.js","sourceRoot":"","sources":["../../../Tone/instrument/MonoSynth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAmB,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAiB,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAoB,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAqB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAA4B,MAAM,yCAAyC,CAAC;AAGtG,OAAO,EAAE,aAAa,EAAwB,MAAM,+BAA+B,CAAC;AAUpF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,SAAU,SAAQ,UAA4B;IAmC1D;QACC,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CA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EAAE,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { FrequencyClass } from "../core/type/Frequency";
|
|
2
|
+
import { Cents, Frequency, NormalRange, Seconds, Time } from "../core/type/Units";
|
|
3
|
+
import { Instrument, InstrumentOptions } from "../instrument/Instrument";
|
|
4
|
+
import { Signal } from "../signal/Signal";
|
|
5
|
+
declare type onSilenceCallback = (instrument: Monophonic<any>) => void;
|
|
6
|
+
export interface MonophonicOptions extends InstrumentOptions {
|
|
7
|
+
portamento: Seconds;
|
|
8
|
+
onsilence: onSilenceCallback;
|
|
9
|
+
detune: Cents;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Abstract base class for other monophonic instruments to extend.
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class Monophonic<Options extends MonophonicOptions> extends Instrument<Options> {
|
|
15
|
+
/**
|
|
16
|
+
* The glide time between notes.
|
|
17
|
+
*/
|
|
18
|
+
portamento: Seconds;
|
|
19
|
+
/**
|
|
20
|
+
* Invoked when the release has finished and the output is silent.
|
|
21
|
+
*/
|
|
22
|
+
onsilence: onSilenceCallback;
|
|
23
|
+
/**
|
|
24
|
+
* The instrument's frequency signal.
|
|
25
|
+
*/
|
|
26
|
+
abstract readonly frequency: Signal<"frequency">;
|
|
27
|
+
/**
|
|
28
|
+
* The instrument's detune control signal.
|
|
29
|
+
*/
|
|
30
|
+
abstract readonly detune: Signal<"cents">;
|
|
31
|
+
constructor(options?: Partial<MonophonicOptions>);
|
|
32
|
+
static getDefaults(): MonophonicOptions;
|
|
33
|
+
/**
|
|
34
|
+
* Trigger the attack of the note optionally with a given velocity.
|
|
35
|
+
* @param note The note to trigger.
|
|
36
|
+
* @param time When the note should start.
|
|
37
|
+
* @param velocity The velocity determines how "loud" the note will be.
|
|
38
|
+
* @example
|
|
39
|
+
* const synth = new Tone.Synth().toDestination();
|
|
40
|
+
* // trigger the note a half second from now at half velocity
|
|
41
|
+
* synth.triggerAttack("C4", "+0.5", 0.5);
|
|
42
|
+
*/
|
|
43
|
+
triggerAttack(note: Frequency | FrequencyClass, time?: Time, velocity?: NormalRange): this;
|
|
44
|
+
/**
|
|
45
|
+
* Trigger the release portion of the envelope.
|
|
46
|
+
* @param time If no time is given, the release happens immediately.
|
|
47
|
+
* @example
|
|
48
|
+
* const synth = new Tone.Synth().toDestination();
|
|
49
|
+
* synth.triggerAttack("C4");
|
|
50
|
+
* // trigger the release a second from now
|
|
51
|
+
* synth.triggerRelease("+1");
|
|
52
|
+
*/
|
|
53
|
+
triggerRelease(time?: Time): this;
|
|
54
|
+
/**
|
|
55
|
+
* Internal method which starts the envelope attack
|
|
56
|
+
*/
|
|
57
|
+
protected abstract _triggerEnvelopeAttack(time: Seconds, velocity: NormalRange): void;
|
|
58
|
+
/**
|
|
59
|
+
* Internal method which starts the envelope release
|
|
60
|
+
*/
|
|
61
|
+
protected abstract _triggerEnvelopeRelease(time: Seconds): void;
|
|
62
|
+
/**
|
|
63
|
+
* Get the level of the output at the given time. Measures
|
|
64
|
+
* the envelope(s) value at the time.
|
|
65
|
+
* @param time The time to query the envelope value
|
|
66
|
+
* @return The output level between 0-1
|
|
67
|
+
*/
|
|
68
|
+
abstract getLevelAtTime(time: Time): NormalRange;
|
|
69
|
+
/**
|
|
70
|
+
* Set the note at the given time. If no time is given, the note
|
|
71
|
+
* will set immediately.
|
|
72
|
+
* @param note The note to change to.
|
|
73
|
+
* @param time The time when the note should be set.
|
|
74
|
+
* @example
|
|
75
|
+
* const synth = new Tone.Synth().toDestination();
|
|
76
|
+
* synth.triggerAttack("C4");
|
|
77
|
+
* // change to F#6 in one quarter note from now.
|
|
78
|
+
* synth.setNote("F#6", "+4n");
|
|
79
|
+
*/
|
|
80
|
+
setNote(note: Frequency | FrequencyClass, time?: Time): this;
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { FrequencyClass } from "../core/type/Frequency";
|
|
3
|
+
import { optionsFromArguments } from "../core/util/Defaults";
|
|
4
|
+
import { noOp } from "../core/util/Interface";
|
|
5
|
+
import { Instrument } from "../instrument/Instrument";
|
|
6
|
+
import { timeRange } from "../core/util/Decorator";
|
|
7
|
+
/**
|
|
8
|
+
* Abstract base class for other monophonic instruments to extend.
|
|
9
|
+
*/
|
|
10
|
+
export class Monophonic extends Instrument {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(optionsFromArguments(Monophonic.getDefaults(), arguments));
|
|
13
|
+
const options = optionsFromArguments(Monophonic.getDefaults(), arguments);
|
|
14
|
+
this.portamento = options.portamento;
|
|
15
|
+
this.onsilence = options.onsilence;
|
|
16
|
+
}
|
|
17
|
+
static getDefaults() {
|
|
18
|
+
return Object.assign(Instrument.getDefaults(), {
|
|
19
|
+
detune: 0,
|
|
20
|
+
onsilence: noOp,
|
|
21
|
+
portamento: 0,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Trigger the attack of the note optionally with a given velocity.
|
|
26
|
+
* @param note The note to trigger.
|
|
27
|
+
* @param time When the note should start.
|
|
28
|
+
* @param velocity The velocity determines how "loud" the note will be.
|
|
29
|
+
* @example
|
|
30
|
+
* const synth = new Tone.Synth().toDestination();
|
|
31
|
+
* // trigger the note a half second from now at half velocity
|
|
32
|
+
* synth.triggerAttack("C4", "+0.5", 0.5);
|
|
33
|
+
*/
|
|
34
|
+
triggerAttack(note, time, velocity = 1) {
|
|
35
|
+
this.log("triggerAttack", note, time, velocity);
|
|
36
|
+
const seconds = this.toSeconds(time);
|
|
37
|
+
this._triggerEnvelopeAttack(seconds, velocity);
|
|
38
|
+
this.setNote(note, seconds);
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Trigger the release portion of the envelope.
|
|
43
|
+
* @param time If no time is given, the release happens immediately.
|
|
44
|
+
* @example
|
|
45
|
+
* const synth = new Tone.Synth().toDestination();
|
|
46
|
+
* synth.triggerAttack("C4");
|
|
47
|
+
* // trigger the release a second from now
|
|
48
|
+
* synth.triggerRelease("+1");
|
|
49
|
+
*/
|
|
50
|
+
triggerRelease(time) {
|
|
51
|
+
this.log("triggerRelease", time);
|
|
52
|
+
const seconds = this.toSeconds(time);
|
|
53
|
+
this._triggerEnvelopeRelease(seconds);
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Set the note at the given time. If no time is given, the note
|
|
58
|
+
* will set immediately.
|
|
59
|
+
* @param note The note to change to.
|
|
60
|
+
* @param time The time when the note should be set.
|
|
61
|
+
* @example
|
|
62
|
+
* const synth = new Tone.Synth().toDestination();
|
|
63
|
+
* synth.triggerAttack("C4");
|
|
64
|
+
* // change to F#6 in one quarter note from now.
|
|
65
|
+
* synth.setNote("F#6", "+4n");
|
|
66
|
+
*/
|
|
67
|
+
setNote(note, time) {
|
|
68
|
+
const computedTime = this.toSeconds(time);
|
|
69
|
+
const computedFrequency = note instanceof FrequencyClass ? note.toFrequency() : note;
|
|
70
|
+
if (this.portamento > 0 && this.getLevelAtTime(computedTime) > 0.05) {
|
|
71
|
+
const portTime = this.toSeconds(this.portamento);
|
|
72
|
+
this.frequency.exponentialRampTo(computedFrequency, portTime, computedTime);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.frequency.setValueAtTime(computedFrequency, computedTime);
|
|
76
|
+
}
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
__decorate([
|
|
81
|
+
timeRange(0)
|
|
82
|
+
], Monophonic.prototype, "portamento", void 0);
|
|
83
|
+
//# sourceMappingURL=Monophonic.js.map
|
|
@@ -0,0 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AAE,OAAO,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;;;;;OAQG;IACH,cAAc,CAAC,IAAW;QACzB,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACb,CAAC;IAoBD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,IAAgC,EAAE,IAAW;QACpD,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,iBAAiB,GAAG,IAAI,YAAY,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACrF,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE;YACpE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjD,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;SAC5E;aAAM;YACN,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AA7GA;IADC,SAAS,CAAC,CAAC,CAAC;8CACO"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope";
|
|
2
|
+
import { NormalRange, Time } from "../core/type/Units";
|
|
3
|
+
import { RecursivePartial } from "../core/util/Interface";
|
|
4
|
+
import { Noise, NoiseOptions } from "../source/Noise";
|
|
5
|
+
import { Instrument, InstrumentOptions } from "./Instrument";
|
|
6
|
+
import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
|
7
|
+
import { EnvelopeOptions } from "../component/envelope/Envelope";
|
|
8
|
+
export interface NoiseSynthOptions extends InstrumentOptions {
|
|
9
|
+
envelope: Omit<EnvelopeOptions, keyof ToneAudioNodeOptions>;
|
|
10
|
+
noise: Omit<NoiseOptions, keyof ToneAudioNodeOptions>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Tone.NoiseSynth is composed of [[Noise]] through an [[AmplitudeEnvelope]].
|
|
14
|
+
* ```
|
|
15
|
+
* +-------+ +-------------------+
|
|
16
|
+
* | Noise +>--> AmplitudeEnvelope +>--> Output
|
|
17
|
+
* +-------+ +-------------------+
|
|
18
|
+
* ```
|
|
19
|
+
* @example
|
|
20
|
+
* const noiseSynth = new Tone.NoiseSynth().toDestination();
|
|
21
|
+
* noiseSynth.triggerAttackRelease("8n", 0.05);
|
|
22
|
+
* @category Instrument
|
|
23
|
+
*/
|
|
24
|
+
export declare class NoiseSynth extends Instrument<NoiseSynthOptions> {
|
|
25
|
+
readonly name = "NoiseSynth";
|
|
26
|
+
/**
|
|
27
|
+
* The noise source.
|
|
28
|
+
*/
|
|
29
|
+
readonly noise: Noise;
|
|
30
|
+
/**
|
|
31
|
+
* The amplitude envelope.
|
|
32
|
+
*/
|
|
33
|
+
readonly envelope: AmplitudeEnvelope;
|
|
34
|
+
constructor(options?: RecursivePartial<NoiseSynthOptions>);
|
|
35
|
+
static getDefaults(): NoiseSynthOptions;
|
|
36
|
+
/**
|
|
37
|
+
* Start the attack portion of the envelopes. Unlike other
|
|
38
|
+
* instruments, Tone.NoiseSynth doesn't have a note.
|
|
39
|
+
* @example
|
|
40
|
+
* const noiseSynth = new Tone.NoiseSynth().toDestination();
|
|
41
|
+
* noiseSynth.triggerAttack();
|
|
42
|
+
*/
|
|
43
|
+
triggerAttack(time?: Time, velocity?: NormalRange): this;
|
|
44
|
+
/**
|
|
45
|
+
* Start the release portion of the envelopes.
|
|
46
|
+
*/
|
|
47
|
+
triggerRelease(time?: Time): this;
|
|
48
|
+
sync(): this;
|
|
49
|
+
triggerAttackRelease(duration: Time, time?: Time, velocity?: NormalRange): this;
|
|
50
|
+
dispose(): this;
|
|
51
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope";
|
|
2
|
+
import { omitFromObject, optionsFromArguments } from "../core/util/Defaults";
|
|
3
|
+
import { Noise } from "../source/Noise";
|
|
4
|
+
import { Instrument } from "./Instrument";
|
|
5
|
+
import { ToneAudioNode } from "../core/context/ToneAudioNode";
|
|
6
|
+
import { Envelope } from "../component/envelope/Envelope";
|
|
7
|
+
import { Source } from "../source/Source";
|
|
8
|
+
/**
|
|
9
|
+
* Tone.NoiseSynth is composed of [[Noise]] through an [[AmplitudeEnvelope]].
|
|
10
|
+
* ```
|
|
11
|
+
* +-------+ +-------------------+
|
|
12
|
+
* | Noise +>--> AmplitudeEnvelope +>--> Output
|
|
13
|
+
* +-------+ +-------------------+
|
|
14
|
+
* ```
|
|
15
|
+
* @example
|
|
16
|
+
* const noiseSynth = new Tone.NoiseSynth().toDestination();
|
|
17
|
+
* noiseSynth.triggerAttackRelease("8n", 0.05);
|
|
18
|
+
* @category Instrument
|
|
19
|
+
*/
|
|
20
|
+
export class NoiseSynth extends Instrument {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(optionsFromArguments(NoiseSynth.getDefaults(), arguments));
|
|
23
|
+
this.name = "NoiseSynth";
|
|
24
|
+
const options = optionsFromArguments(NoiseSynth.getDefaults(), arguments);
|
|
25
|
+
this.noise = new Noise(Object.assign({
|
|
26
|
+
context: this.context,
|
|
27
|
+
}, options.noise));
|
|
28
|
+
this.envelope = new AmplitudeEnvelope(Object.assign({
|
|
29
|
+
context: this.context,
|
|
30
|
+
}, options.envelope));
|
|
31
|
+
// connect the noise to the output
|
|
32
|
+
this.noise.chain(this.envelope, this.output);
|
|
33
|
+
}
|
|
34
|
+
static getDefaults() {
|
|
35
|
+
return Object.assign(Instrument.getDefaults(), {
|
|
36
|
+
envelope: Object.assign(omitFromObject(Envelope.getDefaults(), Object.keys(ToneAudioNode.getDefaults())), {
|
|
37
|
+
decay: 0.1,
|
|
38
|
+
sustain: 0.0,
|
|
39
|
+
}),
|
|
40
|
+
noise: Object.assign(omitFromObject(Noise.getDefaults(), Object.keys(Source.getDefaults())), {
|
|
41
|
+
type: "white",
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Start the attack portion of the envelopes. Unlike other
|
|
47
|
+
* instruments, Tone.NoiseSynth doesn't have a note.
|
|
48
|
+
* @example
|
|
49
|
+
* const noiseSynth = new Tone.NoiseSynth().toDestination();
|
|
50
|
+
* noiseSynth.triggerAttack();
|
|
51
|
+
*/
|
|
52
|
+
triggerAttack(time, velocity = 1) {
|
|
53
|
+
time = this.toSeconds(time);
|
|
54
|
+
// the envelopes
|
|
55
|
+
this.envelope.triggerAttack(time, velocity);
|
|
56
|
+
// start the noise
|
|
57
|
+
this.noise.start(time);
|
|
58
|
+
if (this.envelope.sustain === 0) {
|
|
59
|
+
this.noise.stop(time + this.toSeconds(this.envelope.attack) + this.toSeconds(this.envelope.decay));
|
|
60
|
+
}
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Start the release portion of the envelopes.
|
|
65
|
+
*/
|
|
66
|
+
triggerRelease(time) {
|
|
67
|
+
time = this.toSeconds(time);
|
|
68
|
+
this.envelope.triggerRelease(time);
|
|
69
|
+
this.noise.stop(time + this.toSeconds(this.envelope.release));
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
sync() {
|
|
73
|
+
if (this._syncState()) {
|
|
74
|
+
this._syncMethod("triggerAttack", 0);
|
|
75
|
+
this._syncMethod("triggerRelease", 0);
|
|
76
|
+
}
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
triggerAttackRelease(duration, time, velocity = 1) {
|
|
80
|
+
time = this.toSeconds(time);
|
|
81
|
+
duration = this.toSeconds(duration);
|
|
82
|
+
this.triggerAttack(time, velocity);
|
|
83
|
+
this.triggerRelease(time + duration);
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
dispose() {
|
|
87
|
+
super.dispose();
|
|
88
|
+
this.noise.dispose();
|
|
89
|
+
this.envelope.dispose();
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=NoiseSynth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoiseSynth.js","sourceRoot":"","sources":["../../../Tone/instrument/NoiseSynth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7E,OAAO,EAAE,KAAK,EAAgB,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAwB,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAmB,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,UAAW,SAAQ,UAA6B;IAe5D;QACC,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;QAdzD,SAAI,GAAG,YAAY,CAAC;QAe5B,MAAM,OAAO,GAAG,oBAAoB,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;YACpC,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