tone 15.2.3 → 15.2.5
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/dynamics/Limiter.ts +1 -1
- package/Tone/component/envelope/AmplitudeEnvelope.ts +1 -1
- package/Tone/component/envelope/Envelope.ts +3 -3
- package/Tone/core/clock/Clock.test.ts +1 -1
- package/Tone/core/context/AbstractParam.ts +5 -5
- package/Tone/core/context/ToneAudioBuffer.ts +1 -1
- package/Tone/core/util/IntervalTimeline.ts +1 -1
- package/Tone/core/worklet/ToneAudioWorkletProcessor.worklet.ts +1 -1
- package/Tone/effect/AutoFilter.ts +1 -1
- package/Tone/effect/Tremolo.ts +1 -1
- package/Tone/instrument/Sampler.test.ts +2 -2
- package/Tone/signal/Zero.ts +1 -1
- package/Tone/source/Source.ts +1 -1
- package/Tone/source/buffer/Player.ts +2 -2
- package/Tone/source/buffer/ToneBufferSource.ts +1 -1
- package/Tone/source/oscillator/LFO.test.ts +1 -1
- package/Tone/source/oscillator/LFO.ts +1 -1
- package/Tone/source/oscillator/PWMOscillator.test.ts +1 -1
- package/Tone/source/oscillator/PulseOscillator.test.ts +1 -1
- package/Tone/version.ts +1 -1
- package/build/Tone.js +1 -1
- package/build/Tone.js.map +1 -1
- package/build/esm/component/dynamics/Limiter.d.ts +1 -1
- package/build/esm/component/dynamics/Limiter.js +1 -1
- package/build/esm/component/envelope/AmplitudeEnvelope.d.ts +1 -1
- package/build/esm/component/envelope/Envelope.d.ts +3 -3
- package/build/esm/core/context/AbstractParam.d.ts +5 -5
- package/build/esm/core/context/ToneAudioBuffer.js +1 -1
- package/build/esm/core/context/ToneAudioBuffer.js.map +1 -1
- package/build/esm/core/util/IntervalTimeline.js +1 -1
- package/build/esm/core/worklet/ToneAudioWorkletProcessor.worklet.js +1 -1
- package/build/esm/effect/AutoFilter.d.ts +1 -1
- package/build/esm/effect/AutoFilter.js +1 -1
- package/build/esm/effect/Tremolo.d.ts +1 -1
- package/build/esm/effect/Tremolo.js +1 -1
- package/build/esm/signal/Zero.d.ts +1 -1
- package/build/esm/signal/Zero.js +1 -1
- package/build/esm/source/Source.d.ts +1 -1
- package/build/esm/source/buffer/Player.d.ts +2 -2
- package/build/esm/source/buffer/Player.js +1 -1
- package/build/esm/source/buffer/ToneBufferSource.d.ts +1 -1
- package/build/esm/source/buffer/ToneBufferSource.js +1 -1
- package/build/esm/source/oscillator/LFO.d.ts +1 -1
- package/build/esm/source/oscillator/LFO.js +1 -1
- package/build/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export interface LimiterOptions extends ToneAudioNodeOptions {
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Limiter will limit the loudness of an incoming signal.
|
|
19
|
-
* Under the hood
|
|
19
|
+
* Under the hood its composed of a {@link Compressor} with a fast attack
|
|
20
20
|
* and release and max compression ratio.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
@@ -36,7 +36,7 @@ export class AmplitudeEnvelope extends Envelope {
|
|
|
36
36
|
input: Gain = this._gainNode;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* @param attack The amount of time it takes for the envelope to go from 0 to
|
|
39
|
+
* @param attack The amount of time it takes for the envelope to go from 0 to its maximum value.
|
|
40
40
|
* @param decay The period of time after the attack that it takes for the envelope
|
|
41
41
|
* to fall to the sustain value. Value must be greater than 0.
|
|
42
42
|
* @param sustain The percent of the maximum value that the envelope rests at until
|
|
@@ -57,7 +57,7 @@ export class Envelope extends ToneAudioNode<EnvelopeOptions> {
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* When triggerAttack is called, the attack time is the amount of
|
|
60
|
-
* time it takes for the envelope to reach
|
|
60
|
+
* time it takes for the envelope to reach its maximum value.
|
|
61
61
|
* ```
|
|
62
62
|
* /\
|
|
63
63
|
* /X \
|
|
@@ -77,7 +77,7 @@ export class Envelope extends ToneAudioNode<EnvelopeOptions> {
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* After the attack portion of the envelope, the value will fall
|
|
80
|
-
* over the duration of the decay time to
|
|
80
|
+
* over the duration of the decay time to its sustain value.
|
|
81
81
|
* ```
|
|
82
82
|
* /\
|
|
83
83
|
* / X\
|
|
@@ -170,7 +170,7 @@ export class Envelope extends ToneAudioNode<EnvelopeOptions> {
|
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* @param attack The amount of time it takes for the envelope to go from
|
|
173
|
-
* 0 to
|
|
173
|
+
* 0 to its maximum value.
|
|
174
174
|
* @param decay The period of time after the attack that it takes for the envelope
|
|
175
175
|
* to fall to the sustain value. Value must be greater than 0.
|
|
176
176
|
* @param sustain The percent of the maximum value that the envelope rests at until
|
|
@@ -34,7 +34,7 @@ describe("Clock", () => {
|
|
|
34
34
|
expect(clock.frequency.value).to.equal(8);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
it("can get and set
|
|
37
|
+
it("can get and set its values with the set/get", () => {
|
|
38
38
|
const clock = new Clock();
|
|
39
39
|
clock.set({
|
|
40
40
|
frequency: 2,
|
|
@@ -87,7 +87,7 @@ export abstract class AbstractParam<TypeName extends UnitName> {
|
|
|
87
87
|
* duration of the rampTime.
|
|
88
88
|
* @param value The value to ramp to.
|
|
89
89
|
* @param rampTime the time that it takes the
|
|
90
|
-
* value to ramp from
|
|
90
|
+
* value to ramp from its current value
|
|
91
91
|
* @param startTime When the ramp should start.
|
|
92
92
|
* @example
|
|
93
93
|
* const delay = new Tone.FeedbackDelay(0.5, 0.98).toDestination();
|
|
@@ -114,7 +114,7 @@ export abstract class AbstractParam<TypeName extends UnitName> {
|
|
|
114
114
|
*
|
|
115
115
|
* @param value The value to ramp to.
|
|
116
116
|
* @param rampTime the time that it takes the
|
|
117
|
-
* value to ramp from
|
|
117
|
+
* value to ramp from its current value
|
|
118
118
|
* @param startTime When the ramp should start.
|
|
119
119
|
* @returns {Param} this
|
|
120
120
|
* @example
|
|
@@ -141,7 +141,7 @@ export abstract class AbstractParam<TypeName extends UnitName> {
|
|
|
141
141
|
* rampTime is the time that it takes to reach over 99% of the way towards the value.
|
|
142
142
|
* @param value The value to ramp to.
|
|
143
143
|
* @param rampTime the time that it takes the
|
|
144
|
-
* value to ramp from
|
|
144
|
+
* value to ramp from its current value
|
|
145
145
|
* @param startTime When the ramp should start.
|
|
146
146
|
* @example
|
|
147
147
|
* @example
|
|
@@ -163,7 +163,7 @@ export abstract class AbstractParam<TypeName extends UnitName> {
|
|
|
163
163
|
* is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'
|
|
164
164
|
* @param value The value to ramp to.
|
|
165
165
|
* @param time When the ramp should start.
|
|
166
|
-
* @param rampTime the time that it takes the value to ramp from
|
|
166
|
+
* @param rampTime the time that it takes the value to ramp from its current value
|
|
167
167
|
* @example
|
|
168
168
|
* const osc = new Tone.Oscillator().toDestination().start();
|
|
169
169
|
* // exponential approach over 4 seconds starting in 1 second
|
|
@@ -243,7 +243,7 @@ export abstract class AbstractParam<TypeName extends UnitName> {
|
|
|
243
243
|
* depending on the `units` of the signal
|
|
244
244
|
*
|
|
245
245
|
* @param value
|
|
246
|
-
* @param rampTime The time that it takes the value to ramp from
|
|
246
|
+
* @param rampTime The time that it takes the value to ramp from its current value
|
|
247
247
|
* @param startTime When the ramp should start.
|
|
248
248
|
* @example
|
|
249
249
|
* const osc = new Tone.Oscillator().toDestination().start();
|
|
@@ -103,7 +103,7 @@ export class ToneAudioBuffer extends Tone {
|
|
|
103
103
|
if (buffer.loaded) {
|
|
104
104
|
this._buffer = buffer.get();
|
|
105
105
|
} else {
|
|
106
|
-
// otherwise when
|
|
106
|
+
// otherwise when its loaded, invoke it's callback
|
|
107
107
|
buffer.onload = () => {
|
|
108
108
|
this.set(buffer);
|
|
109
109
|
this.onload(this);
|
|
@@ -470,7 +470,7 @@ class IntervalNode {
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
/**
|
|
473
|
-
* Invoke the callback on this element and both
|
|
473
|
+
* Invoke the callback on this element and both its branches
|
|
474
474
|
* @param {Function} callback
|
|
475
475
|
*/
|
|
476
476
|
traverse(callback: (self: IntervalNode) => void): void {
|
|
@@ -10,7 +10,7 @@ const toneAudioWorkletProcessor = /* javascript */ `
|
|
|
10
10
|
|
|
11
11
|
super(options);
|
|
12
12
|
/**
|
|
13
|
-
* If the processor was disposed or not. Keep alive until
|
|
13
|
+
* If the processor was disposed or not. Keep alive until its disposed.
|
|
14
14
|
*/
|
|
15
15
|
this.disposed = false;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export interface AutoFilterOptions extends LFOEffectOptions {
|
|
|
19
19
|
* and depth.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
|
-
* // create an autofilter and start
|
|
22
|
+
* // create an autofilter and start its LFO
|
|
23
23
|
* const autoFilter = new Tone.AutoFilter("4n").toDestination().start();
|
|
24
24
|
* // route an oscillator through the filter and start it
|
|
25
25
|
* const oscillator = new Tone.Oscillator().connect(autoFilter).start();
|
package/Tone/effect/Tremolo.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface TremoloOptions extends StereoEffectOptions {
|
|
|
19
19
|
* The effect is a stereo effect where the modulation phase is inverted in each channel.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
|
-
* // create a tremolo and start
|
|
22
|
+
* // create a tremolo and start its LFO
|
|
23
23
|
* const tremolo = new Tone.Tremolo(9, 0.75).toDestination().start();
|
|
24
24
|
* // route an oscillator through the tremolo and start it
|
|
25
25
|
* const oscillator = new Tone.Oscillator().connect(tremolo).start();
|
|
@@ -267,7 +267,7 @@ describe("Sampler", () => {
|
|
|
267
267
|
});
|
|
268
268
|
|
|
269
269
|
context("add samples", () => {
|
|
270
|
-
it("can add a note with
|
|
270
|
+
it("can add a note with its midi value", async () => {
|
|
271
271
|
const buffer = await Offline(() => {
|
|
272
272
|
const sampler = new Sampler().toDestination();
|
|
273
273
|
sampler.add(69, A4_buffer);
|
|
@@ -276,7 +276,7 @@ describe("Sampler", () => {
|
|
|
276
276
|
expect(buffer.isSilent()).to.be.false;
|
|
277
277
|
});
|
|
278
278
|
|
|
279
|
-
it("can add a note with
|
|
279
|
+
it("can add a note with its note name", async () => {
|
|
280
280
|
const buffer = await Offline(() => {
|
|
281
281
|
const sampler = new Sampler().toDestination();
|
|
282
282
|
sampler.add("A4", A4_buffer);
|
package/Tone/signal/Zero.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { SignalOperator } from "./SignalOperator.js";
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Tone.Zero outputs 0's at audio-rate. The reason this has to be
|
|
12
|
-
*
|
|
12
|
+
* its own class is that many browsers optimize out Tone.Signal
|
|
13
13
|
* with a value of 0 and will not process nodes further down the graph.
|
|
14
14
|
* @category Signal
|
|
15
15
|
*/
|
package/Tone/source/Source.ts
CHANGED
|
@@ -83,7 +83,7 @@ export abstract class Source<
|
|
|
83
83
|
offset?: Seconds;
|
|
84
84
|
/**
|
|
85
85
|
* Either the buffer is explicitly scheduled to end using the stop method,
|
|
86
|
-
* or
|
|
86
|
+
* or its implicitly ended when the buffer is over.
|
|
87
87
|
*/
|
|
88
88
|
implicitEnd?: boolean;
|
|
89
89
|
}> = new StateTimeline("stopped");
|
|
@@ -45,7 +45,7 @@ export class Player extends Source<PlayerOptions> {
|
|
|
45
45
|
private _buffer: ToneAudioBuffer;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* if the buffer should loop once
|
|
48
|
+
* if the buffer should loop once its over
|
|
49
49
|
*/
|
|
50
50
|
private _loop: boolean;
|
|
51
51
|
|
|
@@ -369,7 +369,7 @@ export class Player extends Source<PlayerOptions> {
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
/**
|
|
372
|
-
* If the buffer should loop once
|
|
372
|
+
* If the buffer should loop once its over.
|
|
373
373
|
* @example
|
|
374
374
|
* const player = new Tone.Player("https://tonejs.github.io/audio/drum-samples/breakbeat.mp3").toDestination();
|
|
375
375
|
* player.loop = true;
|
|
@@ -248,7 +248,7 @@ export class ToneBufferSource extends OneShotSource<ToneBufferSourceOptions> {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
|
-
* If the buffer should loop once
|
|
251
|
+
* If the buffer should loop once its over.
|
|
252
252
|
*/
|
|
253
253
|
get loop(): boolean {
|
|
254
254
|
return this._source.loop;
|
|
@@ -85,7 +85,7 @@ describe("LFO", () => {
|
|
|
85
85
|
expect(buffer.max()).to.be.lte(18);
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
it("initially outputs a signal at the center of
|
|
88
|
+
it("initially outputs a signal at the center of its phase", async () => {
|
|
89
89
|
const buffer = await Offline(() => {
|
|
90
90
|
new LFO(100, 10, 20).toDestination();
|
|
91
91
|
});
|
|
@@ -112,7 +112,7 @@ describe("PulseOscillator", () => {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
context("Types", () => {
|
|
115
|
-
it("reports
|
|
115
|
+
it("reports its type", () => {
|
|
116
116
|
const osc = new PulseOscillator();
|
|
117
117
|
expect(osc.type).to.equal("pulse");
|
|
118
118
|
expect(osc.baseType).to.equal("pulse");
|
package/Tone/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version: string = "15.2.
|
|
1
|
+
export const version: string = "15.2.5";
|