tone 15.2.2 → 15.2.4

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.
Files changed (82) hide show
  1. package/Tone/component/analysis/Analyser.ts +11 -11
  2. package/Tone/component/analysis/MeterBase.ts +1 -1
  3. package/Tone/component/envelope/Envelope.ts +1 -1
  4. package/Tone/component/filter/LowpassCombFilter.ts +1 -1
  5. package/Tone/core/clock/Clock.test.ts +9 -9
  6. package/Tone/core/clock/TickParam.ts +1 -1
  7. package/Tone/core/clock/TickSignal.test.ts +6 -6
  8. package/Tone/core/clock/TickSource.test.ts +1 -1
  9. package/Tone/core/context/Context.ts +1 -1
  10. package/Tone/core/context/ToneAudioBuffer.test.ts +1 -1
  11. package/Tone/core/context/ToneAudioBuffers.test.ts +1 -1
  12. package/Tone/core/context/ToneAudioBuffers.ts +2 -2
  13. package/Tone/core/type/Frequency.test.ts +6 -6
  14. package/Tone/core/type/Ticks.test.ts +1 -1
  15. package/Tone/core/type/Time.test.ts +2 -2
  16. package/Tone/core/type/TransportTime.test.ts +1 -1
  17. package/Tone/core/util/IntervalTimeline.test.ts +1 -1
  18. package/Tone/core/util/IntervalTimeline.ts +1 -1
  19. package/Tone/core/util/StateTimeline.test.ts +2 -2
  20. package/Tone/core/util/Timeline.test.ts +1 -1
  21. package/Tone/core/util/Timeline.ts +1 -1
  22. package/Tone/effect/AutoWah.ts +1 -1
  23. package/Tone/effect/FrequencyShifter.ts +1 -1
  24. package/Tone/effect/MidSideEffect.ts +1 -1
  25. package/Tone/effect/StereoWidener.ts +1 -1
  26. package/Tone/effect/Vibrato.ts +1 -1
  27. package/Tone/event/Part.test.ts +6 -6
  28. package/Tone/event/Part.ts +5 -5
  29. package/Tone/event/Sequence.test.ts +3 -3
  30. package/Tone/event/Sequence.ts +1 -1
  31. package/Tone/instrument/Instrument.ts +1 -1
  32. package/Tone/instrument/PolySynth.ts +1 -1
  33. package/Tone/instrument/Synth.test.ts +1 -1
  34. package/Tone/signal/Multiply.test.ts +1 -1
  35. package/Tone/signal/Negate.test.ts +2 -2
  36. package/Tone/signal/Signal.ts +1 -1
  37. package/Tone/source/Source.test.ts +1 -1
  38. package/Tone/source/UserMedia.test.ts +1 -2
  39. package/Tone/source/buffer/Players.ts +1 -1
  40. package/Tone/source/oscillator/OmniOscillator.ts +0 -1
  41. package/Tone/version.ts +1 -1
  42. package/build/Tone.js +1 -1
  43. package/build/Tone.js.map +1 -1
  44. package/build/esm/component/analysis/Analyser.d.ts +1 -1
  45. package/build/esm/component/analysis/Analyser.js +11 -11
  46. package/build/esm/component/analysis/MeterBase.d.ts +1 -1
  47. package/build/esm/component/envelope/Envelope.d.ts +1 -1
  48. package/build/esm/component/filter/LowpassCombFilter.d.ts +1 -1
  49. package/build/esm/core/clock/TickParam.js +1 -1
  50. package/build/esm/core/clock/TickParam.js.map +1 -1
  51. package/build/esm/core/context/Context.d.ts +1 -1
  52. package/build/esm/core/context/Context.js +1 -1
  53. package/build/esm/core/context/ToneAudioBuffers.d.ts +2 -2
  54. package/build/esm/core/context/ToneAudioBuffers.js +2 -2
  55. package/build/esm/core/util/IntervalTimeline.d.ts +1 -1
  56. package/build/esm/core/util/IntervalTimeline.js +1 -1
  57. package/build/esm/core/util/Timeline.d.ts +1 -1
  58. package/build/esm/core/util/Timeline.js +1 -1
  59. package/build/esm/effect/AutoWah.d.ts +1 -1
  60. package/build/esm/effect/FrequencyShifter.d.ts +1 -1
  61. package/build/esm/effect/FrequencyShifter.js +1 -1
  62. package/build/esm/effect/MidSideEffect.d.ts +1 -1
  63. package/build/esm/effect/MidSideEffect.js +1 -1
  64. package/build/esm/effect/StereoWidener.d.ts +1 -1
  65. package/build/esm/effect/StereoWidener.js +1 -1
  66. package/build/esm/effect/Vibrato.js +1 -1
  67. package/build/esm/effect/Vibrato.js.map +1 -1
  68. package/build/esm/event/Part.d.ts +2 -2
  69. package/build/esm/event/Part.js +5 -5
  70. package/build/esm/event/Part.js.map +1 -1
  71. package/build/esm/event/Sequence.d.ts +1 -1
  72. package/build/esm/instrument/Instrument.d.ts +1 -1
  73. package/build/esm/instrument/PolySynth.d.ts +1 -1
  74. package/build/esm/instrument/PolySynth.js +1 -1
  75. package/build/esm/signal/Signal.d.ts +1 -1
  76. package/build/esm/signal/Signal.js +1 -1
  77. package/build/esm/source/buffer/Players.d.ts +1 -1
  78. package/build/esm/source/buffer/Players.js +1 -1
  79. package/build/esm/source/oscillator/OmniOscillator.js +0 -1
  80. package/build/esm/source/oscillator/OmniOscillator.js.map +1 -1
  81. package/build/esm/version.js +1 -1
  82. package/package.json +3 -1
