tone 15.0.0 → 15.0.2
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/Tone/component/analysis/Analyser.ts +1 -6
- package/Tone/component/analysis/FFT.ts +1 -1
- package/Tone/component/analysis/Follower.ts +1 -5
- package/Tone/component/analysis/Meter.ts +1 -3
- package/Tone/component/analysis/Waveform.ts +1 -3
- package/Tone/component/channel/Channel.ts +1 -6
- package/Tone/component/channel/CrossFade.ts +1 -7
- package/Tone/component/channel/Merge.ts +1 -3
- package/Tone/component/channel/MultibandSplit.ts +1 -6
- package/Tone/component/channel/PanVol.ts +1 -6
- package/Tone/component/channel/Panner.ts +1 -5
- package/Tone/component/channel/Panner3D.ts +1 -7
- package/Tone/component/channel/Recorder.ts +1 -1
- package/Tone/component/channel/Solo.ts +1 -1
- package/Tone/component/channel/Split.ts +1 -3
- package/Tone/component/channel/Volume.ts +1 -3
- package/Tone/component/dynamics/Compressor.ts +1 -6
- package/Tone/component/dynamics/Gate.ts +1 -8
- package/Tone/component/dynamics/Limiter.ts +1 -7
- package/Tone/component/dynamics/MidSideCompressor.ts +1 -5
- package/Tone/component/dynamics/MultibandCompressor.ts +1 -8
- package/Tone/component/envelope/Envelope.ts +1 -8
- package/Tone/component/envelope/FrequencyEnvelope.ts +1 -8
- package/Tone/component/filter/BiquadFilter.ts +1 -6
- package/Tone/component/filter/Convolver.ts +1 -6
- package/Tone/component/filter/EQ3.ts +1 -7
- package/Tone/component/filter/FeedbackCombFilter.ts +1 -6
- package/Tone/component/filter/Filter.ts +1 -7
- package/Tone/component/filter/LowpassCombFilter.ts +1 -7
- package/Tone/component/filter/OnePoleFilter.ts +1 -6
- package/Tone/core/clock/Clock.ts +1 -6
- package/Tone/core/clock/TickParam.ts +1 -3
- package/Tone/core/clock/TickSignal.ts +1 -3
- package/Tone/core/clock/TickSource.ts +1 -5
- package/Tone/core/clock/Transport.ts +1 -1
- package/Tone/core/context/AudioContext.ts +8 -3
- package/Tone/core/context/Delay.ts +1 -7
- package/Tone/core/context/Destination.ts +1 -1
- package/Tone/core/context/Gain.ts +1 -6
- package/Tone/core/context/Param.ts +1 -8
- package/Tone/effect/AutoFilter.ts +1 -7
- package/Tone/effect/AutoPanner.ts +1 -5
- package/Tone/effect/AutoWah.ts +1 -7
- package/Tone/effect/BitCrusher.ts +2 -4
- package/Tone/effect/Chebyshev.ts +1 -3
- package/Tone/effect/Chorus.ts +1 -7
- package/Tone/effect/Distortion.ts +1 -5
- package/Tone/effect/FeedbackDelay.ts +1 -6
- package/Tone/effect/Freeverb.ts +1 -6
- package/Tone/effect/FrequencyShifter.ts +1 -5
- package/Tone/effect/JCReverb.ts +1 -5
- package/Tone/effect/Phaser.ts +1 -7
- package/Tone/effect/PingPongDelay.ts +1 -6
- package/Tone/effect/PitchShift.ts +1 -3
- package/Tone/effect/Reverb.ts +1 -1
- package/Tone/effect/StereoWidener.ts +2 -5
- package/Tone/effect/Tremolo.ts +1 -6
- package/Tone/effect/Vibrato.ts +1 -6
- package/Tone/event/Loop.ts +1 -6
- package/Tone/event/Part.ts +1 -6
- package/Tone/event/Pattern.ts +1 -7
- package/Tone/event/Sequence.ts +1 -7
- package/Tone/event/ToneEvent.ts +1 -6
- package/Tone/instrument/DuoSynth.ts +1 -1
- package/Tone/instrument/FMSynth.ts +1 -1
- package/Tone/instrument/Instrument.ts +1 -1
- package/Tone/instrument/MembraneSynth.ts +1 -1
- package/Tone/instrument/MetalSynth.ts +1 -1
- package/Tone/instrument/ModulationSynth.ts +1 -1
- package/Tone/instrument/MonoSynth.ts +1 -1
- package/Tone/instrument/Monophonic.ts +1 -1
- package/Tone/instrument/NoiseSynth.ts +2 -1
- package/Tone/instrument/PluckSynth.ts +1 -1
- package/Tone/instrument/PolySynth.ts +1 -6
- package/Tone/instrument/Sampler.ts +1 -8
- package/Tone/instrument/Synth.ts +1 -1
- package/Tone/signal/Add.ts +1 -5
- package/Tone/signal/GreaterThan.ts +1 -7
- package/Tone/signal/GreaterThanZero.ts +1 -5
- package/Tone/signal/Multiply.ts +1 -7
- package/Tone/signal/Pow.ts +1 -5
- package/Tone/signal/Scale.ts +1 -8
- package/Tone/signal/ScaleExp.ts +1 -9
- package/Tone/signal/Signal.ts +1 -7
- package/Tone/signal/SignalOperator.ts +3 -5
- package/Tone/signal/Subtract.ts +1 -5
- package/Tone/signal/SyncedSignal.ts +1 -6
- package/Tone/signal/ToneConstantSource.ts +1 -5
- package/Tone/signal/WaveShaper.ts +1 -8
- package/Tone/signal/Zero.ts +1 -3
- package/Tone/source/Noise.ts +1 -1
- package/Tone/source/UserMedia.ts +1 -3
- package/Tone/source/buffer/GrainPlayer.ts +1 -6
- package/Tone/source/buffer/Player.ts +1 -6
- package/Tone/source/buffer/Players.ts +1 -8
- package/Tone/source/buffer/ToneBufferSource.ts +1 -6
- package/Tone/source/oscillator/AMOscillator.ts +1 -7
- package/Tone/source/oscillator/FMOscillator.ts +1 -7
- package/Tone/source/oscillator/FatOscillator.ts +1 -7
- package/Tone/source/oscillator/LFO.ts +1 -7
- package/Tone/source/oscillator/OmniOscillator.ts +1 -6
- package/Tone/source/oscillator/Oscillator.ts +1 -6
- package/Tone/source/oscillator/PWMOscillator.ts +1 -6
- package/Tone/source/oscillator/PulseOscillator.ts +1 -6
- package/Tone/source/oscillator/ToneOscillatorNode.ts +1 -6
- package/Tone/version.ts +1 -1
- package/build/Tone.js +1 -1
- package/build/Tone.js.map +1 -1
- package/build/esm/component/analysis/Analyser.js +2 -5
- package/build/esm/component/analysis/Analyser.js.map +1 -1
- package/build/esm/component/analysis/FFT.js +2 -2
- package/build/esm/component/analysis/FFT.js.map +1 -1
- package/build/esm/component/analysis/Follower.js +2 -4
- package/build/esm/component/analysis/Follower.js.map +1 -1
- package/build/esm/component/analysis/Meter.js +2 -2
- package/build/esm/component/analysis/Meter.js.map +1 -1
- package/build/esm/component/analysis/Waveform.js +2 -2
- package/build/esm/component/analysis/Waveform.js.map +1 -1
- package/build/esm/component/channel/Channel.js +2 -5
- package/build/esm/component/channel/Channel.js.map +1 -1
- package/build/esm/component/channel/CrossFade.js +2 -4
- package/build/esm/component/channel/CrossFade.js.map +1 -1
- package/build/esm/component/channel/Merge.js +2 -2
- package/build/esm/component/channel/Merge.js.map +1 -1
- package/build/esm/component/channel/MultibandSplit.js +2 -5
- package/build/esm/component/channel/MultibandSplit.js.map +1 -1
- package/build/esm/component/channel/PanVol.js +2 -5
- package/build/esm/component/channel/PanVol.js.map +1 -1
- package/build/esm/component/channel/Panner.js +4 -4
- package/build/esm/component/channel/Panner.js.map +1 -1
- package/build/esm/component/channel/Panner3D.js +2 -6
- package/build/esm/component/channel/Panner3D.js.map +1 -1
- package/build/esm/component/channel/Recorder.js +2 -2
- package/build/esm/component/channel/Recorder.js.map +1 -1
- package/build/esm/component/channel/Solo.js +2 -2
- package/build/esm/component/channel/Solo.js.map +1 -1
- package/build/esm/component/channel/Split.js +2 -2
- package/build/esm/component/channel/Split.js.map +1 -1
- package/build/esm/component/channel/Volume.js +2 -2
- package/build/esm/component/channel/Volume.js.map +1 -1
- package/build/esm/component/dynamics/Compressor.js +2 -5
- package/build/esm/component/dynamics/Compressor.js.map +1 -1
- package/build/esm/component/dynamics/Gate.js +2 -5
- package/build/esm/component/dynamics/Gate.js.map +1 -1
- package/build/esm/component/dynamics/Limiter.js +2 -4
- package/build/esm/component/dynamics/Limiter.js.map +1 -1
- package/build/esm/component/dynamics/MidSideCompressor.js +2 -2
- package/build/esm/component/dynamics/MidSideCompressor.js.map +1 -1
- package/build/esm/component/dynamics/MultibandCompressor.js +2 -2
- package/build/esm/component/dynamics/MultibandCompressor.js.map +1 -1
- package/build/esm/component/envelope/Envelope.js +2 -7
- package/build/esm/component/envelope/Envelope.js.map +1 -1
- package/build/esm/component/envelope/FrequencyEnvelope.js +2 -7
- package/build/esm/component/envelope/FrequencyEnvelope.js.map +1 -1
- package/build/esm/component/filter/BiquadFilter.js +2 -5
- package/build/esm/component/filter/BiquadFilter.js.map +1 -1
- package/build/esm/component/filter/Convolver.js +2 -5
- package/build/esm/component/filter/Convolver.js.map +1 -1
- package/build/esm/component/filter/EQ3.js +3 -7
- package/build/esm/component/filter/EQ3.js.map +1 -1
- package/build/esm/component/filter/FeedbackCombFilter.js +2 -5
- package/build/esm/component/filter/FeedbackCombFilter.js.map +1 -1
- package/build/esm/component/filter/Filter.js +3 -7
- package/build/esm/component/filter/Filter.js.map +1 -1
- package/build/esm/component/filter/LowpassCombFilter.js +2 -6
- package/build/esm/component/filter/LowpassCombFilter.js.map +1 -1
- package/build/esm/component/filter/OnePoleFilter.js +2 -5
- package/build/esm/component/filter/OnePoleFilter.js.map +1 -1
- package/build/esm/core/clock/Clock.js +3 -6
- package/build/esm/core/clock/Clock.js.map +1 -1
- package/build/esm/core/clock/TickParam.js +2 -2
- package/build/esm/core/clock/TickParam.js.map +1 -1
- package/build/esm/core/clock/TickSignal.js +2 -2
- package/build/esm/core/clock/TickSignal.js.map +1 -1
- package/build/esm/core/clock/TickSource.js +2 -4
- package/build/esm/core/clock/TickSource.js.map +1 -1
- package/build/esm/core/clock/Transport.js +2 -2
- package/build/esm/core/clock/Transport.js.map +1 -1
- package/build/esm/core/context/AudioContext.d.ts +2 -0
- package/build/esm/core/context/AudioContext.js +4 -3
- package/build/esm/core/context/AudioContext.js.map +1 -1
- package/build/esm/core/context/Delay.js +2 -5
- package/build/esm/core/context/Delay.js.map +1 -1
- package/build/esm/core/context/Destination.js +2 -2
- package/build/esm/core/context/Destination.js.map +1 -1
- package/build/esm/core/context/Gain.js +3 -6
- package/build/esm/core/context/Gain.js.map +1 -1
- package/build/esm/core/context/Param.js +3 -7
- package/build/esm/core/context/Param.js.map +1 -1
- package/build/esm/effect/AutoFilter.js +2 -6
- package/build/esm/effect/AutoFilter.js.map +1 -1
- package/build/esm/effect/AutoPanner.js +2 -4
- package/build/esm/effect/AutoPanner.js.map +1 -1
- package/build/esm/effect/AutoWah.js +2 -6
- package/build/esm/effect/AutoWah.js.map +1 -1
- package/build/esm/effect/BitCrusher.js +4 -4
- package/build/esm/effect/BitCrusher.js.map +1 -1
- package/build/esm/effect/Chebyshev.js +2 -2
- package/build/esm/effect/Chebyshev.js.map +1 -1
- package/build/esm/effect/Chorus.js +2 -6
- package/build/esm/effect/Chorus.js.map +1 -1
- package/build/esm/effect/Distortion.js +2 -4
- package/build/esm/effect/Distortion.js.map +1 -1
- package/build/esm/effect/FeedbackDelay.js +2 -5
- package/build/esm/effect/FeedbackDelay.js.map +1 -1
- package/build/esm/effect/Freeverb.js +2 -5
- package/build/esm/effect/Freeverb.js.map +1 -1
- package/build/esm/effect/FrequencyShifter.js +2 -4
- package/build/esm/effect/FrequencyShifter.js.map +1 -1
- package/build/esm/effect/JCReverb.js +2 -4
- package/build/esm/effect/JCReverb.js.map +1 -1
- package/build/esm/effect/Phaser.js +2 -6
- package/build/esm/effect/Phaser.js.map +1 -1
- package/build/esm/effect/PingPongDelay.js +2 -5
- package/build/esm/effect/PingPongDelay.js.map +1 -1
- package/build/esm/effect/PitchShift.js +2 -2
- package/build/esm/effect/PitchShift.js.map +1 -1
- package/build/esm/effect/Reverb.js +4 -4
- package/build/esm/effect/Reverb.js.map +1 -1
- package/build/esm/effect/StereoWidener.js +2 -4
- package/build/esm/effect/StereoWidener.js.map +1 -1
- package/build/esm/effect/Tremolo.js +2 -5
- package/build/esm/effect/Tremolo.js.map +1 -1
- package/build/esm/effect/Vibrato.js +2 -5
- package/build/esm/effect/Vibrato.js.map +1 -1
- package/build/esm/event/Loop.js +2 -5
- package/build/esm/event/Loop.js.map +1 -1
- package/build/esm/event/Part.js +3 -6
- package/build/esm/event/Part.js.map +1 -1
- package/build/esm/event/Pattern.js +2 -6
- package/build/esm/event/Pattern.js.map +1 -1
- package/build/esm/event/Sequence.js +2 -6
- package/build/esm/event/Sequence.js.map +1 -1
- package/build/esm/event/ToneEvent.js +2 -5
- package/build/esm/event/ToneEvent.js.map +1 -1
- package/build/esm/instrument/DuoSynth.js +2 -2
- package/build/esm/instrument/DuoSynth.js.map +1 -1
- package/build/esm/instrument/FMSynth.js +2 -2
- package/build/esm/instrument/FMSynth.js.map +1 -1
- package/build/esm/instrument/Instrument.js +2 -2
- package/build/esm/instrument/Instrument.js.map +1 -1
- package/build/esm/instrument/MembraneSynth.js +2 -2
- package/build/esm/instrument/MembraneSynth.js.map +1 -1
- package/build/esm/instrument/MetalSynth.js +2 -2
- package/build/esm/instrument/MetalSynth.js.map +1 -1
- package/build/esm/instrument/ModulationSynth.js +2 -2
- package/build/esm/instrument/ModulationSynth.js.map +1 -1
- package/build/esm/instrument/MonoSynth.js +2 -2
- package/build/esm/instrument/MonoSynth.js.map +1 -1
- package/build/esm/instrument/Monophonic.js +1 -1
- package/build/esm/instrument/Monophonic.js.map +1 -1
- package/build/esm/instrument/NoiseSynth.js +2 -2
- package/build/esm/instrument/NoiseSynth.js.map +1 -1
- package/build/esm/instrument/PluckSynth.js +2 -2
- package/build/esm/instrument/PluckSynth.js.map +1 -1
- package/build/esm/instrument/PolySynth.js +2 -5
- package/build/esm/instrument/PolySynth.js.map +1 -1
- package/build/esm/instrument/Sampler.js +2 -2
- package/build/esm/instrument/Sampler.js.map +1 -1
- package/build/esm/instrument/Synth.js +2 -2
- package/build/esm/instrument/Synth.js.map +1 -1
- package/build/esm/signal/Add.js +1 -1
- package/build/esm/signal/Add.js.map +1 -1
- package/build/esm/signal/GreaterThan.js +2 -4
- package/build/esm/signal/GreaterThan.js.map +1 -1
- package/build/esm/signal/GreaterThanZero.js +1 -1
- package/build/esm/signal/GreaterThanZero.js.map +1 -1
- package/build/esm/signal/Multiply.js +2 -4
- package/build/esm/signal/Multiply.js.map +1 -1
- package/build/esm/signal/Pow.js +2 -2
- package/build/esm/signal/Pow.js.map +1 -1
- package/build/esm/signal/Scale.js +2 -5
- package/build/esm/signal/Scale.js.map +1 -1
- package/build/esm/signal/ScaleExp.js +2 -6
- package/build/esm/signal/ScaleExp.js.map +1 -1
- package/build/esm/signal/Signal.js +3 -6
- package/build/esm/signal/Signal.js.map +1 -1
- package/build/esm/signal/SignalOperator.js +2 -2
- package/build/esm/signal/SignalOperator.js.map +1 -1
- package/build/esm/signal/Subtract.js +1 -3
- package/build/esm/signal/Subtract.js.map +1 -1
- package/build/esm/signal/SyncedSignal.js +3 -6
- package/build/esm/signal/SyncedSignal.js.map +1 -1
- package/build/esm/signal/ToneConstantSource.js +2 -4
- package/build/esm/signal/ToneConstantSource.js.map +1 -1
- package/build/esm/signal/WaveShaper.js +2 -5
- package/build/esm/signal/WaveShaper.js.map +1 -1
- package/build/esm/signal/Zero.js +1 -1
- package/build/esm/signal/Zero.js.map +1 -1
- package/build/esm/source/Noise.js +4 -4
- package/build/esm/source/Noise.js.map +1 -1
- package/build/esm/source/UserMedia.js +2 -2
- package/build/esm/source/UserMedia.js.map +1 -1
- package/build/esm/source/buffer/GrainPlayer.js +2 -5
- package/build/esm/source/buffer/GrainPlayer.js.map +1 -1
- package/build/esm/source/buffer/Player.js +3 -6
- package/build/esm/source/buffer/Player.js.map +1 -1
- package/build/esm/source/buffer/Players.js +2 -2
- package/build/esm/source/buffer/Players.js.map +1 -1
- package/build/esm/source/buffer/ToneBufferSource.js +2 -5
- package/build/esm/source/buffer/ToneBufferSource.js.map +1 -1
- package/build/esm/source/oscillator/AMOscillator.js +2 -6
- package/build/esm/source/oscillator/AMOscillator.js.map +1 -1
- package/build/esm/source/oscillator/FMOscillator.js +2 -6
- package/build/esm/source/oscillator/FMOscillator.js.map +1 -1
- package/build/esm/source/oscillator/FatOscillator.js +2 -6
- package/build/esm/source/oscillator/FatOscillator.js.map +1 -1
- package/build/esm/source/oscillator/LFO.js +3 -7
- package/build/esm/source/oscillator/LFO.js.map +1 -1
- package/build/esm/source/oscillator/OmniOscillator.js +2 -5
- package/build/esm/source/oscillator/OmniOscillator.js.map +1 -1
- package/build/esm/source/oscillator/Oscillator.js +2 -5
- package/build/esm/source/oscillator/Oscillator.js.map +1 -1
- package/build/esm/source/oscillator/PWMOscillator.js +2 -5
- package/build/esm/source/oscillator/PWMOscillator.js.map +1 -1
- package/build/esm/source/oscillator/PulseOscillator.js +2 -5
- package/build/esm/source/oscillator/PulseOscillator.js.map +1 -1
- package/build/esm/source/oscillator/ToneOscillatorNode.js +2 -5
- package/build/esm/source/oscillator/ToneOscillatorNode.js.map +1 -1
- package/build/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -62,17 +62,12 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
|
|
|
62
62
|
constructor(type?: AnalyserType, size?: number);
|
|
63
63
|
constructor(options?: Partial<AnalyserOptions>);
|
|
64
64
|
constructor() {
|
|
65
|
-
super(
|
|
66
|
-
optionsFromArguments(Analyser.getDefaults(), arguments, [
|
|
67
|
-
"type",
|
|
68
|
-
"size",
|
|
69
|
-
])
|
|
70
|
-
);
|
|
71
65
|
const options = optionsFromArguments(
|
|
72
66
|
Analyser.getDefaults(),
|
|
73
67
|
arguments,
|
|
74
68
|
["type", "size"]
|
|
75
69
|
);
|
|
70
|
+
super(options);
|
|
76
71
|
|
|
77
72
|
this.input =
|
|
78
73
|
this.output =
|
|
@@ -32,10 +32,10 @@ export class FFT extends MeterBase<FFTOptions> {
|
|
|
32
32
|
constructor(size?: PowerOfTwo);
|
|
33
33
|
constructor(options?: Partial<FFTOptions>);
|
|
34
34
|
constructor() {
|
|
35
|
-
super(optionsFromArguments(FFT.getDefaults(), arguments, ["size"]));
|
|
36
35
|
const options = optionsFromArguments(FFT.getDefaults(), arguments, [
|
|
37
36
|
"size",
|
|
38
37
|
]);
|
|
38
|
+
super(options);
|
|
39
39
|
|
|
40
40
|
this.normalRange = options.normalRange;
|
|
41
41
|
this._analyser.type = "fft";
|
|
@@ -50,16 +50,12 @@ export class Follower extends ToneAudioNode<FollowerOptions> {
|
|
|
50
50
|
constructor(smoothing?: Time);
|
|
51
51
|
constructor(options?: Partial<FollowerOptions>);
|
|
52
52
|
constructor() {
|
|
53
|
-
super(
|
|
54
|
-
optionsFromArguments(Follower.getDefaults(), arguments, [
|
|
55
|
-
"smoothing",
|
|
56
|
-
])
|
|
57
|
-
);
|
|
58
53
|
const options = optionsFromArguments(
|
|
59
54
|
Follower.getDefaults(),
|
|
60
55
|
arguments,
|
|
61
56
|
["smoothing"]
|
|
62
57
|
);
|
|
58
|
+
super(options);
|
|
63
59
|
|
|
64
60
|
this._abs = this.input = new Abs({ context: this.context });
|
|
65
61
|
this._lowpass = this.output = new OnePoleFilter({
|
|
@@ -55,12 +55,10 @@ export class Meter extends MeterBase<MeterOptions> {
|
|
|
55
55
|
constructor(smoothing?: NormalRange);
|
|
56
56
|
constructor(options?: Partial<MeterOptions>);
|
|
57
57
|
constructor() {
|
|
58
|
-
super(
|
|
59
|
-
optionsFromArguments(Meter.getDefaults(), arguments, ["smoothing"])
|
|
60
|
-
);
|
|
61
58
|
const options = optionsFromArguments(Meter.getDefaults(), arguments, [
|
|
62
59
|
"smoothing",
|
|
63
60
|
]);
|
|
61
|
+
super(options);
|
|
64
62
|
|
|
65
63
|
this.input =
|
|
66
64
|
this.output =
|
|
@@ -22,14 +22,12 @@ export class Waveform extends MeterBase<WaveformOptions> {
|
|
|
22
22
|
constructor(size?: PowerOfTwo);
|
|
23
23
|
constructor(options?: Partial<WaveformOptions>);
|
|
24
24
|
constructor() {
|
|
25
|
-
super(
|
|
26
|
-
optionsFromArguments(Waveform.getDefaults(), arguments, ["size"])
|
|
27
|
-
);
|
|
28
25
|
const options = optionsFromArguments(
|
|
29
26
|
Waveform.getDefaults(),
|
|
30
27
|
arguments,
|
|
31
28
|
["size"]
|
|
32
29
|
);
|
|
30
|
+
super(options);
|
|
33
31
|
|
|
34
32
|
this._analyser.type = "waveform";
|
|
35
33
|
this.size = options.size;
|
|
@@ -63,16 +63,11 @@ export class Channel extends ToneAudioNode<ChannelOptions> {
|
|
|
63
63
|
constructor(volume?: Decibels, pan?: AudioRange);
|
|
64
64
|
constructor(options?: Partial<ChannelOptions>);
|
|
65
65
|
constructor() {
|
|
66
|
-
super(
|
|
67
|
-
optionsFromArguments(Channel.getDefaults(), arguments, [
|
|
68
|
-
"volume",
|
|
69
|
-
"pan",
|
|
70
|
-
])
|
|
71
|
-
);
|
|
72
66
|
const options = optionsFromArguments(Channel.getDefaults(), arguments, [
|
|
73
67
|
"volume",
|
|
74
68
|
"pan",
|
|
75
69
|
]);
|
|
70
|
+
super(options);
|
|
76
71
|
|
|
77
72
|
this._solo = this.input = new Solo({
|
|
78
73
|
solo: options.solo,
|
|
@@ -100,18 +100,12 @@ export class CrossFade extends ToneAudioNode<CrossFadeOptions> {
|
|
|
100
100
|
constructor(fade?: NormalRange);
|
|
101
101
|
constructor(options?: Partial<CrossFadeOptions>);
|
|
102
102
|
constructor() {
|
|
103
|
-
super(
|
|
104
|
-
Object.assign(
|
|
105
|
-
optionsFromArguments(CrossFade.getDefaults(), arguments, [
|
|
106
|
-
"fade",
|
|
107
|
-
])
|
|
108
|
-
)
|
|
109
|
-
);
|
|
110
103
|
const options = optionsFromArguments(
|
|
111
104
|
CrossFade.getDefaults(),
|
|
112
105
|
arguments,
|
|
113
106
|
["fade"]
|
|
114
107
|
);
|
|
108
|
+
super(options);
|
|
115
109
|
|
|
116
110
|
this.fade = new Signal({
|
|
117
111
|
context: this.context,
|
|
@@ -44,12 +44,10 @@ export class Merge extends ToneAudioNode<MergeOptions> {
|
|
|
44
44
|
constructor(channels?: Positive);
|
|
45
45
|
constructor(options?: Partial<MergeOptions>);
|
|
46
46
|
constructor() {
|
|
47
|
-
super(
|
|
48
|
-
optionsFromArguments(Merge.getDefaults(), arguments, ["channels"])
|
|
49
|
-
);
|
|
50
47
|
const options = optionsFromArguments(Merge.getDefaults(), arguments, [
|
|
51
48
|
"channels",
|
|
52
49
|
]);
|
|
50
|
+
super(options);
|
|
53
51
|
|
|
54
52
|
this._merger =
|
|
55
53
|
this.output =
|
|
@@ -106,17 +106,12 @@ export class MultibandSplit extends ToneAudioNode<MultibandSplitOptions> {
|
|
|
106
106
|
constructor(lowFrequency?: Frequency, highFrequency?: Frequency);
|
|
107
107
|
constructor(options?: Partial<MultibandSplitOptions>);
|
|
108
108
|
constructor() {
|
|
109
|
-
super(
|
|
110
|
-
optionsFromArguments(MultibandSplit.getDefaults(), arguments, [
|
|
111
|
-
"lowFrequency",
|
|
112
|
-
"highFrequency",
|
|
113
|
-
])
|
|
114
|
-
);
|
|
115
109
|
const options = optionsFromArguments(
|
|
116
110
|
MultibandSplit.getDefaults(),
|
|
117
111
|
arguments,
|
|
118
112
|
["lowFrequency", "highFrequency"]
|
|
119
113
|
);
|
|
114
|
+
super(options);
|
|
120
115
|
|
|
121
116
|
this.lowFrequency = new Signal({
|
|
122
117
|
context: this.context,
|
|
@@ -61,16 +61,11 @@ export class PanVol extends ToneAudioNode<PanVolOptions> {
|
|
|
61
61
|
constructor(pan?: AudioRange, volume?: Decibels);
|
|
62
62
|
constructor(options?: Partial<PanVolOptions>);
|
|
63
63
|
constructor() {
|
|
64
|
-
super(
|
|
65
|
-
optionsFromArguments(PanVol.getDefaults(), arguments, [
|
|
66
|
-
"pan",
|
|
67
|
-
"volume",
|
|
68
|
-
])
|
|
69
|
-
);
|
|
70
64
|
const options = optionsFromArguments(PanVol.getDefaults(), arguments, [
|
|
71
65
|
"pan",
|
|
72
66
|
"volume",
|
|
73
67
|
]);
|
|
68
|
+
super(options);
|
|
74
69
|
|
|
75
70
|
this._panner = this.input = new Panner({
|
|
76
71
|
context: this.context,
|
|
@@ -54,14 +54,10 @@ export class Panner extends ToneAudioNode<TonePannerOptions> {
|
|
|
54
54
|
*/
|
|
55
55
|
constructor(pan?: AudioRange);
|
|
56
56
|
constructor() {
|
|
57
|
-
super(
|
|
58
|
-
Object.assign(
|
|
59
|
-
optionsFromArguments(Panner.getDefaults(), arguments, ["pan"])
|
|
60
|
-
)
|
|
61
|
-
);
|
|
62
57
|
const options = optionsFromArguments(Panner.getDefaults(), arguments, [
|
|
63
58
|
"pan",
|
|
64
59
|
]);
|
|
60
|
+
super(options);
|
|
65
61
|
|
|
66
62
|
this.pan = new Param({
|
|
67
63
|
context: this.context,
|
|
@@ -54,18 +54,12 @@ export class Panner3D extends ToneAudioNode<Panner3DOptions> {
|
|
|
54
54
|
constructor(positionX: number, positionY: number, positionZ: number);
|
|
55
55
|
constructor(options?: Partial<Panner3DOptions>);
|
|
56
56
|
constructor() {
|
|
57
|
-
super(
|
|
58
|
-
optionsFromArguments(Panner3D.getDefaults(), arguments, [
|
|
59
|
-
"positionX",
|
|
60
|
-
"positionY",
|
|
61
|
-
"positionZ",
|
|
62
|
-
])
|
|
63
|
-
);
|
|
64
57
|
const options = optionsFromArguments(
|
|
65
58
|
Panner3D.getDefaults(),
|
|
66
59
|
arguments,
|
|
67
60
|
["positionX", "positionY", "positionZ"]
|
|
68
61
|
);
|
|
62
|
+
super(options);
|
|
69
63
|
|
|
70
64
|
this._panner = this.input = this.output = this.context.createPanner();
|
|
71
65
|
// set some values
|
|
@@ -57,8 +57,8 @@ export class Recorder extends ToneAudioNode<RecorderOptions> {
|
|
|
57
57
|
|
|
58
58
|
constructor(options?: Partial<RecorderOptions>);
|
|
59
59
|
constructor() {
|
|
60
|
-
super(optionsFromArguments(Recorder.getDefaults(), arguments));
|
|
61
60
|
const options = optionsFromArguments(Recorder.getDefaults(), arguments);
|
|
61
|
+
super(options);
|
|
62
62
|
|
|
63
63
|
this.input = new Gain({
|
|
64
64
|
context: this.context,
|
|
@@ -34,10 +34,10 @@ export class Solo extends ToneAudioNode<SoloOptions> {
|
|
|
34
34
|
constructor(solo?: boolean);
|
|
35
35
|
constructor(options?: Partial<SoloOptions>);
|
|
36
36
|
constructor() {
|
|
37
|
-
super(optionsFromArguments(Solo.getDefaults(), arguments, ["solo"]));
|
|
38
37
|
const options = optionsFromArguments(Solo.getDefaults(), arguments, [
|
|
39
38
|
"solo",
|
|
40
39
|
]);
|
|
40
|
+
super(options);
|
|
41
41
|
|
|
42
42
|
this.input = this.output = new Gain({
|
|
43
43
|
context: this.context,
|
|
@@ -33,12 +33,10 @@ export class Split extends ToneAudioNode<SplitOptions> {
|
|
|
33
33
|
constructor(channels?: number);
|
|
34
34
|
constructor(options?: Partial<SplitOptions>);
|
|
35
35
|
constructor() {
|
|
36
|
-
super(
|
|
37
|
-
optionsFromArguments(Split.getDefaults(), arguments, ["channels"])
|
|
38
|
-
);
|
|
39
36
|
const options = optionsFromArguments(Split.getDefaults(), arguments, [
|
|
40
37
|
"channels",
|
|
41
38
|
]);
|
|
39
|
+
super(options);
|
|
42
40
|
|
|
43
41
|
this._splitter =
|
|
44
42
|
this.input =
|
|
@@ -54,12 +54,10 @@ export class Volume extends ToneAudioNode<VolumeOptions> {
|
|
|
54
54
|
constructor(volume?: Decibels);
|
|
55
55
|
constructor(options?: Partial<VolumeOptions>);
|
|
56
56
|
constructor() {
|
|
57
|
-
super(
|
|
58
|
-
optionsFromArguments(Volume.getDefaults(), arguments, ["volume"])
|
|
59
|
-
);
|
|
60
57
|
const options = optionsFromArguments(Volume.getDefaults(), arguments, [
|
|
61
58
|
"volume",
|
|
62
59
|
]);
|
|
60
|
+
super(options);
|
|
63
61
|
|
|
64
62
|
this.input = this.output = new Gain({
|
|
65
63
|
context: this.context,
|
|
@@ -79,17 +79,12 @@ export class Compressor extends ToneAudioNode<CompressorOptions> {
|
|
|
79
79
|
constructor(threshold?: Decibels, ratio?: Positive);
|
|
80
80
|
constructor(options?: Partial<CompressorOptions>);
|
|
81
81
|
constructor() {
|
|
82
|
-
super(
|
|
83
|
-
optionsFromArguments(Compressor.getDefaults(), arguments, [
|
|
84
|
-
"threshold",
|
|
85
|
-
"ratio",
|
|
86
|
-
])
|
|
87
|
-
);
|
|
88
82
|
const options = optionsFromArguments(
|
|
89
83
|
Compressor.getDefaults(),
|
|
90
84
|
arguments,
|
|
91
85
|
["threshold", "ratio"]
|
|
92
86
|
);
|
|
87
|
+
super(options);
|
|
93
88
|
|
|
94
89
|
this.threshold = new Param({
|
|
95
90
|
minValue: this._compressor.threshold.minValue,
|
|
@@ -54,18 +54,11 @@ export class Gate extends ToneAudioNode<GateOptions> {
|
|
|
54
54
|
constructor(threshold?: Decibels, smoothing?: Time);
|
|
55
55
|
constructor(options?: Partial<GateOptions>);
|
|
56
56
|
constructor() {
|
|
57
|
-
super(
|
|
58
|
-
Object.assign(
|
|
59
|
-
optionsFromArguments(Gate.getDefaults(), arguments, [
|
|
60
|
-
"threshold",
|
|
61
|
-
"smoothing",
|
|
62
|
-
])
|
|
63
|
-
)
|
|
64
|
-
);
|
|
65
57
|
const options = optionsFromArguments(Gate.getDefaults(), arguments, [
|
|
66
58
|
"threshold",
|
|
67
59
|
"smoothing",
|
|
68
60
|
]);
|
|
61
|
+
super(options);
|
|
69
62
|
|
|
70
63
|
this._follower = new Follower({
|
|
71
64
|
context: this.context,
|
|
@@ -44,16 +44,10 @@ export class Limiter extends ToneAudioNode<LimiterOptions> {
|
|
|
44
44
|
constructor(threshold?: Decibels);
|
|
45
45
|
constructor(options?: Partial<LimiterOptions>);
|
|
46
46
|
constructor() {
|
|
47
|
-
super(
|
|
48
|
-
Object.assign(
|
|
49
|
-
optionsFromArguments(Limiter.getDefaults(), arguments, [
|
|
50
|
-
"threshold",
|
|
51
|
-
])
|
|
52
|
-
)
|
|
53
|
-
);
|
|
54
47
|
const options = optionsFromArguments(Limiter.getDefaults(), arguments, [
|
|
55
48
|
"threshold",
|
|
56
49
|
]);
|
|
50
|
+
super(options);
|
|
57
51
|
|
|
58
52
|
this._compressor =
|
|
59
53
|
this.input =
|
|
@@ -49,15 +49,11 @@ export class MidSideCompressor extends ToneAudioNode<MidSideCompressorOptions> {
|
|
|
49
49
|
|
|
50
50
|
constructor(options?: RecursivePartial<MidSideCompressorOptions>);
|
|
51
51
|
constructor() {
|
|
52
|
-
super(
|
|
53
|
-
Object.assign(
|
|
54
|
-
optionsFromArguments(MidSideCompressor.getDefaults(), arguments)
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
52
|
const options = optionsFromArguments(
|
|
58
53
|
MidSideCompressor.getDefaults(),
|
|
59
54
|
arguments
|
|
60
55
|
);
|
|
56
|
+
super(options);
|
|
61
57
|
|
|
62
58
|
this._midSideSplit = this.input = new MidSideSplit({
|
|
63
59
|
context: this.context,
|
|
@@ -71,18 +71,11 @@ export class MultibandCompressor extends ToneAudioNode<MultibandCompressorOption
|
|
|
71
71
|
|
|
72
72
|
constructor(options?: RecursivePartial<MultibandCompressorOptions>);
|
|
73
73
|
constructor() {
|
|
74
|
-
super(
|
|
75
|
-
Object.assign(
|
|
76
|
-
optionsFromArguments(
|
|
77
|
-
MultibandCompressor.getDefaults(),
|
|
78
|
-
arguments
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
);
|
|
82
74
|
const options = optionsFromArguments(
|
|
83
75
|
MultibandCompressor.getDefaults(),
|
|
84
76
|
arguments
|
|
85
77
|
);
|
|
78
|
+
super(options);
|
|
86
79
|
|
|
87
80
|
this._splitter = this.input = new MultibandSplit({
|
|
88
81
|
context: this.context,
|
|
@@ -186,19 +186,12 @@ export class Envelope extends ToneAudioNode<EnvelopeOptions> {
|
|
|
186
186
|
);
|
|
187
187
|
constructor(options?: Partial<EnvelopeOptions>);
|
|
188
188
|
constructor() {
|
|
189
|
-
super(
|
|
190
|
-
optionsFromArguments(Envelope.getDefaults(), arguments, [
|
|
191
|
-
"attack",
|
|
192
|
-
"decay",
|
|
193
|
-
"sustain",
|
|
194
|
-
"release",
|
|
195
|
-
])
|
|
196
|
-
);
|
|
197
189
|
const options = optionsFromArguments(
|
|
198
190
|
Envelope.getDefaults(),
|
|
199
191
|
arguments,
|
|
200
192
|
["attack", "decay", "sustain", "release"]
|
|
201
193
|
);
|
|
194
|
+
super(options);
|
|
202
195
|
|
|
203
196
|
this.attack = options.attack;
|
|
204
197
|
this.decay = options.decay;
|
|
@@ -62,19 +62,12 @@ export class FrequencyEnvelope extends Envelope {
|
|
|
62
62
|
);
|
|
63
63
|
constructor(options?: Partial<FrequencyEnvelopeOptions>);
|
|
64
64
|
constructor() {
|
|
65
|
-
super(
|
|
66
|
-
optionsFromArguments(FrequencyEnvelope.getDefaults(), arguments, [
|
|
67
|
-
"attack",
|
|
68
|
-
"decay",
|
|
69
|
-
"sustain",
|
|
70
|
-
"release",
|
|
71
|
-
])
|
|
72
|
-
);
|
|
73
65
|
const options = optionsFromArguments(
|
|
74
66
|
FrequencyEnvelope.getDefaults(),
|
|
75
67
|
arguments,
|
|
76
68
|
["attack", "decay", "sustain", "release"]
|
|
77
69
|
);
|
|
70
|
+
super(options);
|
|
78
71
|
|
|
79
72
|
this._octaves = options.octaves;
|
|
80
73
|
this._baseFrequency = this.toFrequency(options.baseFrequency);
|
|
@@ -61,17 +61,12 @@ export class BiquadFilter extends ToneAudioNode<BiquadFilterOptions> {
|
|
|
61
61
|
constructor(frequency?: Frequency, type?: BiquadFilterType);
|
|
62
62
|
constructor(options?: Partial<BiquadFilterOptions>);
|
|
63
63
|
constructor() {
|
|
64
|
-
super(
|
|
65
|
-
optionsFromArguments(BiquadFilter.getDefaults(), arguments, [
|
|
66
|
-
"frequency",
|
|
67
|
-
"type",
|
|
68
|
-
])
|
|
69
|
-
);
|
|
70
64
|
const options = optionsFromArguments(
|
|
71
65
|
BiquadFilter.getDefaults(),
|
|
72
66
|
arguments,
|
|
73
67
|
["frequency", "type"]
|
|
74
68
|
);
|
|
69
|
+
super(options);
|
|
75
70
|
|
|
76
71
|
this._filter = this.context.createBiquadFilter();
|
|
77
72
|
this.input = this.output = this._filter;
|
|
@@ -50,17 +50,12 @@ export class Convolver extends ToneAudioNode<ConvolverOptions> {
|
|
|
50
50
|
);
|
|
51
51
|
constructor(options?: Partial<ConvolverOptions>);
|
|
52
52
|
constructor() {
|
|
53
|
-
super(
|
|
54
|
-
optionsFromArguments(Convolver.getDefaults(), arguments, [
|
|
55
|
-
"url",
|
|
56
|
-
"onload",
|
|
57
|
-
])
|
|
58
|
-
);
|
|
59
53
|
const options = optionsFromArguments(
|
|
60
54
|
Convolver.getDefaults(),
|
|
61
55
|
arguments,
|
|
62
56
|
["url", "onload"]
|
|
63
57
|
);
|
|
58
|
+
super(options);
|
|
64
59
|
|
|
65
60
|
this._buffer = new ToneAudioBuffer(options.url, (buffer) => {
|
|
66
61
|
this.buffer = buffer;
|
|
@@ -90,18 +90,12 @@ export class EQ3 extends ToneAudioNode<EQ3Options> {
|
|
|
90
90
|
constructor(lowLevel?: Decibels, midLevel?: Decibels, highLevel?: Decibels);
|
|
91
91
|
constructor(options: Partial<EQ3Options>);
|
|
92
92
|
constructor() {
|
|
93
|
-
super(
|
|
94
|
-
optionsFromArguments(EQ3.getDefaults(), arguments, [
|
|
95
|
-
"low",
|
|
96
|
-
"mid",
|
|
97
|
-
"high",
|
|
98
|
-
])
|
|
99
|
-
);
|
|
100
93
|
const options = optionsFromArguments(EQ3.getDefaults(), arguments, [
|
|
101
94
|
"low",
|
|
102
95
|
"mid",
|
|
103
96
|
"high",
|
|
104
97
|
]);
|
|
98
|
+
super(options);
|
|
105
99
|
|
|
106
100
|
this.input = this._multibandSplit = new MultibandSplit({
|
|
107
101
|
context: this.context,
|
|
@@ -48,17 +48,12 @@ export class FeedbackCombFilter extends ToneAudioWorklet<FeedbackCombFilterOptio
|
|
|
48
48
|
constructor(delayTime?: Time, resonance?: NormalRange);
|
|
49
49
|
constructor(options?: RecursivePartial<FeedbackCombFilterOptions>);
|
|
50
50
|
constructor() {
|
|
51
|
-
super(
|
|
52
|
-
optionsFromArguments(FeedbackCombFilter.getDefaults(), arguments, [
|
|
53
|
-
"delayTime",
|
|
54
|
-
"resonance",
|
|
55
|
-
])
|
|
56
|
-
);
|
|
57
51
|
const options = optionsFromArguments(
|
|
58
52
|
FeedbackCombFilter.getDefaults(),
|
|
59
53
|
arguments,
|
|
60
54
|
["delayTime", "resonance"]
|
|
61
55
|
);
|
|
56
|
+
super(options);
|
|
62
57
|
|
|
63
58
|
this.input = new Gain({ context: this.context });
|
|
64
59
|
this.output = new Gain({ context: this.context });
|
|
@@ -73,18 +73,12 @@ export class Filter extends ToneAudioNode<FilterOptions> {
|
|
|
73
73
|
);
|
|
74
74
|
constructor(options?: Partial<FilterOptions>);
|
|
75
75
|
constructor() {
|
|
76
|
-
super(
|
|
77
|
-
optionsFromArguments(Filter.getDefaults(), arguments, [
|
|
78
|
-
"frequency",
|
|
79
|
-
"type",
|
|
80
|
-
"rolloff",
|
|
81
|
-
])
|
|
82
|
-
);
|
|
83
76
|
const options = optionsFromArguments(Filter.getDefaults(), arguments, [
|
|
84
77
|
"frequency",
|
|
85
78
|
"type",
|
|
86
79
|
"rolloff",
|
|
87
80
|
]);
|
|
81
|
+
super(options);
|
|
88
82
|
|
|
89
83
|
this._filters = [];
|
|
90
84
|
|
|
@@ -60,18 +60,12 @@ export class LowpassCombFilter extends ToneAudioNode<LowpassCombFilterOptions> {
|
|
|
60
60
|
);
|
|
61
61
|
constructor(options?: RecursivePartial<LowpassCombFilterOptions>);
|
|
62
62
|
constructor() {
|
|
63
|
-
super(
|
|
64
|
-
optionsFromArguments(LowpassCombFilter.getDefaults(), arguments, [
|
|
65
|
-
"delayTime",
|
|
66
|
-
"resonance",
|
|
67
|
-
"dampening",
|
|
68
|
-
])
|
|
69
|
-
);
|
|
70
63
|
const options = optionsFromArguments(
|
|
71
64
|
LowpassCombFilter.getDefaults(),
|
|
72
65
|
arguments,
|
|
73
66
|
["delayTime", "resonance", "dampening"]
|
|
74
67
|
);
|
|
68
|
+
super(options);
|
|
75
69
|
|
|
76
70
|
this._combFilter = this.output = new FeedbackCombFilter({
|
|
77
71
|
context: this.context,
|
|
@@ -51,17 +51,12 @@ export class OnePoleFilter extends ToneAudioNode<OnePoleFilterOptions> {
|
|
|
51
51
|
constructor(frequency?: Frequency, type?: OnePoleFilterType);
|
|
52
52
|
constructor(options?: Partial<OnePoleFilterOptions>);
|
|
53
53
|
constructor() {
|
|
54
|
-
super(
|
|
55
|
-
optionsFromArguments(OnePoleFilter.getDefaults(), arguments, [
|
|
56
|
-
"frequency",
|
|
57
|
-
"type",
|
|
58
|
-
])
|
|
59
|
-
);
|
|
60
54
|
const options = optionsFromArguments(
|
|
61
55
|
OnePoleFilter.getDefaults(),
|
|
62
56
|
arguments,
|
|
63
57
|
["frequency", "type"]
|
|
64
58
|
);
|
|
59
|
+
super(options);
|
|
65
60
|
|
|
66
61
|
this._frequency = options.frequency;
|
|
67
62
|
this._type = options.type;
|
package/Tone/core/clock/Clock.ts
CHANGED
|
@@ -80,16 +80,11 @@ export class Clock<TypeName extends "bpm" | "hertz" = "hertz">
|
|
|
80
80
|
constructor(callback?: ClockCallback, frequency?: Frequency);
|
|
81
81
|
constructor(options: Partial<ClockOptions>);
|
|
82
82
|
constructor() {
|
|
83
|
-
super(
|
|
84
|
-
optionsFromArguments(Clock.getDefaults(), arguments, [
|
|
85
|
-
"callback",
|
|
86
|
-
"frequency",
|
|
87
|
-
])
|
|
88
|
-
);
|
|
89
83
|
const options = optionsFromArguments(Clock.getDefaults(), arguments, [
|
|
90
84
|
"callback",
|
|
91
85
|
"frequency",
|
|
92
86
|
]);
|
|
87
|
+
super(options);
|
|
93
88
|
|
|
94
89
|
this.callback = options.callback;
|
|
95
90
|
this._tickSource = new TickSource({
|
|
@@ -44,14 +44,12 @@ export class TickParam<
|
|
|
44
44
|
constructor(value?: number);
|
|
45
45
|
constructor(options: Partial<TickParamOptions<TypeName>>);
|
|
46
46
|
constructor() {
|
|
47
|
-
super(
|
|
48
|
-
optionsFromArguments(TickParam.getDefaults(), arguments, ["value"])
|
|
49
|
-
);
|
|
50
47
|
const options = optionsFromArguments(
|
|
51
48
|
TickParam.getDefaults(),
|
|
52
49
|
arguments,
|
|
53
50
|
["value"]
|
|
54
51
|
);
|
|
52
|
+
super(options);
|
|
55
53
|
|
|
56
54
|
// set the multiplier
|
|
57
55
|
this._multiplier = options.multiplier;
|
|
@@ -36,14 +36,12 @@ export class TickSignal<
|
|
|
36
36
|
constructor(value?: UnitMap[TypeName]);
|
|
37
37
|
constructor(options: Partial<TickSignalOptions<TypeName>>);
|
|
38
38
|
constructor() {
|
|
39
|
-
super(
|
|
40
|
-
optionsFromArguments(TickSignal.getDefaults(), arguments, ["value"])
|
|
41
|
-
);
|
|
42
39
|
const options = optionsFromArguments(
|
|
43
40
|
TickSignal.getDefaults(),
|
|
44
41
|
arguments,
|
|
45
42
|
["value"]
|
|
46
43
|
);
|
|
44
|
+
super(options);
|
|
47
45
|
|
|
48
46
|
this.input = this._param = new TickParam({
|
|
49
47
|
context: this.context,
|
|
@@ -79,16 +79,12 @@ export class TickSource<
|
|
|
79
79
|
constructor(frequency?: number);
|
|
80
80
|
constructor(options?: Partial<TickSourceOptions>);
|
|
81
81
|
constructor() {
|
|
82
|
-
super(
|
|
83
|
-
optionsFromArguments(TickSource.getDefaults(), arguments, [
|
|
84
|
-
"frequency",
|
|
85
|
-
])
|
|
86
|
-
);
|
|
87
82
|
const options = optionsFromArguments(
|
|
88
83
|
TickSource.getDefaults(),
|
|
89
84
|
arguments,
|
|
90
85
|
["frequency"]
|
|
91
86
|
);
|
|
87
|
+
super(options);
|
|
92
88
|
|
|
93
89
|
this.frequency = new TickSignal({
|
|
94
90
|
context: this.context,
|
|
@@ -188,11 +188,11 @@ export class TransportClass
|
|
|
188
188
|
|
|
189
189
|
constructor(options?: Partial<TransportOptions>);
|
|
190
190
|
constructor() {
|
|
191
|
-
super(optionsFromArguments(TransportClass.getDefaults(), arguments));
|
|
192
191
|
const options = optionsFromArguments(
|
|
193
192
|
TransportClass.getDefaults(),
|
|
194
193
|
arguments
|
|
195
194
|
);
|
|
195
|
+
super(options);
|
|
196
196
|
|
|
197
197
|
// CLOCK/TEMPO
|
|
198
198
|
this._ppq = options.ppq;
|
|
@@ -41,6 +41,8 @@ export type AnyAudioContext = AudioContext | OfflineAudioContext;
|
|
|
41
41
|
interface ToneWindow extends Window {
|
|
42
42
|
TONE_SILENCE_LOGGING?: boolean;
|
|
43
43
|
TONE_DEBUG_CLASS?: string;
|
|
44
|
+
BaseAudioContext: any;
|
|
45
|
+
AudioWorkletNode: any;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
/**
|
|
@@ -66,10 +68,13 @@ export function createAudioWorkletNode(
|
|
|
66
68
|
): AudioWorkletNode {
|
|
67
69
|
assert(
|
|
68
70
|
isDefined(stdAudioWorkletNode),
|
|
69
|
-
"
|
|
71
|
+
"AudioWorkletNode only works in a secure context (https or localhost)"
|
|
70
72
|
);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
return new (
|
|
74
|
+
context instanceof theWindow?.BaseAudioContext
|
|
75
|
+
? theWindow?.AudioWorkletNode
|
|
76
|
+
: stdAudioWorkletNode
|
|
77
|
+
)(context, name, options);
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
/**
|