@fluex/fluexgl-dsp 0.1.3 → 0.2.1
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/README.md +86 -86
- package/lib/dist/console-codes.d.ts +13 -13
- package/lib/dist/console-codes.js +16 -16
- package/lib/dist/core/classes/AudioClip.d.ts +67 -62
- package/lib/dist/core/classes/AudioClip.d.ts.map +1 -1
- package/lib/dist/core/classes/AudioClip.js +406 -386
- package/lib/dist/core/classes/AudioDevice.d.ts +12 -12
- package/lib/dist/core/classes/AudioDevice.js +30 -30
- package/lib/dist/core/classes/Channel.d.ts +41 -29
- package/lib/dist/core/classes/Channel.d.ts.map +1 -1
- package/lib/dist/core/classes/Channel.js +210 -144
- package/lib/dist/core/classes/DpsPipeline.d.ts +59 -59
- package/lib/dist/core/classes/DpsPipeline.js +115 -115
- package/lib/dist/core/classes/Effector.d.ts +8 -11
- package/lib/dist/core/classes/Effector.d.ts.map +1 -1
- package/lib/dist/core/classes/Effector.js +8 -20
- package/lib/dist/core/classes/Master.d.ts +11 -11
- package/lib/dist/core/classes/Master.js +35 -35
- package/lib/dist/core/exports.d.ts +6 -6
- package/lib/dist/core/exports.js +6 -6
- package/lib/dist/effects/classes/Chorus.d.ts +20 -2
- package/lib/dist/effects/classes/Chorus.d.ts.map +1 -1
- package/lib/dist/effects/classes/Chorus.js +85 -2
- package/lib/dist/effects/classes/Distortion.d.ts +6 -2
- package/lib/dist/effects/classes/Distortion.d.ts.map +1 -1
- package/lib/dist/effects/classes/Distortion.js +9 -2
- package/lib/dist/effects/classes/Equalizer.d.ts +2 -2
- package/lib/dist/effects/classes/Equalizer.js +2 -2
- package/lib/dist/effects/classes/Filter.d.ts +2 -2
- package/lib/dist/effects/classes/Filter.js +2 -2
- package/lib/dist/effects/classes/Limiter.d.ts +2 -2
- package/lib/dist/effects/classes/Limiter.js +2 -2
- package/lib/dist/effects/classes/Saturation.d.ts +2 -2
- package/lib/dist/effects/classes/Saturation.d.ts.map +1 -1
- package/lib/dist/effects/classes/Saturation.js +2 -2
- package/lib/dist/effects/classes/SoftClip.d.ts +9 -7
- package/lib/dist/effects/classes/SoftClip.d.ts.map +1 -1
- package/lib/dist/effects/classes/SoftClip.js +39 -38
- package/lib/dist/effects/classes/StereoPanner.d.ts +3 -2
- package/lib/dist/effects/classes/StereoPanner.d.ts.map +1 -1
- package/lib/dist/effects/classes/StereoPanner.js +3 -2
- package/lib/dist/effects/classes/compressors/Compressor.d.ts +2 -2
- package/lib/dist/effects/classes/compressors/Compressor.js +2 -2
- package/lib/dist/effects/classes/compressors/MultibandCompressor.d.ts +2 -2
- package/lib/dist/effects/classes/compressors/MultibandCompressor.js +2 -2
- package/lib/dist/effects/classes/delays/AdvancedDelay.d.ts +2 -2
- package/lib/dist/effects/classes/delays/AdvancedDelay.js +2 -2
- package/lib/dist/effects/classes/delays/MonoDelay.d.ts +2 -2
- package/lib/dist/effects/classes/delays/MonoDelay.js +2 -2
- package/lib/dist/effects/classes/delays/PingPongDelay.d.ts +2 -2
- package/lib/dist/effects/classes/delays/PingPongDelay.js +2 -2
- package/lib/dist/effects/classes/delays/StereoDelay.d.ts +2 -2
- package/lib/dist/effects/classes/delays/StereoDelay.js +2 -2
- package/lib/dist/effects/classes/reverbs/ChamberReverb.d.ts +2 -2
- package/lib/dist/effects/classes/reverbs/ChamberReverb.js +2 -2
- package/lib/dist/effects/classes/reverbs/ConvolverReverb.d.ts +2 -2
- package/lib/dist/effects/classes/reverbs/ConvolverReverb.js +2 -2
- package/lib/dist/effects/classes/reverbs/GenericReverb.d.ts +2 -2
- package/lib/dist/effects/classes/reverbs/GenericReverb.js +2 -2
- package/lib/dist/effects/classes/reverbs/HallReverb.d.ts +2 -2
- package/lib/dist/effects/classes/reverbs/HallReverb.js +2 -2
- package/lib/dist/effects/classes/reverbs/RoomReverb.d.ts +2 -2
- package/lib/dist/effects/classes/reverbs/RoomReverb.js +2 -2
- package/lib/dist/effects/exports.d.ts +19 -19
- package/lib/dist/effects/exports.js +19 -19
- package/lib/dist/index.d.ts +12 -12
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +28 -28
- package/lib/dist/typings.d.ts +66 -59
- package/lib/dist/typings.d.ts.map +1 -1
- package/lib/dist/typings.js +1 -1
- package/lib/dist/utilities/constants.d.ts +1 -1
- package/lib/dist/utilities/constants.js +9 -9
- package/lib/dist/utilities/debugger.d.ts +7 -7
- package/lib/dist/utilities/debugger.js +49 -49
- package/lib/dist/utilities/helpers.d.ts +44 -40
- package/lib/dist/utilities/helpers.d.ts.map +1 -1
- package/lib/dist/utilities/helpers.js +160 -143
- package/lib/dist/utilities/web-assembly.d.ts +3 -3
- package/lib/dist/utilities/web-assembly.d.ts.map +1 -1
- package/lib/dist/utilities/web-assembly.js +12 -12
- package/lib/src/console-codes.ts +15 -15
- package/lib/src/core/classes/AudioClip.ts +539 -539
- package/lib/src/core/classes/AudioDevice.ts +38 -38
- package/lib/src/core/classes/Channel.ts +288 -288
- package/lib/src/core/classes/DpsPipeline.ts +152 -152
- package/lib/src/core/classes/Effector.ts +11 -12
- package/lib/src/core/classes/Master.ts +49 -49
- package/lib/src/core/exports.ts +5 -5
- package/lib/src/effects/classes/Chorus.ts +111 -111
- package/lib/src/effects/classes/Distortion.ts +13 -13
- package/lib/src/effects/classes/Saturation.ts +2 -2
- package/lib/src/effects/classes/SoftClip.ts +44 -44
- package/lib/src/effects/classes/StereoPanner.ts +2 -2
- package/lib/src/effects/exports.ts +22 -22
- package/lib/src/index.ts +93 -93
- package/lib/src/typings.ts +78 -78
- package/lib/src/utilities/constants.ts +8 -8
- package/lib/src/utilities/debugger.ts +65 -65
- package/lib/src/utilities/helpers.ts +237 -237
- package/lib/src/utilities/web-assembly.ts +12 -12
- package/package.json +51 -50
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Effector } from "../../core/classes/Effector";
|
|
2
|
-
|
|
3
|
-
export class Distortion extends Effector {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
public async InitializeOnAttachment(parentialContext: AudioContext): Promise<void> {
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
import { Effector } from "../../core/classes/Effector";
|
|
2
|
+
|
|
3
|
+
export class Distortion extends Effector {
|
|
4
|
+
|
|
5
|
+
public name: string = "Distortion";
|
|
6
|
+
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async InitializeOnAttachment(parentialContext: AudioContext): Promise<void> {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
14
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export class Saturation {
|
|
2
|
-
|
|
1
|
+
export class Saturation {
|
|
2
|
+
|
|
3
3
|
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { compiledWebAssemblyModule } from "../../utilities/web-assembly";
|
|
2
|
-
import { Effector } from "../../core/classes/Effector";
|
|
3
|
-
import { Debug } from "../../utilities/debugger";
|
|
4
|
-
|
|
5
|
-
export class SoftClip extends Effector {
|
|
6
|
-
|
|
7
|
-
public label: string | null = "SoftClip";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
constructor(public drive: number = 1) {
|
|
11
|
-
super();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public async InitializeOnAttachment(parentialContext: AudioContext): Promise<void> {
|
|
15
|
-
|
|
16
|
-
if(!compiledWebAssemblyModule) return Debug.Error("Could not initialize effector because the nessecary WASM file has not been specified.", [
|
|
17
|
-
`Effector type: SoftClip`
|
|
18
|
-
]);
|
|
19
|
-
|
|
20
|
-
this.audioWorkletNode = new AudioWorkletNode(parentialContext, "SoftClipProcessor", {
|
|
21
|
-
numberOfInputs: 1,
|
|
22
|
-
numberOfOutputs: 1,
|
|
23
|
-
outputChannelCount: [2],
|
|
24
|
-
parameterData: {
|
|
25
|
-
drive: this.drive
|
|
26
|
-
},
|
|
27
|
-
processorOptions: {
|
|
28
|
-
module: compiledWebAssemblyModule
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
this.parentialContext = parentialContext;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
public SetDrive(drive: number): SoftClip {
|
|
36
|
-
|
|
37
|
-
if(this.audioWorkletNode) this.audioWorkletNode.port.postMessage({
|
|
38
|
-
type: "set-drive",
|
|
39
|
-
value: drive
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
this.drive = drive;
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
1
|
+
import { compiledWebAssemblyModule } from "../../utilities/web-assembly";
|
|
2
|
+
import { Effector } from "../../core/classes/Effector";
|
|
3
|
+
import { Debug } from "../../utilities/debugger";
|
|
4
|
+
|
|
5
|
+
export class SoftClip extends Effector {
|
|
6
|
+
|
|
7
|
+
public label: string | null = "SoftClip";
|
|
8
|
+
public name: string = "SoftClip";
|
|
9
|
+
|
|
10
|
+
constructor(public drive: number = 1) {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async InitializeOnAttachment(parentialContext: AudioContext): Promise<void> {
|
|
15
|
+
|
|
16
|
+
if(!compiledWebAssemblyModule) return Debug.Error("Could not initialize effector because the nessecary WASM file has not been specified.", [
|
|
17
|
+
`Effector type: SoftClip`
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
this.audioWorkletNode = new AudioWorkletNode(parentialContext, "SoftClipProcessor", {
|
|
21
|
+
numberOfInputs: 1,
|
|
22
|
+
numberOfOutputs: 1,
|
|
23
|
+
outputChannelCount: [2],
|
|
24
|
+
parameterData: {
|
|
25
|
+
drive: this.drive
|
|
26
|
+
},
|
|
27
|
+
processorOptions: {
|
|
28
|
+
module: compiledWebAssemblyModule
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
this.parentialContext = parentialContext;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public SetDrive(drive: number): SoftClip {
|
|
36
|
+
|
|
37
|
+
if(this.audioWorkletNode) this.audioWorkletNode.port.postMessage({
|
|
38
|
+
type: "set-drive",
|
|
39
|
+
value: drive
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
this.drive = drive;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
45
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export class StereoPanner {
|
|
2
|
-
|
|
1
|
+
export class StereoPanner {
|
|
2
|
+
public name: string = "StereoPanner";
|
|
3
3
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export { Chorus } from "./classes/Chorus";
|
|
2
|
-
export { Distortion } from "./classes/Distortion";
|
|
3
|
-
export { Equalizer } from "./classes/Equalizer";
|
|
4
|
-
export { Filter } from "./classes/Filter";
|
|
5
|
-
export { Limiter } from "./classes/Limiter";
|
|
6
|
-
export { Saturation } from "./classes/Saturation";
|
|
7
|
-
export { StereoPanner } from "./classes/StereoPanner";
|
|
8
|
-
export { SoftClip } from "./classes/SoftClip";
|
|
9
|
-
|
|
10
|
-
export { Compressor } from "./classes/compressors/Compressor";
|
|
11
|
-
export { MultibandCompressor } from "./classes/compressors/MultibandCompressor";
|
|
12
|
-
|
|
13
|
-
export { AdvancedDelay } from "./classes/delays/AdvancedDelay";
|
|
14
|
-
export { MonoDelay } from "./classes/delays/MonoDelay";
|
|
15
|
-
export { PingPongDelay } from "./classes/delays/PingPongDelay";
|
|
16
|
-
export { StereoDelay } from "./classes/delays/StereoDelay";
|
|
17
|
-
|
|
18
|
-
export { ChamberReverb } from "./classes/reverbs/ChamberReverb";
|
|
19
|
-
export { ConvolverReverb } from "./classes/reverbs/ConvolverReverb";
|
|
20
|
-
export { GenericReverb } from "./classes/reverbs/GenericReverb";
|
|
21
|
-
export { HallReverb } from "./classes/reverbs/HallReverb";
|
|
22
|
-
export { RoomReverb } from "./classes/reverbs/RoomReverb";
|
|
1
|
+
export { Chorus } from "./classes/Chorus";
|
|
2
|
+
export { Distortion } from "./classes/Distortion";
|
|
3
|
+
export { Equalizer } from "./classes/Equalizer";
|
|
4
|
+
export { Filter } from "./classes/Filter";
|
|
5
|
+
export { Limiter } from "./classes/Limiter";
|
|
6
|
+
export { Saturation } from "./classes/Saturation";
|
|
7
|
+
export { StereoPanner } from "./classes/StereoPanner";
|
|
8
|
+
export { SoftClip } from "./classes/SoftClip";
|
|
9
|
+
|
|
10
|
+
export { Compressor } from "./classes/compressors/Compressor";
|
|
11
|
+
export { MultibandCompressor } from "./classes/compressors/MultibandCompressor";
|
|
12
|
+
|
|
13
|
+
export { AdvancedDelay } from "./classes/delays/AdvancedDelay";
|
|
14
|
+
export { MonoDelay } from "./classes/delays/MonoDelay";
|
|
15
|
+
export { PingPongDelay } from "./classes/delays/PingPongDelay";
|
|
16
|
+
export { StereoDelay } from "./classes/delays/StereoDelay";
|
|
17
|
+
|
|
18
|
+
export { ChamberReverb } from "./classes/reverbs/ChamberReverb";
|
|
19
|
+
export { ConvolverReverb } from "./classes/reverbs/ConvolverReverb";
|
|
20
|
+
export { GenericReverb } from "./classes/reverbs/GenericReverb";
|
|
21
|
+
export { HallReverb } from "./classes/reverbs/HallReverb";
|
|
22
|
+
export { RoomReverb } from "./classes/reverbs/RoomReverb";
|
package/lib/src/index.ts
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FluexGL Audio
|
|
3
|
-
* A javascript digital audio processor library.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { FluexGLAudioDescriptor } from "./typings";
|
|
7
|
-
|
|
8
|
-
export const FluexGLAudio: FluexGLAudioDescriptor = {
|
|
9
|
-
name: "FluexGL Audio",
|
|
10
|
-
author: "Rohan Kanhaisingh",
|
|
11
|
-
version: "0.0.2",
|
|
12
|
-
license: "MIT",
|
|
13
|
-
repository: "https://github.com/rohankanhaisingh/FluexGL-Audio",
|
|
14
|
-
options: {
|
|
15
|
-
maxMasterChannels: 8,
|
|
16
|
-
maxTotalChannels: 128,
|
|
17
|
-
sampleRate: 44000,
|
|
18
|
-
spatialization: "stereo",
|
|
19
|
-
debugger: {
|
|
20
|
-
showErrors: true,
|
|
21
|
-
showInfo: true,
|
|
22
|
-
showWarnings: true,
|
|
23
|
-
breakOnError: true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
Chorus,
|
|
30
|
-
Distortion,
|
|
31
|
-
Equalizer,
|
|
32
|
-
Filter,
|
|
33
|
-
Limiter,
|
|
34
|
-
Saturation,
|
|
35
|
-
StereoPanner,
|
|
36
|
-
Compressor,
|
|
37
|
-
MultibandCompressor,
|
|
38
|
-
AdvancedDelay,
|
|
39
|
-
MonoDelay,
|
|
40
|
-
PingPongDelay,
|
|
41
|
-
StereoDelay,
|
|
42
|
-
ChamberReverb,
|
|
43
|
-
ConvolverReverb,
|
|
44
|
-
GenericReverb,
|
|
45
|
-
HallReverb,
|
|
46
|
-
RoomReverb,
|
|
47
|
-
SoftClip
|
|
48
|
-
} from "./effects/exports";
|
|
49
|
-
|
|
50
|
-
export {
|
|
51
|
-
AudioDevice,
|
|
52
|
-
Channel,
|
|
53
|
-
Effector,
|
|
54
|
-
Master,
|
|
55
|
-
AudioClip,
|
|
56
|
-
DspPipeline
|
|
57
|
-
} from "./core/exports";
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
InitializeDspPipeline,
|
|
61
|
-
ResolveAudioOutputDevices,
|
|
62
|
-
ResolveAudioInputDevices,
|
|
63
|
-
ResolveDefaultAudioInputDevice,
|
|
64
|
-
ResolveDefaultAudioOutputDevice,
|
|
65
|
-
LoadAudioSource,
|
|
66
|
-
LoadAudioSourceFromBlob,
|
|
67
|
-
LoadWorkletOnMasterChannel,
|
|
68
|
-
} from "./utilities/helpers";
|
|
69
|
-
|
|
70
|
-
export {
|
|
71
|
-
SUPPORTED_FILE_TYPES
|
|
72
|
-
} from "./utilities/constants";
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
hasInitializedWasm,
|
|
76
|
-
} from "./utilities/web-assembly";
|
|
77
|
-
|
|
78
|
-
export type {
|
|
79
|
-
FluexGLAudioDescriptor,
|
|
80
|
-
FluexGLAudioDebuggerOptions,
|
|
81
|
-
FluexGLAudioOptions,
|
|
82
|
-
LoadAudioSourceOptions,
|
|
83
|
-
AudioSourceData,
|
|
84
|
-
ChannelOptions,
|
|
85
|
-
ChannelSpatialization,
|
|
86
|
-
AudioClipEventMap,
|
|
87
|
-
AudioClipEvents,
|
|
88
|
-
AudioClipOnProgressEvent,
|
|
89
|
-
AudioClipAnalyserProperty,
|
|
90
|
-
AudioClipAnalyserType,
|
|
91
|
-
DspPipelineInitializationOptions,
|
|
92
|
-
DspPipelineInitializationState,
|
|
93
|
-
ChorusEffectOptions
|
|
1
|
+
/**
|
|
2
|
+
* FluexGL Audio
|
|
3
|
+
* A javascript digital audio processor library.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { FluexGLAudioDescriptor } from "./typings";
|
|
7
|
+
|
|
8
|
+
export const FluexGLAudio: FluexGLAudioDescriptor = {
|
|
9
|
+
name: "FluexGL Audio",
|
|
10
|
+
author: "Rohan Kanhaisingh",
|
|
11
|
+
version: "0.0.2",
|
|
12
|
+
license: "MIT",
|
|
13
|
+
repository: "https://github.com/rohankanhaisingh/FluexGL-Audio",
|
|
14
|
+
options: {
|
|
15
|
+
maxMasterChannels: 8,
|
|
16
|
+
maxTotalChannels: 128,
|
|
17
|
+
sampleRate: 44000,
|
|
18
|
+
spatialization: "stereo",
|
|
19
|
+
debugger: {
|
|
20
|
+
showErrors: true,
|
|
21
|
+
showInfo: true,
|
|
22
|
+
showWarnings: true,
|
|
23
|
+
breakOnError: true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
Chorus,
|
|
30
|
+
Distortion,
|
|
31
|
+
Equalizer,
|
|
32
|
+
Filter,
|
|
33
|
+
Limiter,
|
|
34
|
+
Saturation,
|
|
35
|
+
StereoPanner,
|
|
36
|
+
Compressor,
|
|
37
|
+
MultibandCompressor,
|
|
38
|
+
AdvancedDelay,
|
|
39
|
+
MonoDelay,
|
|
40
|
+
PingPongDelay,
|
|
41
|
+
StereoDelay,
|
|
42
|
+
ChamberReverb,
|
|
43
|
+
ConvolverReverb,
|
|
44
|
+
GenericReverb,
|
|
45
|
+
HallReverb,
|
|
46
|
+
RoomReverb,
|
|
47
|
+
SoftClip
|
|
48
|
+
} from "./effects/exports";
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
AudioDevice,
|
|
52
|
+
Channel,
|
|
53
|
+
Effector,
|
|
54
|
+
Master,
|
|
55
|
+
AudioClip,
|
|
56
|
+
DspPipeline
|
|
57
|
+
} from "./core/exports";
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
InitializeDspPipeline,
|
|
61
|
+
ResolveAudioOutputDevices,
|
|
62
|
+
ResolveAudioInputDevices,
|
|
63
|
+
ResolveDefaultAudioInputDevice,
|
|
64
|
+
ResolveDefaultAudioOutputDevice,
|
|
65
|
+
LoadAudioSource,
|
|
66
|
+
LoadAudioSourceFromBlob,
|
|
67
|
+
LoadWorkletOnMasterChannel,
|
|
68
|
+
} from "./utilities/helpers";
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
SUPPORTED_FILE_TYPES
|
|
72
|
+
} from "./utilities/constants";
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
hasInitializedWasm,
|
|
76
|
+
} from "./utilities/web-assembly";
|
|
77
|
+
|
|
78
|
+
export type {
|
|
79
|
+
FluexGLAudioDescriptor,
|
|
80
|
+
FluexGLAudioDebuggerOptions,
|
|
81
|
+
FluexGLAudioOptions,
|
|
82
|
+
LoadAudioSourceOptions,
|
|
83
|
+
AudioSourceData,
|
|
84
|
+
ChannelOptions,
|
|
85
|
+
ChannelSpatialization,
|
|
86
|
+
AudioClipEventMap,
|
|
87
|
+
AudioClipEvents,
|
|
88
|
+
AudioClipOnProgressEvent,
|
|
89
|
+
AudioClipAnalyserProperty,
|
|
90
|
+
AudioClipAnalyserType,
|
|
91
|
+
DspPipelineInitializationOptions,
|
|
92
|
+
DspPipelineInitializationState,
|
|
93
|
+
ChorusEffectOptions
|
|
94
94
|
} from "./typings";
|
package/lib/src/typings.ts
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
export type ChannelSpatialization = "mono" | "stereo" | "surround";
|
|
2
|
-
|
|
3
|
-
export type AudioClipAnalyserType = "pre" | "post";
|
|
4
|
-
export type AudioClipAnalyserProperty = "fftSize" | "minDecibels" | "maxDecibels" | "smoothingTimeConstant";
|
|
5
|
-
|
|
6
|
-
export type AudioClipEvents = {
|
|
7
|
-
[K in keyof AudioClipEventMap]: AudioClipEventMap[K][];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface FluexGLAudioDebuggerOptions {
|
|
11
|
-
breakOnError: boolean;
|
|
12
|
-
showInfo: boolean;
|
|
13
|
-
showErrors: boolean;
|
|
14
|
-
showWarnings: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface FluexGLAudioOptions {
|
|
18
|
-
maxMasterChannels: number;
|
|
19
|
-
maxTotalChannels: number;
|
|
20
|
-
sampleRate: number;
|
|
21
|
-
spatialization: ChannelSpatialization;
|
|
22
|
-
debugger: FluexGLAudioDebuggerOptions;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface FluexGLAudioDescriptor {
|
|
26
|
-
name: string;
|
|
27
|
-
author: string;
|
|
28
|
-
version: string;
|
|
29
|
-
license: string;
|
|
30
|
-
repository: string;
|
|
31
|
-
options: FluexGLAudioOptions;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface LoadAudioSourceOptions {
|
|
35
|
-
allowForeignFileTypes: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface AudioSourceData {
|
|
39
|
-
arrayBuffer: ArrayBuffer;
|
|
40
|
-
audioBuffer: AudioBuffer;
|
|
41
|
-
id: string;
|
|
42
|
-
timestamp: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface ChannelOptions {
|
|
46
|
-
label: string | null;
|
|
47
|
-
maxAudioNodes: number;
|
|
48
|
-
maxEffects: number;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface AudioClipOnProgressEvent {
|
|
52
|
-
startTime: number;
|
|
53
|
-
offset: number;
|
|
54
|
-
current: number;
|
|
55
|
-
contextTimestamp: number;
|
|
56
|
-
formatted: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface AudioClipEventMap {
|
|
60
|
-
"progress": (event: AudioClipOnProgressEvent) => void;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface DspPipelineInitializationOptions {
|
|
64
|
-
pathToWasm: string;
|
|
65
|
-
pathToWorklet: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface DspPipelineInitializationState {
|
|
69
|
-
success: boolean;
|
|
70
|
-
workletBlobUrl: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface ChorusEffectOptions {
|
|
74
|
-
baseDelayMs?: number;
|
|
75
|
-
depthMs?: number;
|
|
76
|
-
rateHz?: number;
|
|
77
|
-
mix?: number;
|
|
78
|
-
feedback?: number;
|
|
1
|
+
export type ChannelSpatialization = "mono" | "stereo" | "surround";
|
|
2
|
+
|
|
3
|
+
export type AudioClipAnalyserType = "pre" | "post";
|
|
4
|
+
export type AudioClipAnalyserProperty = "fftSize" | "minDecibels" | "maxDecibels" | "smoothingTimeConstant";
|
|
5
|
+
|
|
6
|
+
export type AudioClipEvents = {
|
|
7
|
+
[K in keyof AudioClipEventMap]: AudioClipEventMap[K][];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface FluexGLAudioDebuggerOptions {
|
|
11
|
+
breakOnError: boolean;
|
|
12
|
+
showInfo: boolean;
|
|
13
|
+
showErrors: boolean;
|
|
14
|
+
showWarnings: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface FluexGLAudioOptions {
|
|
18
|
+
maxMasterChannels: number;
|
|
19
|
+
maxTotalChannels: number;
|
|
20
|
+
sampleRate: number;
|
|
21
|
+
spatialization: ChannelSpatialization;
|
|
22
|
+
debugger: FluexGLAudioDebuggerOptions;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface FluexGLAudioDescriptor {
|
|
26
|
+
name: string;
|
|
27
|
+
author: string;
|
|
28
|
+
version: string;
|
|
29
|
+
license: string;
|
|
30
|
+
repository: string;
|
|
31
|
+
options: FluexGLAudioOptions;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface LoadAudioSourceOptions {
|
|
35
|
+
allowForeignFileTypes: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface AudioSourceData {
|
|
39
|
+
arrayBuffer: ArrayBuffer;
|
|
40
|
+
audioBuffer: AudioBuffer;
|
|
41
|
+
id: string;
|
|
42
|
+
timestamp: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ChannelOptions {
|
|
46
|
+
label: string | null;
|
|
47
|
+
maxAudioNodes: number;
|
|
48
|
+
maxEffects: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface AudioClipOnProgressEvent {
|
|
52
|
+
startTime: number;
|
|
53
|
+
offset: number;
|
|
54
|
+
current: number;
|
|
55
|
+
contextTimestamp: number;
|
|
56
|
+
formatted: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface AudioClipEventMap {
|
|
60
|
+
"progress": (event: AudioClipOnProgressEvent) => void;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface DspPipelineInitializationOptions {
|
|
64
|
+
pathToWasm: string;
|
|
65
|
+
pathToWorklet: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface DspPipelineInitializationState {
|
|
69
|
+
success: boolean;
|
|
70
|
+
workletBlobUrl: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ChorusEffectOptions {
|
|
74
|
+
baseDelayMs?: number;
|
|
75
|
+
depthMs?: number;
|
|
76
|
+
rateHz?: number;
|
|
77
|
+
mix?: number;
|
|
78
|
+
feedback?: number;
|
|
79
79
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const SUPPORTED_FILE_TYPES: string[] = [
|
|
2
|
-
"audio/aac",
|
|
3
|
-
"audio/mp3",
|
|
4
|
-
"audio/mpeg",
|
|
5
|
-
"audio/ogg",
|
|
6
|
-
"audio/wav",
|
|
7
|
-
"audio/wave",
|
|
8
|
-
"audio/webm"
|
|
1
|
+
export const SUPPORTED_FILE_TYPES: string[] = [
|
|
2
|
+
"audio/aac",
|
|
3
|
+
"audio/mp3",
|
|
4
|
+
"audio/mpeg",
|
|
5
|
+
"audio/ogg",
|
|
6
|
+
"audio/wav",
|
|
7
|
+
"audio/wave",
|
|
8
|
+
"audio/webm"
|
|
9
9
|
];
|