@@ -33,7 +33,7 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
33
33
  /**
34
34
  * The analyser node.
35
35
  */
36
- private _analysers: AnalyserNode[] = [];
36
+ private _analyzers: AnalyserNode[] = [];
37
37
 
38
38
  /**
39
39
  * Input and output are a gain node
@@ -81,10 +81,10 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
81
81
 
82
82
  assertRange(options.channels, 1);
83
83
 
84
- // create the analysers
84
+ // create the analyzers
85
85
  for (let channel = 0; channel < options.channels; channel++) {
86
- this._analysers[channel] = this.context.createAnalyser();
87
- this._split.connect(this._analysers[channel], channel, 0);
86
+ this._analyzers[channel] = this.context.createAnalyser();
87
+ this._split.connect(this._analyzers[channel], channel, 0);
88
88
  }
89
89
 
90
90
  // set the values initially
@@ -109,7 +109,7 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
109
109
  * represents the analysis done on a channel.
110
110
  */
111
111
  getValue(): Float32Array | Float32Array[] {
112
- this._analysers.forEach((analyser, index) => {
112
+ this._analyzers.forEach((analyser, index) => {
113
113
  const buffer = this._buffers[index];
114
114
  if (this._type === "fft") {
115
115
  analyser.getFloatFrequencyData(buffer);
@@ -128,10 +128,10 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
128
128
  * The size of analysis. This must be a power of two in the range 16 to 16384.
129
129
  */
130
130
  get size(): PowerOfTwo {
131
- return this._analysers[0].frequencyBinCount;
131
+ return this._analyzers[0].frequencyBinCount;
132
132
  }
133
133
  set size(size: PowerOfTwo) {
134
- this._analysers.forEach((analyser, index) => {
134
+ this._analyzers.forEach((analyser, index) => {
135
135
  analyser.fftSize = size * 2;
136
136
  this._buffers[index] = new Float32Array(size);
137
137
  });
@@ -142,7 +142,7 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
142
142
  * separation is done using {@link Split}
143
143
  */
144
144
  get channels(): number {
145
- return this._analysers.length;
145
+ return this._analyzers.length;
146
146
  }
147
147
 
148
148
  /**
@@ -163,10 +163,10 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
163
163
  * 0 represents no time averaging with the last analysis frame.
164
164
  */
165
165
  get smoothing(): NormalRange {
166
- return this._analysers[0].smoothingTimeConstant;
166
+ return this._analyzers[0].smoothingTimeConstant;
167
167
  }
168
168
  set smoothing(val: NormalRange) {
169
- this._analysers.forEach((a) => (a.smoothingTimeConstant = val));
169
+ this._analyzers.forEach((a) => (a.smoothingTimeConstant = val));
170
170
  }
171
171
 
172
172
  /**
@@ -174,7 +174,7 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
174
174
  */
175
175
  dispose(): this {
176
176
  super.dispose();
177
- this._analysers.forEach((a) => a.disconnect());
177
+ this._analyzers.forEach((a) => a.disconnect());
178
178
  this._split.dispose();
179
179
  this._gain.dispose();
180
180
  return this;
@@ -18,7 +18,7 @@ export class MeterBase<
18
18
  readonly name: string = "MeterBase";
19
19
 
20
20
  /**
21
- * The signal to be analysed
21
+ * The signal to be analyzed
22
22
  */
23
23
  input: InputNode;
24
24
 
@@ -116,7 +116,7 @@ export class Envelope extends ToneAudioNode<EnvelopeOptions> {
116
116
 
117
117
  /**
118
118
  * After triggerRelease is called, the envelope's
119
- * value will fall to it's miminum value over the
119
+ * value will fall to its minimum value over the
120
120
  * duration of the release time.
121
121
  * ```
122
122
  * /\
@@ -51,7 +51,7 @@ export class LowpassCombFilter extends ToneAudioNode<LowpassCombFilterOptions> {
51
51
  /**
52
52
  * @param delayTime The delay time of the comb filter
53
53
  * @param resonance The resonance (feedback) of the comb filter
54
- * @param dampening The cutoff of the lowpass filter dampens the signal as it is fedback.
54
+ * @param dampening The cutoff of the lowpass filter dampens the signal as it is fed back.
55
55
  */
56
56
  constructor(
57
57
  delayTime?: Time,
@@ -163,37 +163,37 @@ describe("Clock", () => {
163
163
  });
164
164
 
165
165
  it("can be scheduled to start in the future", async () => {
166
- let invokations = 0;
166
+ let invocations = 0;
167
167
  await Offline(() => {
168
168
  const clock = new Clock((time) => {
169
- invokations++;
169
+ invocations++;
170
170
  }, 2).start(0.1);
171
171
  }, 0.4);
172
- expect(invokations).to.equal(1);
172
+ expect(invocations).to.equal(1);
173
173
  });
174
174
 
175
175
  it("invokes the right number of callbacks given the duration", async () => {
176
- let invokations = 0;
176
+ let invocations = 0;
177
177
  await Offline(() => {
178
178
  new Clock((time) => {
179
- invokations++;
179
+ invocations++;
180
180
  }, 10)
181
181
  .start(0)
182
182
  .stop(0.45);
183
183
  }, 0.6);
184
- expect(invokations).to.equal(5);
184
+ expect(invocations).to.equal(5);
185
185
  });
186
186
 
187
187
  it("can schedule the frequency of the clock", async () => {
188
- let invokations = 0;
188
+ let invocations = 0;
189
189
  await Offline(() => {
190
190
  const clock = new Clock((time, ticks) => {
191
- invokations++;
191
+ invocations++;
192
192
  }, 2);
193
193
  clock.start(0).stop(1.01);
194
194
  clock.frequency.setValueAtTime(4, 0.5);
195
195
  }, 2);
196
- expect(invokations).to.equal(4);
196
+ expect(invocations).to.equal(4);
197
197
  });
198
198
  });
199
199
 
@@ -128,7 +128,7 @@ export class TickParam<
128
128
  }
129
129
 
130
130
  exponentialRampToValueAtTime(value: UnitMap[TypeName], time: Time): this {
131
- // aproximate it with multiple linear ramps
131
+ // approximate it with multiple linear ramps
132
132
  time = this.toSeconds(time);
133
133
  const computedVal = this._fromType(value);
134
134
 
@@ -152,12 +152,12 @@ describe("TickSignal", () => {
152
152
  expect(tickSignal0.getTimeOfTick(3)).to.be.closeTo(3, 0.01);
153
153
  tickSignal0.dispose();
154
154
 
155
- const tickSigna1 = new TickSignal(2);
156
- expect(tickSigna1.getTimeOfTick(0)).to.be.closeTo(0, 0.01);
157
- expect(tickSigna1.getTimeOfTick(1)).to.be.closeTo(0.5, 0.01);
158
- expect(tickSigna1.getTimeOfTick(2)).to.be.closeTo(1, 0.01);
159
- expect(tickSigna1.getTimeOfTick(3)).to.be.closeTo(1.5, 0.01);
160
- tickSigna1.dispose();
155
+ const tickSignal = new TickSignal(2);
156
+ expect(tickSignal.getTimeOfTick(0)).to.be.closeTo(0, 0.01);
157
+ expect(tickSignal.getTimeOfTick(1)).to.be.closeTo(0.5, 0.01);
158
+ expect(tickSignal.getTimeOfTick(2)).to.be.closeTo(1, 0.01);
159
+ expect(tickSignal.getTimeOfTick(3)).to.be.closeTo(1.5, 0.01);
160
+ tickSignal.dispose();
161
161
  });
162
162
 
163
163
  it("computes the time of a given tick when setValueAtTime is scheduled", () => {
@@ -149,7 +149,7 @@ describe("TickSource", () => {
149
149
  source.dispose();
150
150
  });
151
151
 
152
- it("can invoke stop multiple times, takes the last invokation", () => {
152
+ it("can invoke stop multiple times, takes the last invocation", () => {
153
153
  const source = new TickSource(1);
154
154
  source.start(0).stop(3).stop(2).stop(4);
155
155
  expect(source.getTicksAtTime(0)).to.be.closeTo(0, 0.01);
@@ -394,7 +394,7 @@ export class Context extends BaseContext {
394
394
  /**
395
395
  * How often the interval callback is invoked.
396
396
  * This number corresponds to how responsive the scheduling
397
- * can be. Setting to 0 will result in the lowest practial interval
397
+ * can be. Setting to 0 will result in the lowest practical interval
398
398
  * based on context properties. context.updateInterval + context.lookAhead
399
399
  * gives you the total latency between scheduling an event and hearing it.
400
400
  */
@@ -268,7 +268,7 @@ describe("ToneAudioBuffer", () => {
268
268
  buffer.dispose();
269
269
  });
270
270
 
271
- it("can convert from a multidimentional array", () => {
271
+ it("can convert from a multidimensional array", () => {
272
272
  const buffer = new ToneAudioBuffer();
273
273
  const arr = [
274
274
  new Float32Array(0.5 * buffer.sampleRate),
@@ -38,7 +38,7 @@ describe("ToneAudioBuffers", () => {
38
38
  );
39
39
  });
40
40
 
41
- it("throws an error when it tries to get an object that doesnt exist", (done) => {
41
+ it("throws an error when it tries to get an object that doesn't exist", (done) => {
42
42
  const buffer = new ToneAudioBuffers(
43
43
  {
44
44
  sine: testFile,
@@ -18,7 +18,7 @@ interface ToneAudioBuffersOptions {
18
18
  }
19
19
 
20
20
  /**
21
- * A data structure for holding multiple buffers in a Map-like datastructure.
21
+ * A data structure for holding multiple buffers in a Map-like data structure.
22
22
  *
23
23
  * @example
24
24
  * const pianoSamples = new Tone.ToneAudioBuffers({
@@ -141,7 +141,7 @@ export class ToneAudioBuffers extends Tone {
141
141
  /**
142
142
  * Add a buffer by name and url to the Buffers
143
143
  * @param name A unique name to give the buffer
144
- * @param url Either the url of the bufer, or a buffer which will be added with the given name.
144
+ * @param url Either the url of the buffer, or a buffer which will be added with the given name.
145
145
  * @param callback The callback to invoke when the url is loaded.
146
146
  * @param onerror Invoked if the buffer can't be loaded
147
147
  */
@@ -112,27 +112,27 @@ describe("FrequencyClass", () => {
112
112
  });
113
113
  });
114
114
 
115
- it("evalutes hertz", () => {
115
+ it("evaluates hertz", () => {
116
116
  expect(Frequency("1hz").valueOf()).to.equal(1);
117
117
  expect(Frequency("2hz").valueOf()).to.equal(2);
118
118
  expect(Frequency(4, "hz").valueOf()).to.equal(4);
119
119
  expect(Frequency("0.25hz").valueOf()).to.equal(0.25);
120
120
  });
121
121
 
122
- it("evalutes ticks", () => {
122
+ it("evaluates ticks", () => {
123
123
  return Offline(({ transport }) => {
124
124
  expect(Frequency(transport.PPQ, "i").valueOf()).to.equal(2);
125
125
  expect(Frequency(1, "i").valueOf()).to.equal(transport.PPQ * 2);
126
126
  });
127
127
  });
128
128
 
129
- it("evalutes transport time", () => {
129
+ it("evaluates transport time", () => {
130
130
  expect(Frequency("1:0").valueOf()).to.equal(0.5);
131
131
  expect(Frequency("1:4:0").valueOf()).to.equal(0.25);
132
132
  // expect(Frequency("2:1:0").valueOf()).to.equal(0.25);
133
133
  });
134
134
 
135
- it("evalutes midi", () => {
135
+ it("evaluates midi", () => {
136
136
  expect(Frequency(48, "midi").valueOf()).to.be.closeTo(
137
137
  TonalMidi.midiToFreq(48),
138
138
  0.0001
@@ -143,7 +143,7 @@ describe("FrequencyClass", () => {
143
143
  );
144
144
  });
145
145
 
146
- it("evalutes hz", () => {
146
+ it("evaluates hz", () => {
147
147
  expect(Frequency(48, "hz").valueOf()).to.equal(48);
148
148
  expect(Frequency(480, "hz").valueOf()).to.equal(480);
149
149
  });
@@ -218,7 +218,7 @@ describe("FrequencyClass", () => {
218
218
  );
219
219
  });
220
220
 
221
- it("can accomidate different concert tuning", () => {
221
+ it("can accommodate different concert tuning", () => {
222
222
  FrequencyClass.A4 = 444;
223
223
  expect(Frequency("C4").valueOf()).to.be.closeTo(
224
224
  TonalMidi.midiToFreq(
@@ -133,7 +133,7 @@ describe("TicksClass", () => {
133
133
  });
134
134
  });
135
135
 
136
- it("can get the next subdivison when the transport is started", () => {
136
+ it("can get the next subdivision when the transport is started", () => {
137
137
  return Offline((context) => {
138
138
  const transport = context.transport;
139
139
  transport.start();
@@ -72,7 +72,7 @@ describe("TimeClass", () => {
72
72
  });
73
73
  });
74
74
 
75
- it("evalutes objects", () => {
75
+ it("evaluates objects", () => {
76
76
  return Offline(() => {
77
77
  expect(Time({ "4n": 3 }).valueOf()).to.equal(1.5);
78
78
  expect(Time({ "8t": 2, "1m": 3 }).valueOf()).to.be.closeTo(
@@ -98,7 +98,7 @@ describe("TimeClass", () => {
98
98
  expect(Time(2).quantize(8, 0.75).valueOf()).to.equal(0.5);
99
99
  });
100
100
 
101
- it("can get the next subdivison when the transport is started", () => {
101
+ it("can get the next subdivision when the transport is started", () => {
102
102
  return Offline((context) => {
103
103
  const transport = context.transport;
104
104
  transport.start(0.1);
@@ -116,7 +116,7 @@ describe("TransportTimeClass", () => {
116
116
  });
117
117
  });
118
118
 
119
- it("can get the next subdivison when the transport is started", () => {
119
+ it("can get the next subdivision when the transport is started", () => {
120
120
  return Offline((context) => {
121
121
  const transport = context.transport;
122
122
  transport.start();
@@ -26,7 +26,7 @@ describe("IntervalTimeline", () => {
26
26
  sched.dispose();
27
27
  });
28
28
 
29
- it("computes the lenght of the timeline correctly after adding events", () => {
29
+ it("computes the length of the timeline correctly after adding events", () => {
30
30
  const sched = new IntervalTimeline();
31
31
  sched.add({
32
32
  duration: 0.2,
@@ -26,7 +26,7 @@ export class IntervalTimeline extends Tone {
26
26
  readonly name: string = "IntervalTimeline";
27
27
 
28
28
  /**
29
- * The root node of the inteval tree
29
+ * The root node of the interval tree
30
30
  */
31
31
  private _root: IntervalNode | null = null;
32
32
 
@@ -51,7 +51,7 @@ describe("StateTimeline", () => {
51
51
  sched.dispose();
52
52
  });
53
53
 
54
- it("gets the last occurance of the state at or before the given time", () => {
54
+ it("gets the last occurrence of the state at or before the given time", () => {
55
55
  const sched = new StateTimeline();
56
56
  sched.setStateAtTime("started", 0);
57
57
  sched.setStateAtTime("stopped", 1);
@@ -68,7 +68,7 @@ describe("StateTimeline", () => {
68
68
  sched.dispose();
69
69
  });
70
70
 
71
- it("gets the next occurance of the state at or before the given time", () => {
71
+ it("gets the next occurrence of the state at or before the given time", () => {
72
72
  const sched = new StateTimeline();
73
73
  sched.setStateAtTime("started", 0);
74
74
  sched.setStateAtTime("stopped", 1);
@@ -303,7 +303,7 @@ describe("Timeline", () => {
303
303
  sched.dispose();
304
304
  });
305
305
 
306
- it("inforces increasing time", () => {
306
+ it("enforces increasing time", () => {
307
307
  const sched = new Timeline({
308
308
  increasing: true,
309
309
  });
@@ -348,7 +348,7 @@ export class Timeline<GenericEvent extends TimelineEvent> extends Tone {
348
348
 
349
349
  /**
350
350
  * Iterate over everything in the array between the startTime and endTime.
351
- * The timerange is inclusive of the startTime, but exclusive of the endTime.
351
+ * The time range is inclusive of the startTime, but exclusive of the endTime.
352
352
  * range = [startTime, endTime).
353
353
  * @param startTime The time to check if items are before
354
354
  * @param endTime The end of the test interval.
@@ -75,7 +75,7 @@ export class AutoWah extends Effect<AutoWahOptions> {
75
75
  private _bandpass: Filter;
76
76
 
77
77
  /**
78
- * The peaking fitler
78
+ * The peaking filter
79
79
  */
80
80
  private _peaking: Filter;
81
81
 
@@ -20,7 +20,7 @@ export interface FrequencyShifterOptions extends EffectOptions {
20
20
  * Note: Contrary to pitch shifting, all frequencies are shifted by the same amount,
21
21
  * destroying the harmonic relationship between them. This leads to the classic ring modulator timbre distortion.
22
22
  * The algorithm will produces some aliasing towards the high end, especially if your source material
23
- * contains a lot of high frequencies. Unfortunatelly the webaudio API does not support resampling
23
+ * contains a lot of high frequencies. Unfortunately the Web Audio API does not support resampling
24
24
  * buffers in real time, so it is not possible to fix it properly. Depending on the use case it might
25
25
  * be an option to low pass filter your input before frequency shifting it to get ride of the aliasing.
26
26
  * You can find a very detailed description of the algorithm here: https://larzeitlin.github.io/RMFS/
@@ -10,7 +10,7 @@ export type MidSideEffectOptions = EffectOptions;
10
10
  * (which comes out of both the left and the right channel)
11
11
  * and the 'side' (which only comes out of the the side channels)
12
12
  * and effects them separately before being recombined.
13
- * Applies a Mid/Side seperation and recombination.
13
+ * Applies a Mid/Side separation and recombination.
14
14
  * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).
15
15
  * This is a base-class for Mid/Side Effects.
16
16
  * @category Effect
@@ -15,7 +15,7 @@ export interface StereoWidenerOptions extends MidSideEffectOptions {
15
15
  }
16
16
 
17
17
  /**
18
- * Applies a width factor to the mid/side seperation.
18
+ * Applies a width factor to the mid/side separation.
19
19
  * 0 is all mid and 1 is all side.
20
20
  * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).
21
21
  * ```
@@ -65,7 +65,7 @@ export class Vibrato extends Effect<VibratoOptions> {
65
65
  min: 0,
66
66
  max: options.maxDelay,
67
67
  frequency: options.frequency,
68
- phase: -90, // offse the phase so the resting position is in the center
68
+ phase: -90, // offset the phase so the resting position is in the center
69
69
  })
70
70
  .start()
71
71
  .connect(this._delayNode.delayTime);
@@ -301,14 +301,14 @@ describe("Part", () => {
301
301
  });
302
302
 
303
303
  it("is invoked after it's started", async () => {
304
- let invokations = 0;
304
+ let invocations = 0;
305
305
  await Offline(({ transport }) => {
306
306
  const part = new Part(() => {
307
- invokations++;
307
+ invocations++;
308
308
  }, [0, 0.1]).start(0);
309
309
  transport.start();
310
310
  }, 0.2);
311
- expect(invokations).to.equal(2);
311
+ expect(invocations).to.equal(2);
312
312
  });
313
313
 
314
314
  it("passes in the scheduled time to the callback", async () => {
@@ -421,7 +421,7 @@ describe("Part", () => {
421
421
  });
422
422
 
423
423
  it("can schedule a subpart", async () => {
424
- let invokations = 0;
424
+ let invocations = 0;
425
425
  await Offline(({ transport }) => {
426
426
  const startTime = 0.1;
427
427
  const subPart = new Part({
@@ -431,7 +431,7 @@ describe("Part", () => {
431
431
  ],
432
432
  });
433
433
  const part = new Part((time, value) => {
434
- invokations++;
434
+ invocations++;
435
435
  if (value === 0) {
436
436
  expect(time - startTime).to.be.closeTo(0, 0.01);
437
437
  } else if (value === 1) {
@@ -446,7 +446,7 @@ describe("Part", () => {
446
446
  .start(0);
447
447
  transport.start(startTime);
448
448
  }, 0.7);
449
- expect(invokations).to.equal(3);
449
+ expect(invocations).to.equal(3);
450
450
  });
451
451
 
452
452
  it("can start with an offset", async () => {
@@ -384,10 +384,10 @@ export class Part<ValueType = any> extends ToneEvent<ValueType> {
384
384
 
385
385
  /**
386
386
  * Determine if the event should be currently looping
387
- * given the loop boundries of this Part.
387
+ * given the loop boundaries of this Part.
388
388
  * @param event The event to test
389
389
  */
390
- private _testLoopBoundries(event: ToneEvent): void {
390
+ private _testLoopBoundaries(event: ToneEvent): void {
391
391
  if (
392
392
  this._loop &&
393
393
  (event.startOffset < this._loopStart ||
@@ -439,7 +439,7 @@ export class Part<ValueType = any> extends ToneEvent<ValueType> {
439
439
  event.loopStart = this.loopStart;
440
440
  event.loopEnd = this.loopEnd;
441
441
  event.loop = loop;
442
- this._testLoopBoundries(event);
442
+ this._testLoopBoundaries(event);
443
443
  });
444
444
  }
445
445
 
@@ -455,7 +455,7 @@ export class Part<ValueType = any> extends ToneEvent<ValueType> {
455
455
  if (this._loop) {
456
456
  this._forEach((event) => {
457
457
  event.loopEnd = loopEnd;
458
- this._testLoopBoundries(event);
458
+ this._testLoopBoundaries(event);
459
459
  });
460
460
  }
461
461
  }
@@ -472,7 +472,7 @@ export class Part<ValueType = any> extends ToneEvent<ValueType> {
472
472
  if (this._loop) {
473
473
  this._forEach((event) => {
474
474
  event.loopStart = this.loopStart;
475
- this._testLoopBoundries(event);
475
+ this._testLoopBoundaries(event);
476
476
  });
477
477
  }
478
478
  }
@@ -353,7 +353,7 @@ describe("Sequence", () => {
353
353
  });
354
354
 
355
355
  it("can loop between loopStart and loopEnd", async () => {
356
- let invokations = 0;
356
+ let invocations = 0;
357
357
  await Offline(({ transport }) => {
358
358
  const seq = new Sequence({
359
359
  events: [0, [1, 2, 3], [4, 5]],
@@ -363,12 +363,12 @@ describe("Sequence", () => {
363
363
  callback(time, value): void {
364
364
  expect(value).to.be.at.least(1);
365
365
  expect(value).to.be.at.most(3);
366
- invokations++;
366
+ invocations++;
367
367
  },
368
368
  }).start(0);
369
369
  transport.start();
370
370
  }, 0.7);
371
- expect(invokations).to.equal(9);
371
+ expect(invocations).to.equal(9);
372
372
  });
373
373
 
374
374
  it("can set the loop points after starting", async () => {
@@ -41,7 +41,7 @@ export class Sequence<ValueType = any> extends ToneEvent<ValueType> {
41
41
  readonly name: string = "Sequence";
42
42
 
43
43
  /**
44
- * The subdivison of each note
44
+ * The subdivision of each note
45
45
  */
46
46
  private _subdivision: Ticks;
47
47
 
@@ -20,7 +20,7 @@ export abstract class Instrument<
20
20
  Options extends InstrumentOptions,
21
21
  > extends ToneAudioNode<Options> {
22
22
  /**
23
- * The output and volume triming node
23
+ * The output and volume trimming node
24
24
  */
25
25
  private _volume: Volume;
26
26
  output: OutputNode;
@@ -187,7 +187,7 @@ export class PolySynth<
187
187
 
188
188
  /**
189
189
  * Invoked when the source is done making sound, so that it can be
190
- * readded to the pool of available voices
190
+ * re-added to the pool of available voices
191
191
  */
192
192
  private _makeVoiceAvailable(voice: Voice): void {
193
193
  this._availableVoices.push(voice);
@@ -79,7 +79,7 @@ describe("Synth", () => {
79
79
  simple.dispose();
80
80
  });
81
81
 
82
- it("can get does not include omited oscillator attributes", () => {
82
+ it("can get does not include omitted oscillator attributes", () => {
83
83
  const simple = new Synth();
84
84
  expect(simple.get().oscillator).to.not.have.key("frequency");
85
85
  expect(simple.get().oscillator).to.not.have.key("detune");
@@ -20,7 +20,7 @@ describe("Multiply", () => {
20
20
  mult.dispose();
21
21
  });
22
22
 
23
- it("correctly multiplys a signal and a scalar", () => {
23
+ it("correctly multiplies a signal and a scalar", () => {
24
24
  return ConstantOutput(() => {
25
25
  const signal = new Signal(2);
26
26
  const mult = new Multiply(10);
@@ -7,7 +7,7 @@ describe("Negate", () => {
7
7
  BasicTests(Negate);
8
8
 
9
9
  context("Negating", () => {
10
- it("negateates a positive value", () => {
10
+ it("negates a positive value", () => {
11
11
  return ConstantOutput(() => {
12
12
  const signal = new Signal(1);
13
13
  const negate = new Negate();
@@ -16,7 +16,7 @@ describe("Negate", () => {
16
16
  }, -1);
17
17
  });
18
18
 
19
- it("makes a negateative value positive", () => {
19
+ it("makes a negative value positive", () => {
20
20
  return ConstantOutput(() => {
21
21
  const signal = new Signal(-10);
22
22
  const negate = new Negate();
@@ -31,7 +31,7 @@ export interface SignalOptions<TypeName extends UnitName>
31
31
  *
32
32
  * @example
33
33
  * const osc = new Tone.Oscillator().toDestination().start();
34
- * // a scheduleable signal which can be connected to control an AudioParam or another Signal
34
+ * // a schedulable signal which can be connected to control an AudioParam or another Signal
35
35
  * const signal = new Tone.Signal({
36
36
  * value: "C4",
37
37
  * units: "frequency"
@@ -55,7 +55,7 @@ describe("Source", () => {
55
55
  source.dispose();
56
56
  });
57
57
 
58
- it("is initally stopped", () => {
58
+ it("is initially stopped", () => {
59
59
  const source = new Oscillator();
60
60
  expect(source.state).to.equal("stopped");
61
61
  source.dispose();
@@ -99,8 +99,7 @@ describe("UserMedia", () => {
99
99
  return extIn
100
100
  .open("doesn't exist")
101
101
  .then(() => {
102
- // shouldn't call 'then'
103
- throw new Error("shouldnt call 'then'");
102
+ throw new Error("shouldn't call 'then'");
104
103
  })
105
104
  .catch(() => {
106
105
  extIn.dispose();