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 @@
|
|
|
1
|
+
{"version":3,"file":"FeedbackEffect.js","sourceRoot":"","sources":["../../../Tone/effect/FeedbackEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAiB,MAAM,UAAU,CAAC;AAgBjD;;;GAGG;AACH,MAAM,OAAgB,cAAsD,SAAQ,MAAe;IAclG,YAAY,OAA8B;QAEzC,KAAK,CAAC,OAAO,CAAC,CAAC;QAdP,SAAI,GAAW,gBAAgB,CAAC;QAgBxC,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,CAAC;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,OAAO,CAAC,QAAQ;YACtB,KAAK,EAAE,aAAa;SACpB,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;QACxC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAE3B,oBAAoB;QACpB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,WAAW;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE;YAC1C,QAAQ,EAAE,KAAK;SACf,CAAC,CAAC;IACJ,CAAC;IAED,OAAO;QACN,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { StereoEffect, StereoEffectOptions } from "./StereoEffect";
|
|
2
|
+
import { Frequency, NormalRange } from "../core/type/Units";
|
|
3
|
+
import { Signal } from "../signal/Signal";
|
|
4
|
+
export interface FreeverbOptions extends StereoEffectOptions {
|
|
5
|
+
dampening: Frequency;
|
|
6
|
+
roomSize: NormalRange;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).
|
|
10
|
+
* Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).
|
|
11
|
+
* Freeverb is now implemented with an AudioWorkletNode which may result on performance degradation on some platforms. Consider using [[Reverb]].
|
|
12
|
+
* @example
|
|
13
|
+
* const freeverb = new Tone.Freeverb().toDestination();
|
|
14
|
+
* freeverb.dampening = 1000;
|
|
15
|
+
* // routing synth through the reverb
|
|
16
|
+
* const synth = new Tone.NoiseSynth().connect(freeverb);
|
|
17
|
+
* synth.triggerAttackRelease(0.05);
|
|
18
|
+
* @category Effect
|
|
19
|
+
*/
|
|
20
|
+
export declare class Freeverb extends StereoEffect<FreeverbOptions> {
|
|
21
|
+
readonly name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The roomSize value between 0 and 1. A larger roomSize will result in a longer decay.
|
|
24
|
+
*/
|
|
25
|
+
readonly roomSize: Signal<"normalRange">;
|
|
26
|
+
/**
|
|
27
|
+
* the comb filters
|
|
28
|
+
*/
|
|
29
|
+
private _combFilters;
|
|
30
|
+
/**
|
|
31
|
+
* the allpass filters on the left
|
|
32
|
+
*/
|
|
33
|
+
private _allpassFiltersL;
|
|
34
|
+
/**
|
|
35
|
+
* the allpass filters on the right
|
|
36
|
+
*/
|
|
37
|
+
private _allpassFiltersR;
|
|
38
|
+
/**
|
|
39
|
+
* @param roomSize Correlated to the decay time.
|
|
40
|
+
* @param dampening The cutoff frequency of a lowpass filter as part of the reverb.
|
|
41
|
+
*/
|
|
42
|
+
constructor(roomSize?: NormalRange, dampening?: Frequency);
|
|
43
|
+
constructor(options?: Partial<FreeverbOptions>);
|
|
44
|
+
static getDefaults(): FreeverbOptions;
|
|
45
|
+
/**
|
|
46
|
+
* The amount of dampening of the reverberant signal.
|
|
47
|
+
*/
|
|
48
|
+
get dampening(): Frequency;
|
|
49
|
+
set dampening(d: Frequency);
|
|
50
|
+
dispose(): this;
|
|
51
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { StereoEffect } from "./StereoEffect";
|
|
2
|
+
import { optionsFromArguments } from "../core/util/Defaults";
|
|
3
|
+
import { readOnly } from "../core/util/Interface";
|
|
4
|
+
import { Signal } from "../signal/Signal";
|
|
5
|
+
import { LowpassCombFilter } from "../component/filter/LowpassCombFilter";
|
|
6
|
+
/**
|
|
7
|
+
* An array of comb filter delay values from Freeverb implementation
|
|
8
|
+
*/
|
|
9
|
+
const combFilterTunings = [1557 / 44100, 1617 / 44100, 1491 / 44100, 1422 / 44100, 1277 / 44100, 1356 / 44100, 1188 / 44100, 1116 / 44100];
|
|
10
|
+
/**
|
|
11
|
+
* An array of allpass filter frequency values from Freeverb implementation
|
|
12
|
+
*/
|
|
13
|
+
const allpassFilterFrequencies = [225, 556, 441, 341];
|
|
14
|
+
/**
|
|
15
|
+
* Freeverb is a reverb based on [Freeverb](https://ccrma.stanford.edu/~jos/pasp/Freeverb.html).
|
|
16
|
+
* Read more on reverb on [Sound On Sound](https://web.archive.org/web/20160404083902/http://www.soundonsound.com:80/sos/feb01/articles/synthsecrets.asp).
|
|
17
|
+
* Freeverb is now implemented with an AudioWorkletNode which may result on performance degradation on some platforms. Consider using [[Reverb]].
|
|
18
|
+
* @example
|
|
19
|
+
* const freeverb = new Tone.Freeverb().toDestination();
|
|
20
|
+
* freeverb.dampening = 1000;
|
|
21
|
+
* // routing synth through the reverb
|
|
22
|
+
* const synth = new Tone.NoiseSynth().connect(freeverb);
|
|
23
|
+
* synth.triggerAttackRelease(0.05);
|
|
24
|
+
* @category Effect
|
|
25
|
+
*/
|
|
26
|
+
export class Freeverb extends StereoEffect {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(optionsFromArguments(Freeverb.getDefaults(), arguments, ["roomSize", "dampening"]));
|
|
29
|
+
this.name = "Freeverb";
|
|
30
|
+
/**
|
|
31
|
+
* the comb filters
|
|
32
|
+
*/
|
|
33
|
+
this._combFilters = [];
|
|
34
|
+
/**
|
|
35
|
+
* the allpass filters on the left
|
|
36
|
+
*/
|
|
37
|
+
this._allpassFiltersL = [];
|
|
38
|
+
/**
|
|
39
|
+
* the allpass filters on the right
|
|
40
|
+
*/
|
|
41
|
+
this._allpassFiltersR = [];
|
|
42
|
+
const options = optionsFromArguments(Freeverb.getDefaults(), arguments, ["roomSize", "dampening"]);
|
|
43
|
+
this.roomSize = new Signal({
|
|
44
|
+
context: this.context,
|
|
45
|
+
value: options.roomSize,
|
|
46
|
+
units: "normalRange",
|
|
47
|
+
});
|
|
48
|
+
// make the allpass filters on the right
|
|
49
|
+
this._allpassFiltersL = allpassFilterFrequencies.map(freq => {
|
|
50
|
+
const allpassL = this.context.createBiquadFilter();
|
|
51
|
+
allpassL.type = "allpass";
|
|
52
|
+
allpassL.frequency.value = freq;
|
|
53
|
+
return allpassL;
|
|
54
|
+
});
|
|
55
|
+
// make the allpass filters on the left
|
|
56
|
+
this._allpassFiltersR = allpassFilterFrequencies.map(freq => {
|
|
57
|
+
const allpassR = this.context.createBiquadFilter();
|
|
58
|
+
allpassR.type = "allpass";
|
|
59
|
+
allpassR.frequency.value = freq;
|
|
60
|
+
return allpassR;
|
|
61
|
+
});
|
|
62
|
+
// make the comb filters
|
|
63
|
+
this._combFilters = combFilterTunings.map((delayTime, index) => {
|
|
64
|
+
const lfpf = new LowpassCombFilter({
|
|
65
|
+
context: this.context,
|
|
66
|
+
dampening: options.dampening,
|
|
67
|
+
delayTime,
|
|
68
|
+
});
|
|
69
|
+
if (index < combFilterTunings.length / 2) {
|
|
70
|
+
this.connectEffectLeft(lfpf, ...this._allpassFiltersL);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.connectEffectRight(lfpf, ...this._allpassFiltersR);
|
|
74
|
+
}
|
|
75
|
+
this.roomSize.connect(lfpf.resonance);
|
|
76
|
+
return lfpf;
|
|
77
|
+
});
|
|
78
|
+
readOnly(this, ["roomSize"]);
|
|
79
|
+
}
|
|
80
|
+
static getDefaults() {
|
|
81
|
+
return Object.assign(StereoEffect.getDefaults(), {
|
|
82
|
+
roomSize: 0.7,
|
|
83
|
+
dampening: 3000
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The amount of dampening of the reverberant signal.
|
|
88
|
+
*/
|
|
89
|
+
get dampening() {
|
|
90
|
+
return this._combFilters[0].dampening;
|
|
91
|
+
}
|
|
92
|
+
set dampening(d) {
|
|
93
|
+
this._combFilters.forEach(c => c.dampening = d);
|
|
94
|
+
}
|
|
95
|
+
dispose() {
|
|
96
|
+
super.dispose();
|
|
97
|
+
this._allpassFiltersL.forEach(al => al.disconnect());
|
|
98
|
+
this._allpassFiltersR.forEach(ar => ar.disconnect());
|
|
99
|
+
this._combFilters.forEach(cf => cf.dispose());
|
|
100
|
+
this.roomSize.dispose();
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=Freeverb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Freeverb.js","sourceRoot":"","sources":["../../../Tone/effect/Freeverb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM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AAW;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE;YAChD,QAAQ,EAAE,GAAG;YACb,SAAS,EAAE,IAAI;SACf,CAAC,CAAC;IACJ,CAAC;IAED;;OAEG;IAEH,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACvC,CAAC;IACD,IAAI,SAAS,CAAC,CAAC;QACd,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,OAAO;QACN,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Frequency } from "../core/type/Units";
|
|
2
|
+
import { Effect, EffectOptions } from "../effect/Effect";
|
|
3
|
+
import { Signal } from "../signal/Signal";
|
|
4
|
+
interface FrequencyShifterOptions extends EffectOptions {
|
|
5
|
+
frequency: Frequency;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* FrequencyShifter can be used to shift all frequencies of a signal by a fixed amount.
|
|
9
|
+
* The amount can be changed at audio rate and the effect is applied in real time.
|
|
10
|
+
* The frequency shifting is implemented with a technique called single side band modulation using a ring modulator.
|
|
11
|
+
* Note: Contrary to pitch shifting, all frequencies are shifted by the same amount,
|
|
12
|
+
* destroying the harmonic relationship between them. This leads to the classic ring modulator timbre distortion.
|
|
13
|
+
* The algorithm will produces some aliasing towards the high end, especially if your source material
|
|
14
|
+
* contains a lot of high frequencies. Unfortunatelly the webaudio API does not support resampling
|
|
15
|
+
* buffers in real time, so it is not possible to fix it properly. Depending on the use case it might
|
|
16
|
+
* be an option to low pass filter your input before frequency shifting it to get ride of the aliasing.
|
|
17
|
+
* You can find a very detailed description of the algorithm here: https://larzeitlin.github.io/RMFS/
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const input = new Tone.Oscillator(230, "sawtooth").start();
|
|
21
|
+
* const shift = new Tone.FrequencyShifter(42).toDestination();
|
|
22
|
+
* input.connect(shift);
|
|
23
|
+
* @category Effect
|
|
24
|
+
*/
|
|
25
|
+
export declare class FrequencyShifter extends Effect<FrequencyShifterOptions> {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
/**
|
|
28
|
+
* The ring modulators carrier frequency. This frequency determines
|
|
29
|
+
* by how many Hertz the input signal will be shifted up or down. Default is 0.
|
|
30
|
+
*/
|
|
31
|
+
readonly frequency: Signal<"frequency">;
|
|
32
|
+
/**
|
|
33
|
+
* The ring modulators sine carrier
|
|
34
|
+
*/
|
|
35
|
+
private _sine;
|
|
36
|
+
/**
|
|
37
|
+
* The ring modulators cosine carrier
|
|
38
|
+
*/
|
|
39
|
+
private _cosine;
|
|
40
|
+
/**
|
|
41
|
+
* The sine multiply operator
|
|
42
|
+
*/
|
|
43
|
+
private _sineMultiply;
|
|
44
|
+
/**
|
|
45
|
+
* The cosine multiply operator
|
|
46
|
+
*/
|
|
47
|
+
private _cosineMultiply;
|
|
48
|
+
/**
|
|
49
|
+
* The negate operator
|
|
50
|
+
*/
|
|
51
|
+
private _negate;
|
|
52
|
+
/**
|
|
53
|
+
* The final add operator
|
|
54
|
+
*/
|
|
55
|
+
private _add;
|
|
56
|
+
/**
|
|
57
|
+
* The phase shifter to create the initial 90° phase offset
|
|
58
|
+
*/
|
|
59
|
+
private _phaseShifter;
|
|
60
|
+
/**
|
|
61
|
+
* @param frequency The incoming signal is shifted by this frequency value.
|
|
62
|
+
*/
|
|
63
|
+
constructor(frequency?: Frequency);
|
|
64
|
+
constructor(options?: Partial<FrequencyShifterOptions>);
|
|
65
|
+
static getDefaults(): FrequencyShifterOptions;
|
|
66
|
+
dispose(): this;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { PhaseShiftAllpass } from "../component/filter/PhaseShiftAllpass";
|
|
2
|
+
import { optionsFromArguments } from "../core/util/Defaults";
|
|
3
|
+
import { Effect } from "../effect/Effect";
|
|
4
|
+
import { Add } from "../signal/Add";
|
|
5
|
+
import { Multiply } from "../signal/Multiply";
|
|
6
|
+
import { Negate } from "../signal/Negate";
|
|
7
|
+
import { Signal } from "../signal/Signal";
|
|
8
|
+
import { Oscillator } from "../source/oscillator/Oscillator";
|
|
9
|
+
import { ToneOscillatorNode } from "../source/oscillator/ToneOscillatorNode";
|
|
10
|
+
/**
|
|
11
|
+
* FrequencyShifter can be used to shift all frequencies of a signal by a fixed amount.
|
|
12
|
+
* The amount can be changed at audio rate and the effect is applied in real time.
|
|
13
|
+
* The frequency shifting is implemented with a technique called single side band modulation using a ring modulator.
|
|
14
|
+
* Note: Contrary to pitch shifting, all frequencies are shifted by the same amount,
|
|
15
|
+
* destroying the harmonic relationship between them. This leads to the classic ring modulator timbre distortion.
|
|
16
|
+
* The algorithm will produces some aliasing towards the high end, especially if your source material
|
|
17
|
+
* contains a lot of high frequencies. Unfortunatelly the webaudio API does not support resampling
|
|
18
|
+
* buffers in real time, so it is not possible to fix it properly. Depending on the use case it might
|
|
19
|
+
* be an option to low pass filter your input before frequency shifting it to get ride of the aliasing.
|
|
20
|
+
* You can find a very detailed description of the algorithm here: https://larzeitlin.github.io/RMFS/
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const input = new Tone.Oscillator(230, "sawtooth").start();
|
|
24
|
+
* const shift = new Tone.FrequencyShifter(42).toDestination();
|
|
25
|
+
* input.connect(shift);
|
|
26
|
+
* @category Effect
|
|
27
|
+
*/
|
|
28
|
+
export class FrequencyShifter extends Effect {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(optionsFromArguments(FrequencyShifter.getDefaults(), arguments, ["frequency"]));
|
|
31
|
+
this.name = "FrequencyShifter";
|
|
32
|
+
const options = optionsFromArguments(FrequencyShifter.getDefaults(), arguments, ["frequency"]);
|
|
33
|
+
this.frequency = new Signal({
|
|
34
|
+
context: this.context,
|
|
35
|
+
units: "frequency",
|
|
36
|
+
value: options.frequency,
|
|
37
|
+
minValue: -this.context.sampleRate / 2,
|
|
38
|
+
maxValue: this.context.sampleRate / 2,
|
|
39
|
+
});
|
|
40
|
+
this._sine = new ToneOscillatorNode({
|
|
41
|
+
context: this.context,
|
|
42
|
+
type: "sine",
|
|
43
|
+
});
|
|
44
|
+
this._cosine = new Oscillator({
|
|
45
|
+
context: this.context,
|
|
46
|
+
phase: -90,
|
|
47
|
+
type: "sine",
|
|
48
|
+
});
|
|
49
|
+
this._sineMultiply = new Multiply({ context: this.context });
|
|
50
|
+
this._cosineMultiply = new Multiply({ context: this.context });
|
|
51
|
+
this._negate = new Negate({ context: this.context });
|
|
52
|
+
this._add = new Add({ context: this.context });
|
|
53
|
+
this._phaseShifter = new PhaseShiftAllpass({ context: this.context });
|
|
54
|
+
this.effectSend.connect(this._phaseShifter);
|
|
55
|
+
// connect the carrier frequency signal to the two oscillators
|
|
56
|
+
this.frequency.fan(this._sine.frequency, this._cosine.frequency);
|
|
57
|
+
this._phaseShifter.offset90.connect(this._cosineMultiply);
|
|
58
|
+
this._cosine.connect(this._cosineMultiply.factor);
|
|
59
|
+
this._phaseShifter.connect(this._sineMultiply);
|
|
60
|
+
this._sine.connect(this._sineMultiply.factor);
|
|
61
|
+
this._sineMultiply.connect(this._negate);
|
|
62
|
+
this._cosineMultiply.connect(this._add);
|
|
63
|
+
this._negate.connect(this._add.addend);
|
|
64
|
+
this._add.connect(this.effectReturn);
|
|
65
|
+
// start the oscillators at the same time
|
|
66
|
+
const now = this.immediate();
|
|
67
|
+
this._sine.start(now);
|
|
68
|
+
this._cosine.start(now);
|
|
69
|
+
}
|
|
70
|
+
static getDefaults() {
|
|
71
|
+
return Object.assign(Effect.getDefaults(), {
|
|
72
|
+
frequency: 0,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
dispose() {
|
|
76
|
+
super.dispose();
|
|
77
|
+
this.frequency.dispose();
|
|
78
|
+
this._add.dispose();
|
|
79
|
+
this._cosine.dispose();
|
|
80
|
+
this._cosineMultiply.dispose();
|
|
81
|
+
this._negate.dispose();
|
|
82
|
+
this._phaseShifter.dispose();
|
|
83
|
+
this._sine.dispose();
|
|
84
|
+
this._sineMultiply.dispose();
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=FrequencyShifter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrequencyShifter.js","sourceRoot":"","sources":["../../../Tone/effect/FrequencyShifter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAiB,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,y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K,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,WAAW;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE;YAC1C,SAAS,EAAE,CAAC;SACZ,CAAC,CAAC;IACJ,CAAC;IAED,OAAO;QACN,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { NormalRange } from "../core/type/Units";
|
|
2
|
+
import { StereoEffect, StereoEffectOptions } from "./StereoEffect";
|
|
3
|
+
import { Signal } from "../signal/Signal";
|
|
4
|
+
export interface JCReverbOptions extends StereoEffectOptions {
|
|
5
|
+
roomSize: NormalRange;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)
|
|
9
|
+
* tuned by John Chowning in 1970.
|
|
10
|
+
* It is made up of three allpass filters and four [[FeedbackCombFilter]].
|
|
11
|
+
* JCReverb is now implemented with an AudioWorkletNode which may result on performance degradation on some platforms. Consider using [[Reverb]].
|
|
12
|
+
* @example
|
|
13
|
+
* const reverb = new Tone.JCReverb(0.4).toDestination();
|
|
14
|
+
* const delay = new Tone.FeedbackDelay(0.5);
|
|
15
|
+
* // connecting the synth to reverb through delay
|
|
16
|
+
* const synth = new Tone.DuoSynth().chain(delay, reverb);
|
|
17
|
+
* synth.triggerAttackRelease("A4", "8n");
|
|
18
|
+
*
|
|
19
|
+
* @category Effect
|
|
20
|
+
*/
|
|
21
|
+
export declare class JCReverb extends StereoEffect<JCReverbOptions> {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
/**
|
|
24
|
+
* Room size control values.
|
|
25
|
+
*/
|
|
26
|
+
readonly roomSize: Signal<"normalRange">;
|
|
27
|
+
/**
|
|
28
|
+
* Scale the room size
|
|
29
|
+
*/
|
|
30
|
+
private _scaleRoomSize;
|
|
31
|
+
/**
|
|
32
|
+
* a series of allpass filters
|
|
33
|
+
*/
|
|
34
|
+
private _allpassFilters;
|
|
35
|
+
/**
|
|
36
|
+
* parallel feedback comb filters
|
|
37
|
+
*/
|
|
38
|
+
private _feedbackCombFilters;
|
|
39
|
+
/**
|
|
40
|
+
* @param roomSize Correlated to the decay time.
|
|
41
|
+
*/
|
|
42
|
+
constructor(roomSize?: NormalRange);
|
|
43
|
+
constructor(options?: Partial<JCReverbOptions>);
|
|
44
|
+
static getDefaults(): JCReverbOptions;
|
|
45
|
+
dispose(): this;
|
|
46
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { StereoEffect } from "./StereoEffect";
|
|
2
|
+
import { optionsFromArguments } from "../core/util/Defaults";
|
|
3
|
+
import { Scale } from "../signal/Scale";
|
|
4
|
+
import { Signal } from "../signal/Signal";
|
|
5
|
+
import { FeedbackCombFilter } from "../component/filter/FeedbackCombFilter";
|
|
6
|
+
import { readOnly } from "../core/util/Interface";
|
|
7
|
+
/**
|
|
8
|
+
* an array of the comb filter delay time values
|
|
9
|
+
*/
|
|
10
|
+
const combFilterDelayTimes = [1687 / 25000, 1601 / 25000, 2053 / 25000, 2251 / 25000];
|
|
11
|
+
/**
|
|
12
|
+
* the resonances of each of the comb filters
|
|
13
|
+
*/
|
|
14
|
+
const combFilterResonances = [0.773, 0.802, 0.753, 0.733];
|
|
15
|
+
/**
|
|
16
|
+
* the allpass filter frequencies
|
|
17
|
+
*/
|
|
18
|
+
const allpassFilterFreqs = [347, 113, 37];
|
|
19
|
+
/**
|
|
20
|
+
* JCReverb is a simple [Schroeder Reverberator](https://ccrma.stanford.edu/~jos/pasp/Schroeder_Reverberators.html)
|
|
21
|
+
* tuned by John Chowning in 1970.
|
|
22
|
+
* It is made up of three allpass filters and four [[FeedbackCombFilter]].
|
|
23
|
+
* JCReverb is now implemented with an AudioWorkletNode which may result on performance degradation on some platforms. Consider using [[Reverb]].
|
|
24
|
+
* @example
|
|
25
|
+
* const reverb = new Tone.JCReverb(0.4).toDestination();
|
|
26
|
+
* const delay = new Tone.FeedbackDelay(0.5);
|
|
27
|
+
* // connecting the synth to reverb through delay
|
|
28
|
+
* const synth = new Tone.DuoSynth().chain(delay, reverb);
|
|
29
|
+
* synth.triggerAttackRelease("A4", "8n");
|
|
30
|
+
*
|
|
31
|
+
* @category Effect
|
|
32
|
+
*/
|
|
33
|
+
export class JCReverb extends StereoEffect {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(optionsFromArguments(JCReverb.getDefaults(), arguments, ["roomSize"]));
|
|
36
|
+
this.name = "JCReverb";
|
|
37
|
+
/**
|
|
38
|
+
* a series of allpass filters
|
|
39
|
+
*/
|
|
40
|
+
this._allpassFilters = [];
|
|
41
|
+
/**
|
|
42
|
+
* parallel feedback comb filters
|
|
43
|
+
*/
|
|
44
|
+
this._feedbackCombFilters = [];
|
|
45
|
+
const options = optionsFromArguments(JCReverb.getDefaults(), arguments, ["roomSize"]);
|
|
46
|
+
this.roomSize = new Signal({
|
|
47
|
+
context: this.context,
|
|
48
|
+
value: options.roomSize,
|
|
49
|
+
units: "normalRange",
|
|
50
|
+
});
|
|
51
|
+
this._scaleRoomSize = new Scale({
|
|
52
|
+
context: this.context,
|
|
53
|
+
min: -0.733,
|
|
54
|
+
max: 0.197,
|
|
55
|
+
});
|
|
56
|
+
// make the allpass filters
|
|
57
|
+
this._allpassFilters = allpassFilterFreqs.map(freq => {
|
|
58
|
+
const allpass = this.context.createBiquadFilter();
|
|
59
|
+
allpass.type = "allpass";
|
|
60
|
+
allpass.frequency.value = freq;
|
|
61
|
+
return allpass;
|
|
62
|
+
});
|
|
63
|
+
// and the comb filters
|
|
64
|
+
this._feedbackCombFilters = combFilterDelayTimes.map((delayTime, index) => {
|
|
65
|
+
const fbcf = new FeedbackCombFilter({
|
|
66
|
+
context: this.context,
|
|
67
|
+
delayTime,
|
|
68
|
+
});
|
|
69
|
+
this._scaleRoomSize.connect(fbcf.resonance);
|
|
70
|
+
fbcf.resonance.value = combFilterResonances[index];
|
|
71
|
+
if (index < combFilterDelayTimes.length / 2) {
|
|
72
|
+
this.connectEffectLeft(...this._allpassFilters, fbcf);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.connectEffectRight(...this._allpassFilters, fbcf);
|
|
76
|
+
}
|
|
77
|
+
return fbcf;
|
|
78
|
+
});
|
|
79
|
+
// chain the allpass filters together
|
|
80
|
+
this.roomSize.connect(this._scaleRoomSize);
|
|
81
|
+
readOnly(this, ["roomSize"]);
|
|
82
|
+
}
|
|
83
|
+
static getDefaults() {
|
|
84
|
+
return Object.assign(StereoEffect.getDefaults(), {
|
|
85
|
+
roomSize: 0.5,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
dispose() {
|
|
89
|
+
super.dispose();
|
|
90
|
+
this._allpassFilters.forEach(apf => apf.disconnect());
|
|
91
|
+
this._feedbackCombFilters.forEach(fbcf => fbcf.dispose());
|
|
92
|
+
this.roomSize.dispose();
|
|
93
|
+
this._scaleRoomSize.dispose();
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=JCReverb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JCReverb.js","sourceRoot":"","sources":["../../../Tone/effect/J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AAC;QAC3C,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,WAAW;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE;YAChD,QAAQ,EAAE,GAAG;SACb,CAAC,CAAC;IACJ,CAAC;IAED,OAAO;QACN,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Effect, EffectOptions } from "../effect/Effect";
|
|
2
|
+
import { Frequency, NormalRange, Time } from "../core/type/Units";
|
|
3
|
+
import { LFO } from "../source/oscillator/LFO";
|
|
4
|
+
import { ToneOscillatorType } from "../source/oscillator/OscillatorInterface";
|
|
5
|
+
import { Signal } from "../signal/Signal";
|
|
6
|
+
import { Param } from "../core/context/Param";
|
|
7
|
+
export interface LFOEffectOptions extends EffectOptions {
|
|
8
|
+
frequency: Frequency;
|
|
9
|
+
type: ToneOscillatorType;
|
|
10
|
+
depth: NormalRange;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Base class for LFO-based effects.
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class LFOEffect<Options extends LFOEffectOptions> extends Effect<Options> {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/**
|
|
18
|
+
* the lfo which drives the filter cutoff
|
|
19
|
+
*/
|
|
20
|
+
protected _lfo: LFO;
|
|
21
|
+
/**
|
|
22
|
+
* The range of the filter modulating between the min and max frequency.
|
|
23
|
+
* 0 = no modulation. 1 = full modulation.
|
|
24
|
+
*/
|
|
25
|
+
readonly depth: Param<"normalRange">;
|
|
26
|
+
/**
|
|
27
|
+
* How fast the filter modulates between min and max.
|
|
28
|
+
*/
|
|
29
|
+
readonly frequency: Signal<"frequency">;
|
|
30
|
+
constructor(options: LFOEffectOptions);
|
|
31
|
+
static getDefaults(): LFOEffectOptions;
|
|
32
|
+
/**
|
|
33
|
+
* Start the effect.
|
|
34
|
+
*/
|
|
35
|
+
start(time?: Time): this;
|
|
36
|
+
/**
|
|
37
|
+
* Stop the lfo
|
|
38
|
+
*/
|
|
39
|
+
stop(time?: Time): this;
|
|
40
|
+
/**
|
|
41
|
+
* Sync the filter to the transport. See [[LFO.sync]]
|
|
42
|
+
*/
|
|
43
|
+
sync(): this;
|
|
44
|
+
/**
|
|
45
|
+
* Unsync the filter from the transport.
|
|
46
|
+
*/
|
|
47
|
+
unsync(): this;
|
|
48
|
+
/**
|
|
49
|
+
* The type of the LFO's oscillator: See [[Oscillator.type]]
|
|
50
|
+
* @example
|
|
51
|
+
* const autoFilter = new Tone.AutoFilter().start().toDestination();
|
|
52
|
+
* const noise = new Tone.Noise().start().connect(autoFilter);
|
|
53
|
+
* autoFilter.type = "square";
|
|
54
|
+
*/
|
|
55
|
+
get type(): ToneOscillatorType;
|
|
56
|
+
set type(type: ToneOscillatorType);
|
|
57
|
+
dispose(): this;
|
|
58
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Effect } from "../effect/Effect";
|
|
2
|
+
import { LFO } from "../source/oscillator/LFO";
|
|
3
|
+
import { readOnly } from "../core/util/Interface";
|
|
4
|
+
/**
|
|
5
|
+
* Base class for LFO-based effects.
|
|
6
|
+
*/
|
|
7
|
+
export class LFOEffect extends Effect {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options);
|
|
10
|
+
this.name = "LFOEffect";
|
|
11
|
+
this._lfo = new LFO({
|
|
12
|
+
context: this.context,
|
|
13
|
+
frequency: options.frequency,
|
|
14
|
+
amplitude: options.depth,
|
|
15
|
+
});
|
|
16
|
+
this.depth = this._lfo.amplitude;
|
|
17
|
+
this.frequency = this._lfo.frequency;
|
|
18
|
+
this.type = options.type;
|
|
19
|
+
readOnly(this, ["frequency", "depth"]);
|
|
20
|
+
}
|
|
21
|
+
static getDefaults() {
|
|
22
|
+
return Object.assign(Effect.getDefaults(), {
|
|
23
|
+
frequency: 1,
|
|
24
|
+
type: "sine",
|
|
25
|
+
depth: 1,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Start the effect.
|
|
30
|
+
*/
|
|
31
|
+
start(time) {
|
|
32
|
+
this._lfo.start(time);
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Stop the lfo
|
|
37
|
+
*/
|
|
38
|
+
stop(time) {
|
|
39
|
+
this._lfo.stop(time);
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Sync the filter to the transport. See [[LFO.sync]]
|
|
44
|
+
*/
|
|
45
|
+
sync() {
|
|
46
|
+
this._lfo.sync();
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Unsync the filter from the transport.
|
|
51
|
+
*/
|
|
52
|
+
unsync() {
|
|
53
|
+
this._lfo.unsync();
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The type of the LFO's oscillator: See [[Oscillator.type]]
|
|
58
|
+
* @example
|
|
59
|
+
* const autoFilter = new Tone.AutoFilter().start().toDestination();
|
|
60
|
+
* const noise = new Tone.Noise().start().connect(autoFilter);
|
|
61
|
+
* autoFilter.type = "square";
|
|
62
|
+
*/
|
|
63
|
+
get type() {
|
|
64
|
+
return this._lfo.type;
|
|
65
|
+
}
|
|
66
|
+
set type(type) {
|
|
67
|
+
this._lfo.type = type;
|
|
68
|
+
}
|
|
69
|
+
dispose() {
|
|
70
|
+
super.dispose();
|
|
71
|
+
this._lfo.dispose();
|
|
72
|
+
this.frequency.dispose();
|
|
73
|
+
this.depth.dispose();
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=LFOEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LFOEffect.js","sourceRoot":"","sources":["../../../Tone/effect/LFOEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAG/C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AASlD;;GAEG;AACH,MAAM,OAAgB,SAA4C,SAAQ,MAAe;IAoBxF,YAAY,OAAyB;QAEpC,KAAK,CAAC,OAAO,CAAC,CAAC;QApBP,SAAI,GAAW,WAAW,CAAC;QAsBnC,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,OAAO,CAAC,KAAK;SACxB,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QAErC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,WAAW;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE;YAC1C,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE,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