tone 14.9.10 → 14.9.11

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.
@@ -1,4 +1,10 @@
1
- import { AudioRange, Cents, Degrees, Frequency, Positive } from "../../core/type/Units";
1
+ import {
2
+ AudioRange,
3
+ Cents,
4
+ Degrees,
5
+ Frequency,
6
+ Positive,
7
+ } from "../../core/type/Units";
2
8
  import { Omit } from "../../core/util/Interface";
3
9
  import { Signal } from "../../signal/Signal";
4
10
  import { SourceOptions } from "../Source";
@@ -8,7 +14,6 @@ import { OfflineContext } from "../../core/context/OfflineContext";
8
14
  * The common interface of all Oscillators
9
15
  */
10
16
  export interface ToneOscillatorInterface {
11
-
12
17
  /**
13
18
  * The oscillator type without the partialsCount appended to the end
14
19
  * @example
@@ -19,8 +24,8 @@ export interface ToneOscillatorInterface {
19
24
  baseType: OscillatorType | "pulse" | "pwm";
20
25
 
21
26
  /**
22
- * The oscillator's type. Also capable of setting the first x number of partials of the oscillator.
23
- * For example: "sine4" would set be the first 4 partials of the sine wave and "triangle8" would
27
+ * The oscillator's type. Also capable of setting the first x number of partials of the oscillator.
28
+ * For example: "sine4" would set be the first 4 partials of the sine wave and "triangle8" would
24
29
  * set the first 8 partials of the triangle wave.
25
30
  * @example
26
31
  * return Tone.Offline(() => {
@@ -52,7 +57,7 @@ export interface ToneOscillatorInterface {
52
57
 
53
58
  /**
54
59
  * The phase is the starting position within the oscillator's cycle. For example
55
- * a phase of 180 would start halfway through the oscillator's cycle.
60
+ * a phase of 180 would start halfway through the oscillator's cycle.
56
61
  * @example
57
62
  * return Tone.Offline(() => {
58
63
  * const osc = new Tone.Oscillator({
@@ -64,11 +69,11 @@ export interface ToneOscillatorInterface {
64
69
  phase: Degrees;
65
70
 
66
71
  /**
67
- * The partials describes the relative amplitude of each of the harmonics of the oscillator.
68
- * The first value in the array is the first harmonic (i.e. the fundamental frequency), the
72
+ * The partials describes the relative amplitude of each of the harmonics of the oscillator.
73
+ * The first value in the array is the first harmonic (i.e. the fundamental frequency), the
69
74
  * second harmonic is an octave up, the third harmonic is an octave and a fifth, etc. The resulting
70
- * oscillator output is composed of a sine tone at the relative amplitude at each of the harmonic intervals.
71
- *
75
+ * oscillator output is composed of a sine tone at the relative amplitude at each of the harmonic intervals.
76
+ *
72
77
  * Setting this value will automatically set the type to "custom".
73
78
  * The value is an empty array when the type is not "custom".
74
79
  * @example
@@ -107,49 +112,83 @@ export interface ToneOscillatorInterface {
107
112
  /**
108
113
  * Render a segment of the oscillator to an offline context and return the results as an array
109
114
  */
110
- export async function generateWaveform(instance: any, length: number): Promise<Float32Array> {
115
+ export async function generateWaveform(
116
+ instance: any,
117
+ length: number
118
+ ): Promise<Float32Array> {
111
119
  const duration = length / instance.context.sampleRate;
112
- const context = new OfflineContext(1, duration, instance.context.sampleRate);
113
- const clone = new instance.constructor(Object.assign(instance.get(), {
114
- // should do 2 iterations
115
- frequency: 2 / duration,
116
- // zero out the detune
117
- detune: 0,
118
- context
119
- })).toDestination();
120
+ const context = new OfflineContext(
121
+ 1,
122
+ duration,
123
+ instance.context.sampleRate
124
+ );
125
+ const clone = new instance.constructor(
126
+ Object.assign(instance.get(), {
127
+ // should do 2 iterations
128
+ frequency: 2 / duration,
129
+ // zero out the detune
130
+ detune: 0,
131
+ context,
132
+ })
133
+ ).toDestination();
120
134
  clone.start(0);
121
135
  const buffer = await context.render();
122
136
  return buffer.getChannelData(0);
123
137
  }
124
138
 
139
+ /**
140
+ * The supported number of partials
141
+ */
142
+ type PartialsRange =
143
+ | 1
144
+ | 2
145
+ | 3
146
+ | 4
147
+ | 5
148
+ | 6
149
+ | 7
150
+ | 8
151
+ | 9
152
+ | 10
153
+ | 11
154
+ | 12
155
+ | 13
156
+ | 14
157
+ | 15
158
+ | 16
159
+ | 17
160
+ | 18
161
+ | 19
162
+ | 20
163
+ | 21
164
+ | 22
165
+ | 23
166
+ | 24
167
+ | 25
168
+ | 26
169
+ | 27
170
+ | 28
171
+ | 29
172
+ | 30
173
+ | 31
174
+ | 32;
175
+
125
176
  /**
126
177
  * Oscillators with partials
127
178
  */
128
- type SineWithPartials =
129
- "sine1" | "sine2" | "sine3" | "sine4" | "sine5" | "sine6" | "sine7" | "sine8" | "sine9" |
130
- "sine10" | "sine11" | "sine12" | "sine13" | "sine14" | "sine15" | "sine16" | "sine17" | "sine18" | "sine19" |
131
- "sine20" | "sine21" | "sine22" | "sine23" | "sine24" | "sine25" | "sine26" | "sine27" | "sine28" | "sine29" |
132
- "sine30" | "sine31" | "sine32";
133
-
134
- type SquareWithPartials =
135
- "square1" | "square2" | "square3" | "square4" | "square5" | "square6" | "square7" | "square8" | "square9" |
136
- "square10" | "square11" | "square12" | "square13" | "square14" | "square15" | "square16" | "square17" | "square18" | "square19" |
137
- "square20" | "square21" | "square22" | "square23" | "square24" | "square25" | "square26" | "square27" | "square28" | "square29" |
138
- "square30" | "square31" | "square32";
139
-
140
- type SawtoothWithPartials =
141
- "sawtooth1" | "sawtooth2" | "sawtooth3" | "sawtooth4" | "sawtooth5" | "sawtooth6" | "sawtooth7" | "sawtooth8" | "sawtooth9" |
142
- "sawtooth10" | "sawtooth11" | "sawtooth12" | "sawtooth13" | "sawtooth14" | "sawtooth15" | "sawtooth16" | "sawtooth17" | "sawtooth18" | "sawtooth19" |
143
- "sawtooth20" | "sawtooth21" | "sawtooth22" | "sawtooth23" | "sawtooth24" | "sawtooth25" | "sawtooth26" | "sawtooth27" | "sawtooth28" | "sawtooth29" |
144
- "sawtooth30" | "sawtooth31" | "sawtooth32";
145
-
146
- type TriangleWithPartials =
147
- "triangle1" | "triangle2" | "triangle3" | "triangle4" | "triangle5" | "triangle6" | "triangle7" | "triangle8" | "triangle9" |
148
- "triangle10" | "triangle11" | "triangle12" | "triangle13" | "triangle14" | "triangle15" | "triangle16" | "triangle17" | "triangle18" | "triangle19" |
149
- "triangle20" | "triangle21" | "triangle22" | "triangle23" | "triangle24" | "triangle25" | "triangle26" | "triangle27" | "triangle28" | "triangle29" |
150
- "triangle30" | "triangle31" | "triangle32";
151
-
152
- type TypeWithPartials = SineWithPartials | SquareWithPartials | TriangleWithPartials | SawtoothWithPartials;
179
+ type SineWithPartials = `sine${PartialsRange}`;
180
+
181
+ type SquareWithPartials = `square${PartialsRange}`;
182
+
183
+ type SawtoothWithPartials = `sawtooth${PartialsRange}`;
184
+
185
+ type TriangleWithPartials = `triangle${PartialsRange}`;
186
+
187
+ type TypeWithPartials =
188
+ | SineWithPartials
189
+ | SquareWithPartials
190
+ | TriangleWithPartials
191
+ | SawtoothWithPartials;
153
192
 
154
193
  interface BaseOscillatorOptions extends SourceOptions {
155
194
  frequency: Frequency;
@@ -182,7 +221,10 @@ interface TonePartialOscillatorOptions extends BaseOscillatorOptions {
182
221
  type: TypeWithPartials;
183
222
  }
184
223
 
185
- export type ToneOscillatorConstructorOptions = ToneCustomOscillatorOptions | ToneTypeOscillatorOptions | TonePartialOscillatorOptions;
224
+ export type ToneOscillatorConstructorOptions =
225
+ | ToneCustomOscillatorOptions
226
+ | ToneTypeOscillatorOptions
227
+ | TonePartialOscillatorOptions;
186
228
 
187
229
  export interface ToneOscillatorOptions extends BaseOscillatorOptions {
188
230
  type: ToneOscillatorType;
@@ -213,7 +255,10 @@ interface FMPartialsOscillatorOptions extends FMBaseOscillatorOptions {
213
255
  type: TypeWithPartials;
214
256
  }
215
257
 
216
- export type FMConstructorOptions = FMTypeOscillatorOptions | FMCustomOscillatorOptions | FMPartialsOscillatorOptions;
258
+ export type FMConstructorOptions =
259
+ | FMTypeOscillatorOptions
260
+ | FMCustomOscillatorOptions
261
+ | FMPartialsOscillatorOptions;
217
262
 
218
263
  export interface FMOscillatorOptions extends ToneOscillatorOptions {
219
264
  harmonicity: Positive;
@@ -243,7 +288,10 @@ interface AMPartialsOscillatorOptions extends AMBaseOscillatorOptions {
243
288
  type: TypeWithPartials;
244
289
  }
245
290
 
246
- export type AMConstructorOptions = AMCustomOscillatorOptions | AMTypeOscillatorOptions | AMPartialsOscillatorOptions;
291
+ export type AMConstructorOptions =
292
+ | AMCustomOscillatorOptions
293
+ | AMTypeOscillatorOptions
294
+ | AMPartialsOscillatorOptions;
247
295
 
248
296
  export interface AMOscillatorOptions extends ToneOscillatorOptions {
249
297
  harmonicity: Positive;
@@ -271,7 +319,10 @@ interface FatPartialsOscillatorOptions extends FatBaseOscillatorOptions {
271
319
  type: TypeWithPartials;
272
320
  }
273
321
 
274
- export type FatConstructorOptions = FatCustomOscillatorOptions | FatTypeOscillatorOptions | FatPartialsOscillatorOptions;
322
+ export type FatConstructorOptions =
323
+ | FatCustomOscillatorOptions
324
+ | FatTypeOscillatorOptions
325
+ | FatPartialsOscillatorOptions;
275
326
 
276
327
  export interface FatOscillatorOptions extends ToneOscillatorOptions {
277
328
  spread: Cents;
@@ -301,89 +352,53 @@ export interface PWMOscillatorOptions extends BaseOscillatorOptions {
301
352
  /**
302
353
  * FM Oscillators with partials
303
354
  */
304
- type FMSineWithPartials =
305
- "fmsine1" | "fmsine2" | "fmsine3" | "fmsine4" | "fmsine5" | "fmsine6" | "fmsine7" | "fmsine8" | "fmsine9" |
306
- "fmsine10" | "fmsine11" | "fmsine12" | "fmsine13" | "fmsine14" | "fmsine15" | "fmsine16" | "fmsine17" | "fmsine18" | "fmsine19" |
307
- "fmsine20" | "fmsine21" | "fmsine22" | "fmsine23" | "fmsine24" | "fmsine25" | "fmsine26" | "fmsine27" | "fmsine28" | "fmsine29" |
308
- "fmsine30" | "fmsine31" | "fmsine32";
309
-
310
- type FMSquareWithPartials =
311
- "fmsquare1" | "fmsquare2" | "fmsquare3" | "fmsquare4" | "fmsquare5" | "fmsquare6" | "fmsquare7" | "fmsquare8" | "fmsquare9" |
312
- "fmsquare10" | "fmsquare11" | "fmsquare12" | "fmsquare13" | "fmsquare14" | "fmsquare15" | "fmsquare16" | "fmsquare17" | "fmsquare18" | "fmsquare19" |
313
- "fmsquare20" | "fmsquare21" | "fmsquare22" | "fmsquare23" | "fmsquare24" | "fmsquare25" | "fmsquare26" | "fmsquare27" | "fmsquare28" | "fmsquare29" |
314
- "fmsquare30" | "fmsquare31" | "fmsquare32";
315
-
316
- type FMSawtoothWithPartials =
317
- "fmsawtooth1" | "fmsawtooth2" | "fmsawtooth3" | "fmsawtooth4" | "fmsawtooth5" | "fmsawtooth6" | "fmsawtooth7" | "fmsawtooth8" | "fmsawtooth9" |
318
- "fmsawtooth10" | "fmsawtooth11" | "fmsawtooth12" | "fmsawtooth13" | "fmsawtooth14" | "fmsawtooth15" | "fmsawtooth16" | "fmsawtooth17" | "fmsawtooth18" | "fmsawtooth19" |
319
- "fmsawtooth20" | "fmsawtooth21" | "fmsawtooth22" | "fmsawtooth23" | "fmsawtooth24" | "fmsawtooth25" | "fmsawtooth26" | "fmsawtooth27" | "fmsawtooth28" | "fmsawtooth29" |
320
- "fmsawtooth30" | "fmsawtooth31" | "fmsawtooth32";
321
-
322
- type FMTriangleWithPartials =
323
- "fmtriangle1" | "fmtriangle2" | "fmtriangle3" | "fmtriangle4" | "fmtriangle5" | "fmtriangle6" | "fmtriangle7" | "fmtriangle8" | "fmtriangle9" |
324
- "fmtriangle10" | "fmtriangle11" | "fmtriangle12" | "fmtriangle13" | "fmtriangle14" | "fmtriangle15" | "fmtriangle16" | "fmtriangle17" | "fmtriangle18" | "fmtriangle19" |
325
- "fmtriangle20" | "fmtriangle21" | "fmtriangle22" | "fmtriangle23" | "fmtriangle24" | "fmtriangle25" | "fmtriangle26" | "fmtriangle27" | "fmtriangle28" | "fmtriangle29" |
326
- "fmtriangle30" | "fmtriangle31" | "fmtriangle32";
327
-
328
- type FMTypeWithPartials = FMSineWithPartials | FMSquareWithPartials | FMSawtoothWithPartials | FMTriangleWithPartials;
355
+ type FMSineWithPartials = `fmsine${PartialsRange}`;
356
+
357
+ type FMSquareWithPartials = `fmsquare${PartialsRange}`;
358
+
359
+ type FMSawtoothWithPartials = `fmsawtooth${PartialsRange}`;
360
+
361
+ type FMTriangleWithPartials = `fmtriangle${PartialsRange}`;
362
+
363
+ type FMTypeWithPartials =
364
+ | FMSineWithPartials
365
+ | FMSquareWithPartials
366
+ | FMSawtoothWithPartials
367
+ | FMTriangleWithPartials;
329
368
 
330
369
  /**
331
370
  * AM Oscillators with partials
332
371
  */
333
- type AMSineWithPartials =
334
- "amsine1" | "amsine2" | "amsine3" | "amsine4" | "amsine5" | "amsine6" | "amsine7" | "amsine8" | "amsine9" |
335
- "amsine10" | "amsine11" | "amsine12" | "amsine13" | "amsine14" | "amsine15" | "amsine16" | "amsine17" | "amsine18" | "amsine19" |
336
- "amsine20" | "amsine21" | "amsine22" | "amsine23" | "amsine24" | "amsine25" | "amsine26" | "amsine27" | "amsine28" | "amsine29" |
337
- "amsine30" | "amsine31" | "amsine32";
338
-
339
- type AMSquareWithPartials =
340
- "amsquare1" | "amsquare2" | "amsquare3" | "amsquare4" | "amsquare5" | "amsquare6" | "amsquare7" | "amsquare8" | "amsquare9" |
341
- "amsquare10" | "amsquare11" | "amsquare12" | "amsquare13" | "amsquare14" | "amsquare15" | "amsquare16" | "amsquare17" | "amsquare18" | "amsquare19" |
342
- "amsquare20" | "amsquare21" | "amsquare22" | "amsquare23" | "amsquare24" | "amsquare25" | "amsquare26" | "amsquare27" | "amsquare28" | "amsquare29" |
343
- "amsquare30" | "amsquare31" | "amsquare32";
344
-
345
- type AMSawtoothWithPartials =
346
- "amsawtooth1" | "amsawtooth2" | "amsawtooth3" | "amsawtooth4" | "amsawtooth5" | "amsawtooth6" | "amsawtooth7" | "amsawtooth8" | "amsawtooth9" |
347
- "amsawtooth10" | "amsawtooth11" | "amsawtooth12" | "amsawtooth13" | "amsawtooth14" | "amsawtooth15" | "amsawtooth16" | "amsawtooth17" | "amsawtooth18" | "amsawtooth19" |
348
- "amsawtooth20" | "amsawtooth21" | "amsawtooth22" | "amsawtooth23" | "amsawtooth24" | "amsawtooth25" | "amsawtooth26" | "amsawtooth27" | "amsawtooth28" | "amsawtooth29" |
349
- "amsawtooth30" | "amsawtooth31" | "amsawtooth32";
350
-
351
- type AMTriangleWithPartials =
352
- "amtriangle1" | "amtriangle2" | "amtriangle3" | "amtriangle4" | "amtriangle5" | "amtriangle6" | "amtriangle7" | "amtriangle8" | "amtriangle9" |
353
- "amtriangle10" | "amtriangle11" | "amtriangle12" | "amtriangle13" | "amtriangle14" | "amtriangle15" | "amtriangle16" | "amtriangle17" | "amtriangle18" | "amtriangle19" |
354
- "amtriangle20" | "amtriangle21" | "amtriangle22" | "amtriangle23" | "amtriangle24" | "amtriangle25" | "amtriangle26" | "amtriangle27" | "amtriangle28" | "amtriangle29" |
355
- "amtriangle30" | "amtriangle31" | "amtriangle32";
356
-
357
- type AMTypeWithPartials = AMSineWithPartials | AMSquareWithPartials | AMSawtoothWithPartials | AMTriangleWithPartials;
372
+ type AMSineWithPartials = `amsine${PartialsRange}`;
373
+
374
+ type AMSquareWithPartials = `amsquare${PartialsRange}`;
375
+
376
+ type AMSawtoothWithPartials = `amsawtooth${PartialsRange}`;
377
+
378
+ type AMTriangleWithPartials = `amtriangle${PartialsRange}`;
379
+
380
+ type AMTypeWithPartials =
381
+ | AMSineWithPartials
382
+ | AMSquareWithPartials
383
+ | AMSawtoothWithPartials
384
+ | AMTriangleWithPartials;
358
385
 
359
386
  /**
360
387
  * Fat Oscillators with partials
361
388
  */
362
- type FatSineWithPartials =
363
- "fatsine1" | "fatsine2" | "fatsine3" | "fatsine4" | "fatsine5" | "fatsine6" | "fatsine7" | "fatsine8" | "fatsine9" |
364
- "fatsine10" | "fatsine11" | "fatsine12" | "fatsine13" | "fatsine14" | "fatsine15" | "fatsine16" | "fatsine17" | "fatsine18" | "fatsine19" |
365
- "fatsine20" | "fatsine21" | "fatsine22" | "fatsine23" | "fatsine24" | "fatsine25" | "fatsine26" | "fatsine27" | "fatsine28" | "fatsine29" |
366
- "fatsine30" | "fatsine31" | "fatsine32";
367
-
368
- type FatSquareWithPartials =
369
- "fatsquare1" | "fatsquare2" | "fatsquare3" | "fatsquare4" | "fatsquare5" | "fatsquare6" | "fatsquare7" | "fatsquare8" | "fatsquare9" |
370
- "fatsquare10" | "fatsquare11" | "fatsquare12" | "fatsquare13" | "fatsquare14" | "fatsquare15" | "fatsquare16" | "fatsquare17" | "fatsquare18" | "fatsquare19" |
371
- "fatsquare20" | "fatsquare21" | "fatsquare22" | "fatsquare23" | "fatsquare24" | "fatsquare25" | "fatsquare26" | "fatsquare27" | "fatsquare28" | "fatsquare29" |
372
- "fatsquare30" | "fatsquare31" | "fatsquare32";
373
-
374
- type FatSawtoothWithPartials =
375
- "fatsawtooth1" | "fatsawtooth2" | "fatsawtooth3" | "fatsawtooth4" | "fatsawtooth5" | "fatsawtooth6" | "fatsawtooth7" | "fatsawtooth8" | "fatsawtooth9" |
376
- "fatsawtooth10" | "fatsawtooth11" | "fatsawtooth12" | "fatsawtooth13" | "fatsawtooth14" | "fatsawtooth15" | "fatsawtooth16" | "fatsawtooth17" | "fatsawtooth18" | "fatsawtooth19" |
377
- "fatsawtooth20" | "fatsawtooth21" | "fatsawtooth22" | "fatsawtooth23" | "fatsawtooth24" | "fatsawtooth25" | "fatsawtooth26" | "fatsawtooth27" | "fatsawtooth28" | "fatsawtooth29" |
378
- "fatsawtooth30" | "fatsawtooth31" | "fatsawtooth32";
379
-
380
- type FatTriangleWithPartials =
381
- "fattriangle1" | "fattriangle2" | "fattriangle3" | "fattriangle4" | "fattriangle5" | "fattriangle6" | "fattriangle7" | "fattriangle8" | "fattriangle9" |
382
- "fattriangle10" | "fattriangle11" | "fattriangle12" | "fattriangle13" | "fattriangle14" | "fattriangle15" | "fattriangle16" | "fattriangle17" | "fattriangle18" | "fattriangle19" |
383
- "fattriangle20" | "fattriangle21" | "fattriangle22" | "fattriangle23" | "fattriangle24" | "fattriangle25" | "fattriangle26" | "fattriangle27" | "fattriangle28" | "fattriangle29" |
384
- "fattriangle30" | "fattriangle31" | "fattriangle32";
385
-
386
- type FatTypeWithPartials = FatSineWithPartials | FatSquareWithPartials | FatSawtoothWithPartials | FatTriangleWithPartials;
389
+ type FatSineWithPartials = `fatsine${PartialsRange}`;
390
+
391
+ type FatSquareWithPartials = `fatsquare${PartialsRange}`;
392
+
393
+ type FatSawtoothWithPartials = `fatsawtooth${PartialsRange}`;
394
+
395
+ type FatTriangleWithPartials = `fattriangle${PartialsRange}`;
396
+
397
+ type FatTypeWithPartials =
398
+ | FatSineWithPartials
399
+ | FatSquareWithPartials
400
+ | FatSawtoothWithPartials
401
+ | FatTriangleWithPartials;
387
402
 
388
403
  /**
389
404
  * Omni FM
@@ -437,17 +452,42 @@ interface OmniFatPartialsOscillatorOptions extends FatBaseOscillatorOptions {
437
452
  }
438
453
 
439
454
  export type OmniOscillatorType =
440
- "fatsine" | "fatsquare" | "fatsawtooth" | "fattriangle" | "fatcustom" | FatTypeWithPartials |
441
- "fmsine" | "fmsquare" | "fmsawtooth" | "fmtriangle" | "fmcustom" | FMTypeWithPartials |
442
- "amsine" | "amsquare" | "amsawtooth" | "amtriangle" | "amcustom" | AMTypeWithPartials |
443
- TypeWithPartials | OscillatorType | "pulse" | "pwm";
455
+ | "fatsine"
456
+ | "fatsquare"
457
+ | "fatsawtooth"
458
+ | "fattriangle"
459
+ | "fatcustom"
460
+ | FatTypeWithPartials
461
+ | "fmsine"
462
+ | "fmsquare"
463
+ | "fmsawtooth"
464
+ | "fmtriangle"
465
+ | "fmcustom"
466
+ | FMTypeWithPartials
467
+ | "amsine"
468
+ | "amsquare"
469
+ | "amsawtooth"
470
+ | "amtriangle"
471
+ | "amcustom"
472
+ | AMTypeWithPartials
473
+ | TypeWithPartials
474
+ | OscillatorType
475
+ | "pulse"
476
+ | "pwm";
444
477
 
445
478
  export type OmniOscillatorOptions =
446
- PulseOscillatorOptions | PWMOscillatorOptions |
447
- OmniFatCustomOscillatorOptions | OmniFatTypeOscillatorOptions | OmniFatPartialsOscillatorOptions |
448
- OmniFMCustomOscillatorOptions | OmniFMTypeOscillatorOptions | OmniFMPartialsOscillatorOptions |
449
- OmniAMCustomOscillatorOptions | OmniAMTypeOscillatorOptions | OmniAMPartialsOscillatorOptions |
450
- ToneOscillatorConstructorOptions;
479
+ | PulseOscillatorOptions
480
+ | PWMOscillatorOptions
481
+ | OmniFatCustomOscillatorOptions
482
+ | OmniFatTypeOscillatorOptions
483
+ | OmniFatPartialsOscillatorOptions
484
+ | OmniFMCustomOscillatorOptions
485
+ | OmniFMTypeOscillatorOptions
486
+ | OmniFMPartialsOscillatorOptions
487
+ | OmniAMCustomOscillatorOptions
488
+ | OmniAMTypeOscillatorOptions
489
+ | OmniAMPartialsOscillatorOptions
490
+ | ToneOscillatorConstructorOptions;
451
491
 
452
492
  type OmitSourceOptions<T extends BaseOscillatorOptions> = Omit<T, "frequency" | "detune" | "context">;
453
493
 
@@ -455,8 +495,17 @@ type OmitSourceOptions<T extends BaseOscillatorOptions> = Omit<T, "frequency" |
455
495
  * The settable options for the omni oscillator inside of the source which excludes certain attributes that are defined by the parent class
456
496
  */
457
497
  export type OmniOscillatorSynthOptions =
458
- OmitSourceOptions<PulseOscillatorOptions> | OmitSourceOptions<PWMOscillatorOptions> |
459
- OmitSourceOptions<OmniFatCustomOscillatorOptions> | OmitSourceOptions<OmniFatTypeOscillatorOptions> | OmitSourceOptions<OmniFatPartialsOscillatorOptions> |
460
- OmitSourceOptions<OmniFMCustomOscillatorOptions> | OmitSourceOptions<OmniFMTypeOscillatorOptions> | OmitSourceOptions<OmniFMPartialsOscillatorOptions> |
461
- OmitSourceOptions<OmniAMCustomOscillatorOptions> | OmitSourceOptions<OmniAMTypeOscillatorOptions> | OmitSourceOptions<OmniAMPartialsOscillatorOptions> |
462
- OmitSourceOptions<ToneCustomOscillatorOptions> | OmitSourceOptions<ToneTypeOscillatorOptions> | OmitSourceOptions<TonePartialOscillatorOptions>
498
+ | OmitSourceOptions<PulseOscillatorOptions>
499
+ | OmitSourceOptions<PWMOscillatorOptions>
500
+ | OmitSourceOptions<OmniFatCustomOscillatorOptions>
501
+ | OmitSourceOptions<OmniFatTypeOscillatorOptions>
502
+ | OmitSourceOptions<OmniFatPartialsOscillatorOptions>
503
+ | OmitSourceOptions<OmniFMCustomOscillatorOptions>
504
+ | OmitSourceOptions<OmniFMTypeOscillatorOptions>
505
+ | OmitSourceOptions<OmniFMPartialsOscillatorOptions>
506
+ | OmitSourceOptions<OmniAMCustomOscillatorOptions>
507
+ | OmitSourceOptions<OmniAMTypeOscillatorOptions>
508
+ | OmitSourceOptions<OmniAMPartialsOscillatorOptions>
509
+ | OmitSourceOptions<ToneCustomOscillatorOptions>
510
+ | OmitSourceOptions<ToneTypeOscillatorOptions>
511
+ | OmitSourceOptions<TonePartialOscillatorOptions>;
package/Tone/version.ts CHANGED
@@ -1 +1 @@
1
- export const version: string = "14.9.10";
1
+ export const version: string = "14.9.11";