tone 14.9.10 → 14.9.12
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/core/context/ToneAudioNode.ts +1 -0
- package/Tone/core/index.ts +1 -0
- package/Tone/core/util/Defaults.ts +2 -0
- package/Tone/source/oscillator/OscillatorInterface.ts +185 -136
- package/Tone/version.ts +1 -1
- package/build/Tone.js +1 -1
- package/build/Tone.js.map +1 -1
- package/build/esm/core/context/ToneAudioNode.d.ts +1 -0
- package/build/esm/core/context/ToneAudioNode.js +1 -0
- package/build/esm/core/context/ToneAudioNode.js.map +1 -1
- package/build/esm/core/index.d.ts +1 -0
- package/build/esm/core/index.js +1 -0
- package/build/esm/core/index.js.map +1 -1
- package/build/esm/core/util/Defaults.d.ts +2 -0
- package/build/esm/core/util/Defaults.js +2 -0
- package/build/esm/core/util/Defaults.js.map +1 -1
- package/build/esm/source/oscillator/OscillatorInterface.d.ts +20 -16
- package/build/esm/source/oscillator/OscillatorInterface.js +1 -1
- package/build/esm/source/oscillator/OscillatorInterface.js.map +1 -1
- package/build/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ export type ToneAudioNodeOptions = ToneWithContextOptions;
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* ToneAudioNode is the base class for classes which process audio.
|
|
23
|
+
* @category Core
|
|
23
24
|
*/
|
|
24
25
|
export abstract class ToneAudioNode<Options extends ToneAudioNodeOptions = ToneAudioNodeOptions>
|
|
25
26
|
extends ToneWithContext<Options> {
|
package/Tone/core/index.ts
CHANGED
|
@@ -52,6 +52,7 @@ export function deepEquals<T>(arrayA: T[], arrayB: T[]): boolean {
|
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Convert an args array into an object.
|
|
55
|
+
* @internal
|
|
55
56
|
*/
|
|
56
57
|
export function optionsFromArguments<T extends object>(
|
|
57
58
|
defaults: T,
|
|
@@ -101,6 +102,7 @@ export function getDefaultsFromInstance<T>(instance: T): BaseToneOptions {
|
|
|
101
102
|
/**
|
|
102
103
|
* Returns the fallback if the given object is undefined.
|
|
103
104
|
* Take an array of arguments and return a formatted options object.
|
|
105
|
+
* @internal
|
|
104
106
|
*/
|
|
105
107
|
export function defaultArg<T>(given: T, fallback: T): T {
|
|
106
108
|
if (isUndef(given)) {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
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(
|
|
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(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
type
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
type
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
type
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
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
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
type
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
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
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
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
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
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
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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.
|
|
1
|
+
export const version: string = "14.9.12";
|