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,64 @@
|
|
|
1
|
+
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
|
2
|
+
import { Cents, Frequency, GainFactor } from "../../core/type/Units";
|
|
3
|
+
import { Param } from "../../core/context/Param";
|
|
4
|
+
export interface BiquadFilterOptions extends ToneAudioNodeOptions {
|
|
5
|
+
frequency: Frequency;
|
|
6
|
+
detune: Cents;
|
|
7
|
+
Q: number;
|
|
8
|
+
type: BiquadFilterType;
|
|
9
|
+
gain: GainFactor;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Thin wrapper around the native Web Audio [BiquadFilterNode](https://webaudio.github.io/web-audio-api/#biquadfilternode).
|
|
13
|
+
* BiquadFilter is similar to [[Filter]] but doesn't have the option to set the "rolloff" value.
|
|
14
|
+
* @category Component
|
|
15
|
+
*/
|
|
16
|
+
export declare class BiquadFilter extends ToneAudioNode<BiquadFilterOptions> {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly input: BiquadFilterNode;
|
|
19
|
+
readonly output: BiquadFilterNode;
|
|
20
|
+
/**
|
|
21
|
+
* The frequency of the filter
|
|
22
|
+
*/
|
|
23
|
+
readonly frequency: Param<"frequency">;
|
|
24
|
+
/**
|
|
25
|
+
* A detune value, in cents, for the frequency.
|
|
26
|
+
*/
|
|
27
|
+
readonly detune: Param<"cents">;
|
|
28
|
+
/**
|
|
29
|
+
* The Q factor of the filter.
|
|
30
|
+
* For lowpass and highpass filters the Q value is interpreted to be in dB.
|
|
31
|
+
* For these filters the nominal range is [−𝑄𝑙𝑖𝑚,𝑄𝑙𝑖𝑚] where 𝑄𝑙𝑖𝑚 is the largest value for which 10𝑄/20 does not overflow. This is approximately 770.63678.
|
|
32
|
+
* For the bandpass, notch, allpass, and peaking filters, this value is a linear value.
|
|
33
|
+
* The value is related to the bandwidth of the filter and hence should be a positive value. The nominal range is
|
|
34
|
+
* [0,3.4028235𝑒38], the upper limit being the most-positive-single-float.
|
|
35
|
+
* This is not used for the lowshelf and highshelf filters.
|
|
36
|
+
*/
|
|
37
|
+
readonly Q: Param<"number">;
|
|
38
|
+
/**
|
|
39
|
+
* The gain of the filter. Its value is in dB units. The gain is only used for lowshelf, highshelf, and peaking filters.
|
|
40
|
+
*/
|
|
41
|
+
readonly gain: Param<"decibels">;
|
|
42
|
+
private readonly _filter;
|
|
43
|
+
/**
|
|
44
|
+
* @param frequency The cutoff frequency of the filter.
|
|
45
|
+
* @param type The type of filter.
|
|
46
|
+
*/
|
|
47
|
+
constructor(frequency?: Frequency, type?: BiquadFilterType);
|
|
48
|
+
constructor(options?: Partial<BiquadFilterOptions>);
|
|
49
|
+
static getDefaults(): BiquadFilterOptions;
|
|
50
|
+
/**
|
|
51
|
+
* The type of this BiquadFilterNode. For a complete list of types and their attributes, see the
|
|
52
|
+
* [Web Audio API](https://webaudio.github.io/web-audio-api/#dom-biquadfiltertype-lowpass)
|
|
53
|
+
*/
|
|
54
|
+
get type(): BiquadFilterType;
|
|
55
|
+
set type(type: BiquadFilterType);
|
|
56
|
+
/**
|
|
57
|
+
* Get the frequency response curve. This curve represents how the filter
|
|
58
|
+
* responses to frequencies between 20hz-20khz.
|
|
59
|
+
* @param len The number of values to return
|
|
60
|
+
* @return The frequency response curve between 20-20kHz
|
|
61
|
+
*/
|
|
62
|
+
getFrequencyResponse(len?: number): Float32Array;
|
|
63
|
+
dispose(): this;
|
|
64
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ToneAudioNode } from "../../core/context/ToneAudioNode";
|
|
2
|
+
import { optionsFromArguments } from "../../core/util/Defaults";
|
|
3
|
+
import { Param } from "../../core/context/Param";
|
|
4
|
+
import { assert } from "../../core/util/Debug";
|
|
5
|
+
/**
|
|
6
|
+
* Thin wrapper around the native Web Audio [BiquadFilterNode](https://webaudio.github.io/web-audio-api/#biquadfilternode).
|
|
7
|
+
* BiquadFilter is similar to [[Filter]] but doesn't have the option to set the "rolloff" value.
|
|
8
|
+
* @category Component
|
|
9
|
+
*/
|
|
10
|
+
export class BiquadFilter extends ToneAudioNode {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(optionsFromArguments(BiquadFilter.getDefaults(), arguments, ["frequency", "type"]));
|
|
13
|
+
this.name = "BiquadFilter";
|
|
14
|
+
const options = optionsFromArguments(BiquadFilter.getDefaults(), arguments, ["frequency", "type"]);
|
|
15
|
+
this._filter = this.context.createBiquadFilter();
|
|
16
|
+
this.input = this.output = this._filter;
|
|
17
|
+
this.Q = new Param({
|
|
18
|
+
context: this.context,
|
|
19
|
+
units: "number",
|
|
20
|
+
value: options.Q,
|
|
21
|
+
param: this._filter.Q,
|
|
22
|
+
});
|
|
23
|
+
this.frequency = new Param({
|
|
24
|
+
context: this.context,
|
|
25
|
+
units: "frequency",
|
|
26
|
+
value: options.frequency,
|
|
27
|
+
param: this._filter.frequency,
|
|
28
|
+
});
|
|
29
|
+
this.detune = new Param({
|
|
30
|
+
context: this.context,
|
|
31
|
+
units: "cents",
|
|
32
|
+
value: options.detune,
|
|
33
|
+
param: this._filter.detune,
|
|
34
|
+
});
|
|
35
|
+
this.gain = new Param({
|
|
36
|
+
context: this.context,
|
|
37
|
+
units: "decibels",
|
|
38
|
+
convert: false,
|
|
39
|
+
value: options.gain,
|
|
40
|
+
param: this._filter.gain,
|
|
41
|
+
});
|
|
42
|
+
this.type = options.type;
|
|
43
|
+
}
|
|
44
|
+
static getDefaults() {
|
|
45
|
+
return Object.assign(ToneAudioNode.getDefaults(), {
|
|
46
|
+
Q: 1,
|
|
47
|
+
type: "lowpass",
|
|
48
|
+
frequency: 350,
|
|
49
|
+
detune: 0,
|
|
50
|
+
gain: 0,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The type of this BiquadFilterNode. For a complete list of types and their attributes, see the
|
|
55
|
+
* [Web Audio API](https://webaudio.github.io/web-audio-api/#dom-biquadfiltertype-lowpass)
|
|
56
|
+
*/
|
|
57
|
+
get type() {
|
|
58
|
+
return this._filter.type;
|
|
59
|
+
}
|
|
60
|
+
set type(type) {
|
|
61
|
+
const types = ["lowpass", "highpass", "bandpass",
|
|
62
|
+
"lowshelf", "highshelf", "notch", "allpass", "peaking"];
|
|
63
|
+
assert(types.indexOf(type) !== -1, `Invalid filter type: ${type}`);
|
|
64
|
+
this._filter.type = type;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get the frequency response curve. This curve represents how the filter
|
|
68
|
+
* responses to frequencies between 20hz-20khz.
|
|
69
|
+
* @param len The number of values to return
|
|
70
|
+
* @return The frequency response curve between 20-20kHz
|
|
71
|
+
*/
|
|
72
|
+
getFrequencyResponse(len = 128) {
|
|
73
|
+
// start with all 1s
|
|
74
|
+
const freqValues = new Float32Array(len);
|
|
75
|
+
for (let i = 0; i < len; i++) {
|
|
76
|
+
const norm = Math.pow(i / len, 2);
|
|
77
|
+
const freq = norm * (20000 - 20) + 20;
|
|
78
|
+
freqValues[i] = freq;
|
|
79
|
+
}
|
|
80
|
+
const magValues = new Float32Array(len);
|
|
81
|
+
const phaseValues = new Float32Array(len);
|
|
82
|
+
// clone the filter to remove any connections which may be changing the value
|
|
83
|
+
const filterClone = this.context.createBiquadFilter();
|
|
84
|
+
filterClone.type = this.type;
|
|
85
|
+
filterClone.Q.value = this.Q.value;
|
|
86
|
+
filterClone.frequency.value = this.frequency.value;
|
|
87
|
+
filterClone.gain.value = this.gain.value;
|
|
88
|
+
filterClone.getFrequencyResponse(freqValues, magValues, phaseValues);
|
|
89
|
+
return magValues;
|
|
90
|
+
}
|
|
91
|
+
dispose() {
|
|
92
|
+
super.dispose();
|
|
93
|
+
this._filter.disconnect();
|
|
94
|
+
this.Q.dispose();
|
|
95
|
+
this.frequency.dispose();
|
|
96
|
+
this.gain.dispose();
|
|
97
|
+
this.detune.dispose();
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=BiquadFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BiquadFilter.js","sourceRoot":"","sources":["../../../../Tone/component/filter/BiquadFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAwB,MAAM,kCAAkC,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAU/C;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,aAAkC;IAwCnE;QACC,KAAK,CAAC,oBAAoB,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QAxClF,SAAI,GAAW,cAAc,CAAC;QAyCtC,MAAM,OAAO,GAAG,oBAAoB,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;QAEnG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAExC,IAAI,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC;YAClB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,OAAO,CAAC,CAAC;YAChB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACrB,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,CAAC;YAC1B,OAAO,EAAE,IAAI,CAA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,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACjB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
|
2
|
+
import { ToneAudioBuffer } from "../../core/context/ToneAudioBuffer";
|
|
3
|
+
import { Gain } from "../../core/context/Gain";
|
|
4
|
+
export interface ConvolverOptions extends ToneAudioNodeOptions {
|
|
5
|
+
onload: () => void;
|
|
6
|
+
normalize: boolean;
|
|
7
|
+
url?: string | AudioBuffer | ToneAudioBuffer;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Convolver is a wrapper around the Native Web Audio
|
|
11
|
+
* [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).
|
|
12
|
+
* Convolution is useful for reverb and filter emulation. Read more about convolution reverb on
|
|
13
|
+
* [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // initializing the convolver with an impulse response
|
|
17
|
+
* const convolver = new Tone.Convolver("./path/to/ir.wav").toDestination();
|
|
18
|
+
* @category Component
|
|
19
|
+
*/
|
|
20
|
+
export declare class Convolver extends ToneAudioNode<ConvolverOptions> {
|
|
21
|
+
readonly name: string;
|
|
22
|
+
/**
|
|
23
|
+
* The native ConvolverNode
|
|
24
|
+
*/
|
|
25
|
+
private _convolver;
|
|
26
|
+
/**
|
|
27
|
+
* The Buffer belonging to the convolver
|
|
28
|
+
*/
|
|
29
|
+
private _buffer;
|
|
30
|
+
readonly input: Gain;
|
|
31
|
+
readonly output: Gain;
|
|
32
|
+
/**
|
|
33
|
+
* @param url The URL of the impulse response or the ToneAudioBuffer containing the impulse response.
|
|
34
|
+
* @param onload The callback to invoke when the url is loaded.
|
|
35
|
+
*/
|
|
36
|
+
constructor(url?: string | AudioBuffer | ToneAudioBuffer, onload?: () => void);
|
|
37
|
+
constructor(options?: Partial<ConvolverOptions>);
|
|
38
|
+
static getDefaults(): ConvolverOptions;
|
|
39
|
+
/**
|
|
40
|
+
* Load an impulse response url as an audio buffer.
|
|
41
|
+
* Decodes the audio asynchronously and invokes
|
|
42
|
+
* the callback once the audio buffer loads.
|
|
43
|
+
* @param url The url of the buffer to load. filetype support depends on the browser.
|
|
44
|
+
*/
|
|
45
|
+
load(url: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* The convolver's buffer
|
|
48
|
+
*/
|
|
49
|
+
get buffer(): ToneAudioBuffer | null;
|
|
50
|
+
set buffer(buffer: ToneAudioBuffer | null);
|
|
51
|
+
/**
|
|
52
|
+
* The normalize property of the ConvolverNode interface is a boolean that
|
|
53
|
+
* controls whether the impulse response from the buffer will be scaled by
|
|
54
|
+
* an equal-power normalization when the buffer attribute is set, or not.
|
|
55
|
+
*/
|
|
56
|
+
get normalize(): boolean;
|
|
57
|
+
set normalize(norm: boolean);
|
|
58
|
+
dispose(): this;
|
|
59
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { ToneAudioNode } from "../../core/context/ToneAudioNode";
|
|
3
|
+
import { ToneAudioBuffer } from "../../core/context/ToneAudioBuffer";
|
|
4
|
+
import { optionsFromArguments } from "../../core/util/Defaults";
|
|
5
|
+
import { Gain } from "../../core/context/Gain";
|
|
6
|
+
import { noOp } from "../../core/util/Interface";
|
|
7
|
+
/**
|
|
8
|
+
* Convolver is a wrapper around the Native Web Audio
|
|
9
|
+
* [ConvolverNode](http://webaudio.github.io/web-audio-api/#the-convolvernode-interface).
|
|
10
|
+
* Convolution is useful for reverb and filter emulation. Read more about convolution reverb on
|
|
11
|
+
* [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // initializing the convolver with an impulse response
|
|
15
|
+
* const convolver = new Tone.Convolver("./path/to/ir.wav").toDestination();
|
|
16
|
+
* @category Component
|
|
17
|
+
*/
|
|
18
|
+
export class Convolver extends ToneAudioNode {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(optionsFromArguments(Convolver.getDefaults(), arguments, ["url", "onload"]));
|
|
21
|
+
this.name = "Convolver";
|
|
22
|
+
/**
|
|
23
|
+
* The native ConvolverNode
|
|
24
|
+
*/
|
|
25
|
+
this._convolver = this.context.createConvolver();
|
|
26
|
+
const options = optionsFromArguments(Convolver.getDefaults(), arguments, ["url", "onload"]);
|
|
27
|
+
this._buffer = new ToneAudioBuffer(options.url, buffer => {
|
|
28
|
+
this.buffer = buffer;
|
|
29
|
+
options.onload();
|
|
30
|
+
});
|
|
31
|
+
this.input = new Gain({ context: this.context });
|
|
32
|
+
this.output = new Gain({ context: this.context });
|
|
33
|
+
// set if it's already loaded, set it immediately
|
|
34
|
+
if (this._buffer.loaded) {
|
|
35
|
+
this.buffer = this._buffer;
|
|
36
|
+
}
|
|
37
|
+
// initially set normalization
|
|
38
|
+
this.normalize = options.normalize;
|
|
39
|
+
// connect it up
|
|
40
|
+
this.input.chain(this._convolver, this.output);
|
|
41
|
+
}
|
|
42
|
+
static getDefaults() {
|
|
43
|
+
return Object.assign(ToneAudioNode.getDefaults(), {
|
|
44
|
+
normalize: true,
|
|
45
|
+
onload: noOp,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Load an impulse response url as an audio buffer.
|
|
50
|
+
* Decodes the audio asynchronously and invokes
|
|
51
|
+
* the callback once the audio buffer loads.
|
|
52
|
+
* @param url The url of the buffer to load. filetype support depends on the browser.
|
|
53
|
+
*/
|
|
54
|
+
load(url) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
this.buffer = yield this._buffer.load(url);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The convolver's buffer
|
|
61
|
+
*/
|
|
62
|
+
get buffer() {
|
|
63
|
+
if (this._buffer.length) {
|
|
64
|
+
return this._buffer;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
set buffer(buffer) {
|
|
71
|
+
if (buffer) {
|
|
72
|
+
this._buffer.set(buffer);
|
|
73
|
+
}
|
|
74
|
+
// if it's already got a buffer, create a new one
|
|
75
|
+
if (this._convolver.buffer) {
|
|
76
|
+
// disconnect the old one
|
|
77
|
+
this.input.disconnect();
|
|
78
|
+
this._convolver.disconnect();
|
|
79
|
+
// create and connect a new one
|
|
80
|
+
this._convolver = this.context.createConvolver();
|
|
81
|
+
this.input.chain(this._convolver, this.output);
|
|
82
|
+
}
|
|
83
|
+
const buff = this._buffer.get();
|
|
84
|
+
this._convolver.buffer = buff ? buff : null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The normalize property of the ConvolverNode interface is a boolean that
|
|
88
|
+
* controls whether the impulse response from the buffer will be scaled by
|
|
89
|
+
* an equal-power normalization when the buffer attribute is set, or not.
|
|
90
|
+
*/
|
|
91
|
+
get normalize() {
|
|
92
|
+
return this._convolver.normalize;
|
|
93
|
+
}
|
|
94
|
+
set normalize(norm) {
|
|
95
|
+
this._convolver.normalize = norm;
|
|
96
|
+
}
|
|
97
|
+
dispose() {
|
|
98
|
+
super.dispose();
|
|
99
|
+
this._buffer.dispose();
|
|
100
|
+
this._convolver.disconnect();
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=Convolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Convolver.js","sourceRoot":"","sources":["../../../../Tone/component/filter/Convolver.ts"],"names":[],"mappings":";AAAA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IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;IAClC,CAAC;IACD,IAAI,SAAS,CAAC,IAAI;QACjB,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC;IAClC,CAAC;IAED,OAAO;QACN,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Gain } from "../../core/context/Gain";
|
|
2
|
+
import { Param } from "../../core/context/Param";
|
|
3
|
+
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
|
4
|
+
import { Decibels, Frequency } from "../../core/type/Units";
|
|
5
|
+
import { Signal } from "../../signal/Signal";
|
|
6
|
+
import { MultibandSplit } from "../channel/MultibandSplit";
|
|
7
|
+
interface EQ3Options extends ToneAudioNodeOptions {
|
|
8
|
+
low: Decibels;
|
|
9
|
+
mid: Decibels;
|
|
10
|
+
high: Decibels;
|
|
11
|
+
lowFrequency: Frequency;
|
|
12
|
+
highFrequency: Frequency;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* EQ3 provides 3 equalizer bins: Low/Mid/High.
|
|
16
|
+
* @category Component
|
|
17
|
+
*/
|
|
18
|
+
export declare class EQ3 extends ToneAudioNode<EQ3Options> {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/**
|
|
21
|
+
* the input
|
|
22
|
+
*/
|
|
23
|
+
readonly input: MultibandSplit;
|
|
24
|
+
/**
|
|
25
|
+
* the output
|
|
26
|
+
*/
|
|
27
|
+
readonly output: Gain<"gain">;
|
|
28
|
+
/**
|
|
29
|
+
* Splits the input into three outputs
|
|
30
|
+
*/
|
|
31
|
+
private _multibandSplit;
|
|
32
|
+
/**
|
|
33
|
+
* The gain for the lower signals
|
|
34
|
+
*/
|
|
35
|
+
private _lowGain;
|
|
36
|
+
/**
|
|
37
|
+
* The gain for the mid signals
|
|
38
|
+
*/
|
|
39
|
+
private _midGain;
|
|
40
|
+
/**
|
|
41
|
+
* The gain for the high signals
|
|
42
|
+
*/
|
|
43
|
+
private _highGain;
|
|
44
|
+
/**
|
|
45
|
+
* The gain in decibels of the low part
|
|
46
|
+
*/
|
|
47
|
+
readonly low: Param<"decibels">;
|
|
48
|
+
/**
|
|
49
|
+
* The gain in decibels of the mid part
|
|
50
|
+
*/
|
|
51
|
+
readonly mid: Param<"decibels">;
|
|
52
|
+
/**
|
|
53
|
+
* The gain in decibels of the high part
|
|
54
|
+
*/
|
|
55
|
+
readonly high: Param<"decibels">;
|
|
56
|
+
/**
|
|
57
|
+
* The Q value for all of the filters.
|
|
58
|
+
*/
|
|
59
|
+
readonly Q: Signal<"positive">;
|
|
60
|
+
/**
|
|
61
|
+
* The low/mid crossover frequency.
|
|
62
|
+
*/
|
|
63
|
+
readonly lowFrequency: Signal<"frequency">;
|
|
64
|
+
/**
|
|
65
|
+
* The mid/high crossover frequency.
|
|
66
|
+
*/
|
|
67
|
+
readonly highFrequency: Signal<"frequency">;
|
|
68
|
+
protected _internalChannels: ToneAudioNode[];
|
|
69
|
+
constructor(lowLevel?: Decibels, midLevel?: Decibels, highLevel?: Decibels);
|
|
70
|
+
constructor(options: Partial<EQ3Options>);
|
|
71
|
+
static getDefaults(): EQ3Options;
|
|
72
|
+
/**
|
|
73
|
+
* Clean up.
|
|
74
|
+
*/
|
|
75
|
+
dispose(): this;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Gain } from "../../core/context/Gain";
|
|
2
|
+
import { ToneAudioNode } from "../../core/context/ToneAudioNode";
|
|
3
|
+
import { optionsFromArguments } from "../../core/util/Defaults";
|
|
4
|
+
import { readOnly, writable } from "../../core/util/Interface";
|
|
5
|
+
import { MultibandSplit } from "../channel/MultibandSplit";
|
|
6
|
+
/**
|
|
7
|
+
* EQ3 provides 3 equalizer bins: Low/Mid/High.
|
|
8
|
+
* @category Component
|
|
9
|
+
*/
|
|
10
|
+
export class EQ3 extends ToneAudioNode {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(optionsFromArguments(EQ3.getDefaults(), arguments, ["low", "mid", "high"]));
|
|
13
|
+
this.name = "EQ3";
|
|
14
|
+
/**
|
|
15
|
+
* the output
|
|
16
|
+
*/
|
|
17
|
+
this.output = new Gain({ context: this.context });
|
|
18
|
+
this._internalChannels = [];
|
|
19
|
+
const options = optionsFromArguments(EQ3.getDefaults(), arguments, ["low", "mid", "high"]);
|
|
20
|
+
this.input = this._multibandSplit = new MultibandSplit({
|
|
21
|
+
context: this.context,
|
|
22
|
+
highFrequency: options.highFrequency,
|
|
23
|
+
lowFrequency: options.lowFrequency,
|
|
24
|
+
});
|
|
25
|
+
this._lowGain = new Gain({
|
|
26
|
+
context: this.context,
|
|
27
|
+
gain: options.low,
|
|
28
|
+
units: "decibels",
|
|
29
|
+
});
|
|
30
|
+
this._midGain = new Gain({
|
|
31
|
+
context: this.context,
|
|
32
|
+
gain: options.mid,
|
|
33
|
+
units: "decibels",
|
|
34
|
+
});
|
|
35
|
+
this._highGain = new Gain({
|
|
36
|
+
context: this.context,
|
|
37
|
+
gain: options.high,
|
|
38
|
+
units: "decibels",
|
|
39
|
+
});
|
|
40
|
+
this.low = this._lowGain.gain;
|
|
41
|
+
this.mid = this._midGain.gain;
|
|
42
|
+
this.high = this._highGain.gain;
|
|
43
|
+
this.Q = this._multibandSplit.Q;
|
|
44
|
+
this.lowFrequency = this._multibandSplit.lowFrequency;
|
|
45
|
+
this.highFrequency = this._multibandSplit.highFrequency;
|
|
46
|
+
// the frequency bands
|
|
47
|
+
this._multibandSplit.low.chain(this._lowGain, this.output);
|
|
48
|
+
this._multibandSplit.mid.chain(this._midGain, this.output);
|
|
49
|
+
this._multibandSplit.high.chain(this._highGain, this.output);
|
|
50
|
+
readOnly(this, ["low", "mid", "high", "lowFrequency", "highFrequency"]);
|
|
51
|
+
this._internalChannels = [this._multibandSplit];
|
|
52
|
+
}
|
|
53
|
+
static getDefaults() {
|
|
54
|
+
return Object.assign(ToneAudioNode.getDefaults(), {
|
|
55
|
+
high: 0,
|
|
56
|
+
highFrequency: 2500,
|
|
57
|
+
low: 0,
|
|
58
|
+
lowFrequency: 400,
|
|
59
|
+
mid: 0,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Clean up.
|
|
64
|
+
*/
|
|
65
|
+
dispose() {
|
|
66
|
+
super.dispose();
|
|
67
|
+
writable(this, ["low", "mid", "high", "lowFrequency", "highFrequency"]);
|
|
68
|
+
this._multibandSplit.dispose();
|
|
69
|
+
this.lowFrequency.dispose();
|
|
70
|
+
this.highFrequency.dispose();
|
|
71
|
+
this._lowGain.dispose();
|
|
72
|
+
this._midGain.dispose();
|
|
73
|
+
this._highGain.dispose();
|
|
74
|
+
this.low.dispose();
|
|
75
|
+
this.mid.dispose();
|
|
76
|
+
this.high.dispose();
|
|
77
|
+
this.Q.dispose();
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=EQ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EQ3.js","sourceRoot":"","sources":["../../../../Tone/component/filter/EQ3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAwB,MAAM,kCAAkC,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE/D,O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C;QAChB,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC;QACxE,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACpB,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACb,CAAC;CAED"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Gain } from "../../core/context/Gain";
|
|
2
|
+
import { Param } from "../../core/context/Param";
|
|
3
|
+
import { ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
|
4
|
+
import { NormalRange, Time } from "../../core/type/Units";
|
|
5
|
+
import { RecursivePartial } from "../../core/util/Interface";
|
|
6
|
+
import { ToneAudioWorklet } from "../../core/worklet/ToneAudioWorklet";
|
|
7
|
+
export interface FeedbackCombFilterOptions extends ToneAudioNodeOptions {
|
|
8
|
+
delayTime: Time;
|
|
9
|
+
resonance: NormalRange;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Comb filters are basic building blocks for physical modeling. Read more
|
|
13
|
+
* about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).
|
|
14
|
+
*
|
|
15
|
+
* This comb filter is implemented with the AudioWorkletNode which allows it to have feedback delays less than the
|
|
16
|
+
* Web Audio processing block of 128 samples. There is a polyfill for browsers that don't yet support the
|
|
17
|
+
* AudioWorkletNode, but it will add some latency and have slower performance than the AudioWorkletNode.
|
|
18
|
+
* @category Component
|
|
19
|
+
*/
|
|
20
|
+
export declare class FeedbackCombFilter extends ToneAudioWorklet<FeedbackCombFilterOptions> {
|
|
21
|
+
readonly name = "FeedbackCombFilter";
|
|
22
|
+
/**
|
|
23
|
+
* The amount of delay of the comb filter.
|
|
24
|
+
*/
|
|
25
|
+
readonly delayTime: Param<"time">;
|
|
26
|
+
/**
|
|
27
|
+
* The amount of feedback of the delayed signal.
|
|
28
|
+
*/
|
|
29
|
+
readonly resonance: Param<"normalRange">;
|
|
30
|
+
readonly input: Gain;
|
|
31
|
+
readonly output: Gain;
|
|
32
|
+
/**
|
|
33
|
+
* @param delayTime The delay time of the filter.
|
|
34
|
+
* @param resonance The amount of feedback the filter has.
|
|
35
|
+
*/
|
|
36
|
+
constructor(delayTime?: Time, resonance?: NormalRange);
|
|
37
|
+
constructor(options?: RecursivePartial<FeedbackCombFilterOptions>);
|
|
38
|
+
protected _audioWorkletName(): string;
|
|
39
|
+
/**
|
|
40
|
+
* The default parameters
|
|
41
|
+
*/
|
|
42
|
+
static getDefaults(): FeedbackCombFilterOptions;
|
|
43
|
+
onReady(node: AudioWorkletNode): void;
|
|
44
|
+
dispose(): this;
|
|
45
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Gain } from "../../core/context/Gain";
|
|
2
|
+
import { Param } from "../../core/context/Param";
|
|
3
|
+
import { connectSeries, ToneAudioNode } from "../../core/context/ToneAudioNode";
|
|
4
|
+
import { optionsFromArguments } from "../../core/util/Defaults";
|
|
5
|
+
import { readOnly } from "../../core/util/Interface";
|
|
6
|
+
import { ToneAudioWorklet } from "../../core/worklet/ToneAudioWorklet";
|
|
7
|
+
import { workletName } from "./FeedbackCombFilter.worklet";
|
|
8
|
+
/**
|
|
9
|
+
* Comb filters are basic building blocks for physical modeling. Read more
|
|
10
|
+
* about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).
|
|
11
|
+
*
|
|
12
|
+
* This comb filter is implemented with the AudioWorkletNode which allows it to have feedback delays less than the
|
|
13
|
+
* Web Audio processing block of 128 samples. There is a polyfill for browsers that don't yet support the
|
|
14
|
+
* AudioWorkletNode, but it will add some latency and have slower performance than the AudioWorkletNode.
|
|
15
|
+
* @category Component
|
|
16
|
+
*/
|
|
17
|
+
export class FeedbackCombFilter extends ToneAudioWorklet {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(optionsFromArguments(FeedbackCombFilter.getDefaults(), arguments, ["delayTime", "resonance"]));
|
|
20
|
+
this.name = "FeedbackCombFilter";
|
|
21
|
+
const options = optionsFromArguments(FeedbackCombFilter.getDefaults(), arguments, ["delayTime", "resonance"]);
|
|
22
|
+
this.input = new Gain({ context: this.context });
|
|
23
|
+
this.output = new Gain({ context: this.context });
|
|
24
|
+
this.delayTime = new Param({
|
|
25
|
+
context: this.context,
|
|
26
|
+
value: options.delayTime,
|
|
27
|
+
units: "time",
|
|
28
|
+
minValue: 0,
|
|
29
|
+
maxValue: 1,
|
|
30
|
+
param: this._dummyParam,
|
|
31
|
+
swappable: true,
|
|
32
|
+
});
|
|
33
|
+
this.resonance = new Param({
|
|
34
|
+
context: this.context,
|
|
35
|
+
value: options.resonance,
|
|
36
|
+
units: "normalRange",
|
|
37
|
+
param: this._dummyParam,
|
|
38
|
+
swappable: true,
|
|
39
|
+
});
|
|
40
|
+
readOnly(this, ["resonance", "delayTime"]);
|
|
41
|
+
}
|
|
42
|
+
_audioWorkletName() {
|
|
43
|
+
return workletName;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The default parameters
|
|
47
|
+
*/
|
|
48
|
+
static getDefaults() {
|
|
49
|
+
return Object.assign(ToneAudioNode.getDefaults(), {
|
|
50
|
+
delayTime: 0.1,
|
|
51
|
+
resonance: 0.5,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
onReady(node) {
|
|
55
|
+
connectSeries(this.input, node, this.output);
|
|
56
|
+
const delayTime = node.parameters.get("delayTime");
|
|
57
|
+
;
|
|
58
|
+
this.delayTime.setParam(delayTime);
|
|
59
|
+
const feedback = node.parameters.get("feedback");
|
|
60
|
+
;
|
|
61
|
+
this.resonance.setParam(feedback);
|
|
62
|
+
}
|
|
63
|
+
dispose() {
|
|
64
|
+
super.dispose();
|
|
65
|
+
this.input.dispose();
|
|
66
|
+
this.output.dispose();
|
|
67
|
+
this.delayTime.dispose();
|
|
68
|
+
this.resonance.dispose();
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=FeedbackCombFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeedbackCombFilter.js","sourceRoot":"","sources":["../../../../Tone/component/filter/FeedbackCombFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAwB,MAAM,kCAAkC,CAAC;AAEtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAoB,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAO3D;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAmB,SAAQ,gBAA2C;IAuBlF;QACC,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAtB7F,SAAI,GAAG,oBAAoB,CAAC;QAuBpC,MAAM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