xsound 2.27.0 → 3.0.0-alpha
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 +57 -29
- package/build/types/AudioModule/index.d.ts +198 -0
- package/build/types/AudioModule/index.d.ts.map +1 -0
- package/build/types/MIDI/index.d.ts +48 -0
- package/build/types/MIDI/index.d.ts.map +1 -0
- package/build/types/MML/Part.d.ts +78 -0
- package/build/types/MML/Part.d.ts.map +1 -0
- package/build/types/MML/Sequence.d.ts +66 -0
- package/build/types/MML/Sequence.d.ts.map +1 -0
- package/build/types/MML/Sequencer.d.ts +34 -0
- package/build/types/MML/Sequencer.d.ts.map +1 -0
- package/build/types/MML/Token.d.ts +40 -0
- package/build/types/MML/Token.d.ts.map +1 -0
- package/build/types/MML/Tokenizer.d.ts +21 -0
- package/build/types/MML/Tokenizer.d.ts.map +1 -0
- package/build/types/MML/Tree.d.ts +60 -0
- package/build/types/MML/Tree.d.ts.map +1 -0
- package/build/types/MML/TreeConstructor.d.ts +25 -0
- package/build/types/MML/TreeConstructor.d.ts.map +1 -0
- package/build/types/MML/index.d.ts +115 -0
- package/build/types/MML/index.d.ts.map +1 -0
- package/build/types/MediaModule/index.d.ts +223 -0
- package/build/types/MediaModule/index.d.ts.map +1 -0
- package/build/types/MixerModule/index.d.ts +99 -0
- package/build/types/MixerModule/index.d.ts.map +1 -0
- package/build/types/NoiseModule/index.d.ts +106 -0
- package/build/types/NoiseModule/index.d.ts.map +1 -0
- package/build/types/OneshotModule/index.d.ts +176 -0
- package/build/types/OneshotModule/index.d.ts.map +1 -0
- package/build/types/OscillatorModule/Glide.d.ts +47 -0
- package/build/types/OscillatorModule/Glide.d.ts.map +1 -0
- package/build/types/OscillatorModule/Oscillator.d.ts +77 -0
- package/build/types/OscillatorModule/Oscillator.d.ts.map +1 -0
- package/build/types/OscillatorModule/index.d.ts +138 -0
- package/build/types/OscillatorModule/index.d.ts.map +1 -0
- package/build/types/ProcessorModule/index.d.ts +124 -0
- package/build/types/ProcessorModule/index.d.ts.map +1 -0
- package/build/types/SoundModule/Analyser/FFT.d.ts +61 -0
- package/build/types/SoundModule/Analyser/FFT.d.ts.map +1 -0
- package/build/types/SoundModule/Analyser/Time.d.ts +54 -0
- package/build/types/SoundModule/Analyser/Time.d.ts.map +1 -0
- package/build/types/SoundModule/Analyser/TimeOverview.d.ts +132 -0
- package/build/types/SoundModule/Analyser/TimeOverview.d.ts.map +1 -0
- package/build/types/SoundModule/Analyser/Visualizer.d.ts +150 -0
- package/build/types/SoundModule/Analyser/Visualizer.d.ts.map +1 -0
- package/build/types/SoundModule/Analyser/index.d.ts +85 -0
- package/build/types/SoundModule/Analyser/index.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Autopanner.d.ts +39 -0
- package/build/types/SoundModule/Effectors/Autopanner.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Chorus.d.ts +51 -0
- package/build/types/SoundModule/Effectors/Chorus.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Compressor.d.ts +43 -0
- package/build/types/SoundModule/Effectors/Compressor.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Delay.d.ts +48 -0
- package/build/types/SoundModule/Effectors/Delay.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Distortion.d.ts +90 -0
- package/build/types/SoundModule/Effectors/Distortion.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Effector.d.ts +79 -0
- package/build/types/SoundModule/Effectors/Effector.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/EnvelopeGenerator.d.ts +90 -0
- package/build/types/SoundModule/Effectors/EnvelopeGenerator.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Equalizer.d.ts +44 -0
- package/build/types/SoundModule/Effectors/Equalizer.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Filter.d.ts +61 -0
- package/build/types/SoundModule/Effectors/Filter.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Flanger.d.ts +51 -0
- package/build/types/SoundModule/Effectors/Flanger.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Listener.d.ts +47 -0
- package/build/types/SoundModule/Effectors/Listener.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Panner.d.ts +68 -0
- package/build/types/SoundModule/Effectors/Panner.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Phaser.d.ts +55 -0
- package/build/types/SoundModule/Effectors/Phaser.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/PitchShifter.d.ts +42 -0
- package/build/types/SoundModule/Effectors/PitchShifter.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Reverb.d.ts +81 -0
- package/build/types/SoundModule/Effectors/Reverb.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Ringmodulator.d.ts +39 -0
- package/build/types/SoundModule/Effectors/Ringmodulator.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Stereo.d.ts +45 -0
- package/build/types/SoundModule/Effectors/Stereo.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Tremolo.d.ts +41 -0
- package/build/types/SoundModule/Effectors/Tremolo.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/VocalCanceler.d.ts +31 -0
- package/build/types/SoundModule/Effectors/VocalCanceler.d.ts.map +1 -0
- package/build/types/SoundModule/Effectors/Wah.d.ts +49 -0
- package/build/types/SoundModule/Effectors/Wah.d.ts.map +1 -0
- package/build/types/SoundModule/Recorder/Channel.d.ts +44 -0
- package/build/types/SoundModule/Recorder/Channel.d.ts.map +1 -0
- package/build/types/SoundModule/Recorder/Track.d.ts +36 -0
- package/build/types/SoundModule/Recorder/Track.d.ts.map +1 -0
- package/build/types/SoundModule/Recorder/index.d.ts +118 -0
- package/build/types/SoundModule/Recorder/index.d.ts.map +1 -0
- package/build/types/SoundModule/Session/Room.d.ts +69 -0
- package/build/types/SoundModule/Session/Room.d.ts.map +1 -0
- package/build/types/SoundModule/Session/index.d.ts +94 -0
- package/build/types/SoundModule/Session/index.d.ts.map +1 -0
- package/build/types/SoundModule/index.d.ts +147 -0
- package/build/types/SoundModule/index.d.ts.map +1 -0
- package/build/types/StreamModule/NoiseGate.d.ts +29 -0
- package/build/types/StreamModule/NoiseGate.d.ts.map +1 -0
- package/build/types/StreamModule/NoiseSuppressor.d.ts +30 -0
- package/build/types/StreamModule/NoiseSuppressor.d.ts.map +1 -0
- package/build/types/StreamModule/index.d.ts +175 -0
- package/build/types/StreamModule/index.d.ts.map +1 -0
- package/build/types/XSound/index.d.ts +155 -0
- package/build/types/XSound/index.d.ts.map +1 -0
- package/build/types/interfaces.d.ts +23 -0
- package/build/types/interfaces.d.ts.map +1 -0
- package/build/types/main.d.ts +117 -0
- package/build/types/main.d.ts.map +1 -0
- package/build/types/types.d.ts +10 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/xsound.js +1 -1
- package/build/xsound.js.LICENSE.txt +1 -1
- package/build/xsound.js.map +1 -1
- package/build/xsound.min.js +3 -0
- package/build/xsound.min.js.LICENSE.txt +1 -0
- package/build/xsound.min.js.map +1 -0
- package/package.json +38 -33
- package/build/xsound.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Compressor.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Compressor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,QAAQ;IACtC,OAAO,CAAC,UAAU,CAAyB;IAE3C;;OAEG;gBACS,OAAO,EAAE,YAAY;IAgBjC,gBAAgB;IACA,OAAO,IAAI,QAAQ;IAmBnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAClC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM;IAC/B,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAChC,KAAK,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU;IA2DlD,gBAAgB;IACA,MAAM,IAAI,gBAAgB;IAW1C,gBAAgB;IACA,QAAQ,IAAI,UAAU;IAKtC,gBAAgB;IACA,UAAU,IAAI,UAAU;CAIzC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type DelayParams = {
|
|
3
|
+
state?: boolean;
|
|
4
|
+
time?: number;
|
|
5
|
+
dry?: number;
|
|
6
|
+
wet?: number;
|
|
7
|
+
tone?: number;
|
|
8
|
+
feedback?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Effector's subclass for Delay.
|
|
12
|
+
* @constructor
|
|
13
|
+
* @extends {Effector}
|
|
14
|
+
*/
|
|
15
|
+
export declare class Delay extends Effector {
|
|
16
|
+
static MAX_DELAY_TIME: number;
|
|
17
|
+
private delay;
|
|
18
|
+
private dry;
|
|
19
|
+
private wet;
|
|
20
|
+
private tone;
|
|
21
|
+
private feedback;
|
|
22
|
+
/**
|
|
23
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
24
|
+
*/
|
|
25
|
+
constructor(context: AudioContext);
|
|
26
|
+
/** @override */
|
|
27
|
+
connect(): GainNode;
|
|
28
|
+
/**
|
|
29
|
+
* This method gets or sets parameters for delay effector.
|
|
30
|
+
* This method is overloaded for type interface and type check.
|
|
31
|
+
* @param {keyof DelayParams|DelayParams} params This argument is string if getter. Otherwise, setter.
|
|
32
|
+
* @return {DelayParams[keyof DelayParams]|Delay} Return value is parameter for delay effector if getter.
|
|
33
|
+
* Otherwise, return value is for method chain.
|
|
34
|
+
*/
|
|
35
|
+
param(params: 'time'): number;
|
|
36
|
+
param(params: 'dry'): number;
|
|
37
|
+
param(params: 'wet'): number;
|
|
38
|
+
param(params: 'tone'): number;
|
|
39
|
+
param(params: 'feedback'): number;
|
|
40
|
+
param(params: DelayParams): Delay;
|
|
41
|
+
/** @override */
|
|
42
|
+
params(): DelayParams;
|
|
43
|
+
/** @override */
|
|
44
|
+
activate(): Delay;
|
|
45
|
+
/** @override */
|
|
46
|
+
deactivate(): Delay;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=Delay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Delay.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,KAAM,SAAQ,QAAQ;IACjC,OAAc,cAAc,SAAK;IAEjC,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,QAAQ,CAAW;IAE3B;;OAEG;gBACS,OAAO,EAAE,YAAY;IAuBjC,gBAAgB;IACA,OAAO,IAAI,QAAQ;IAoCnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM;IAC5B,KAAK,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM;IAC5B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM;IACjC,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK;IA2DxC,gBAAgB;IACA,MAAM,IAAI,WAAW;IAWrC,gBAAgB;IACA,QAAQ,IAAI,KAAK;IAKjC,gBAAgB;IACA,UAAU,IAAI,KAAK;CAIpC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type DistortionCurve = Float32Array | null;
|
|
3
|
+
export declare type DistortionType = 'clean' | 'crunch' | 'overdrive' | 'distortion' | 'fuzz';
|
|
4
|
+
export declare type PreEqualizerParams = {
|
|
5
|
+
state?: boolean;
|
|
6
|
+
curve?: DistortionCurve;
|
|
7
|
+
gain?: number;
|
|
8
|
+
lead?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare type PostEqualizerParams = {
|
|
11
|
+
state?: boolean;
|
|
12
|
+
curve?: DistortionCurve;
|
|
13
|
+
bass?: number;
|
|
14
|
+
middle?: number;
|
|
15
|
+
treble?: number;
|
|
16
|
+
frequency?: number;
|
|
17
|
+
};
|
|
18
|
+
export declare type CabinetParams = {
|
|
19
|
+
state?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare type DistortionParams = {
|
|
22
|
+
state?: boolean;
|
|
23
|
+
curve?: DistortionType;
|
|
24
|
+
samples?: number;
|
|
25
|
+
pre?: PreEqualizerParams;
|
|
26
|
+
post?: PostEqualizerParams;
|
|
27
|
+
cabinet?: CabinetParams;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Effector's subclass for Cabinet.
|
|
31
|
+
* @constructor
|
|
32
|
+
* @extends {Effector}
|
|
33
|
+
*/
|
|
34
|
+
export declare class Cabinet extends Effector {
|
|
35
|
+
private lowpass;
|
|
36
|
+
private notch;
|
|
37
|
+
/**
|
|
38
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
39
|
+
*/
|
|
40
|
+
constructor(context: AudioContext);
|
|
41
|
+
/** @override */
|
|
42
|
+
connect(): GainNode;
|
|
43
|
+
/** @override */
|
|
44
|
+
params(): CabinetParams;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Effector's subclass for Distortion.
|
|
48
|
+
* @constructor
|
|
49
|
+
* @extends {Effector}
|
|
50
|
+
*/
|
|
51
|
+
export declare class Distortion extends Effector {
|
|
52
|
+
/**
|
|
53
|
+
* This class (static) method creates instance of `Float32Array` for distortion.
|
|
54
|
+
* @param {number} drive This argument is distortion amount.
|
|
55
|
+
* @param {number} numberOfSamples This argument is distortion curve size.
|
|
56
|
+
* @return {Float32Array|null} Return value is `WaveShaperNode`'s 'curve'.
|
|
57
|
+
*/
|
|
58
|
+
static createCurve(drive: number, numberOfSamples: number): Float32Array | null;
|
|
59
|
+
private preEQ;
|
|
60
|
+
private postEQ;
|
|
61
|
+
private cabinet;
|
|
62
|
+
private type;
|
|
63
|
+
private numberOfSamples;
|
|
64
|
+
/**
|
|
65
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
66
|
+
*/
|
|
67
|
+
constructor(context: AudioContext);
|
|
68
|
+
/** @override */
|
|
69
|
+
connect(): GainNode;
|
|
70
|
+
/**
|
|
71
|
+
* This method gets or sets parameters for distortion effector.
|
|
72
|
+
* This method is overloaded for type interface and type check.
|
|
73
|
+
* @param {keyof DistortionParams|DistortionParams} params This argument is string if getter. Otherwise, setter.
|
|
74
|
+
* @return {DistortionParams[keyof DistortionParams]|Distortion} Return value is parameter for distortion effector if getter.
|
|
75
|
+
* Otherwise, return value is for method chain.
|
|
76
|
+
*/
|
|
77
|
+
param(params: 'curve'): DistortionType;
|
|
78
|
+
param(params: 'samples'): number;
|
|
79
|
+
param(params: 'pre'): PreEqualizerParams;
|
|
80
|
+
param(params: 'post'): PostEqualizerParams;
|
|
81
|
+
param(params: 'cabinet'): CabinetParams;
|
|
82
|
+
param(params: DistortionParams): Distortion;
|
|
83
|
+
/** @override */
|
|
84
|
+
params(): DistortionParams;
|
|
85
|
+
/** @override */
|
|
86
|
+
activate(): Distortion;
|
|
87
|
+
/** @override */
|
|
88
|
+
deactivate(): Distortion;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=Distortion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Distortion.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Distortion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,eAAe,GAAG,YAAY,GAAG,IAAI,CAAC;AAClD,oBAAY,cAAc,GAAI,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,MAAM,CAAC;AAEvF,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,OAA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tC,gBAAgB;IACA,UAAU,IAAI,UAAU;CAIzC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Connectable, Statable } from '../../interfaces';
|
|
2
|
+
import { BufferSize } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* This class is superclass for effector classes.
|
|
5
|
+
* Also, this class is used for implementing custom effector.
|
|
6
|
+
* @constructor
|
|
7
|
+
* @implements {Connectable}
|
|
8
|
+
* @implements {Statable}
|
|
9
|
+
*/
|
|
10
|
+
export declare class Effector implements Connectable, Statable {
|
|
11
|
+
protected context: AudioContext;
|
|
12
|
+
protected input: GainNode;
|
|
13
|
+
protected output: GainNode;
|
|
14
|
+
protected lfo: OscillatorNode;
|
|
15
|
+
protected depth: GainNode;
|
|
16
|
+
protected rate: AudioParam;
|
|
17
|
+
protected processor: ScriptProcessorNode;
|
|
18
|
+
protected isActive: boolean;
|
|
19
|
+
protected paused: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
22
|
+
* @param {BufferSize} bufferSize This argument is buffer size for `ScriptProcessorNode`.
|
|
23
|
+
*/
|
|
24
|
+
constructor(context: AudioContext, bufferSize: BufferSize);
|
|
25
|
+
/**
|
|
26
|
+
* This method starts LFO. Namely, this method starts effector.
|
|
27
|
+
* @param {number} startTime This argument is in order to schedule parameter.
|
|
28
|
+
*/
|
|
29
|
+
start(startTime?: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* This method stops LFO, then creates instance of `OscillatorNode` again.
|
|
32
|
+
* @param {number} stopTime This argument is in order to schedule parameter.
|
|
33
|
+
* @param {number} releaseTime This argument is in order to schedule parameter when it is necessary to consider release time.
|
|
34
|
+
*/
|
|
35
|
+
stop(stopTime?: number, releaseTime?: number): void;
|
|
36
|
+
/**
|
|
37
|
+
* This method connects `AudioNode`s for effector.
|
|
38
|
+
* @return {GainNode} Return value is for `connect` method chain.
|
|
39
|
+
* @abstract
|
|
40
|
+
*/
|
|
41
|
+
connect(): GainNode;
|
|
42
|
+
/**
|
|
43
|
+
* This method gets effector's parameters as associative array.
|
|
44
|
+
* @return {object}
|
|
45
|
+
* @abstract
|
|
46
|
+
*/
|
|
47
|
+
params(): {
|
|
48
|
+
[paramName: string]: unknown;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* This method gets effector's parameters as JSON.
|
|
52
|
+
* @return {string}
|
|
53
|
+
*/
|
|
54
|
+
toJSON(): string;
|
|
55
|
+
/**
|
|
56
|
+
* This method gets effector state. If returns `true`, effector is active.
|
|
57
|
+
* @return {boolean}
|
|
58
|
+
*/
|
|
59
|
+
state(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* This method activates effector.
|
|
62
|
+
* @return {Effector} Return value is for method chain.
|
|
63
|
+
*/
|
|
64
|
+
activate(): Effector;
|
|
65
|
+
/**
|
|
66
|
+
* This method deactivates effector.
|
|
67
|
+
* @return {Effector} Return value is for method chain.
|
|
68
|
+
*/
|
|
69
|
+
deactivate(): Effector;
|
|
70
|
+
/**
|
|
71
|
+
* Connector for input.
|
|
72
|
+
*/
|
|
73
|
+
get INPUT(): GainNode;
|
|
74
|
+
/**
|
|
75
|
+
* Connector for output.
|
|
76
|
+
*/
|
|
77
|
+
get OUTPUT(): GainNode;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=Effector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Effector.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Effector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;GAMG;AACH,qBAAa,QAAS,YAAW,WAAW,EAAE,QAAQ;IACpD,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC;IAChC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC1B,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC;IAE3B,SAAS,CAAC,GAAG,EAAE,cAAc,CAAC;IAC9B,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC;IAC1B,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;IAC3B,SAAS,CAAC,SAAS,EAAE,mBAAmB,CAAC;IAEzC,SAAS,CAAC,QAAQ,UAAQ;IAC1B,SAAS,CAAC,MAAM,UAAQ;IAExB;;;OAGG;gBACS,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU;IAezD;;;OAGG;IACI,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAStC;;;;OAIG;IACI,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAwB1D;;;;OAIG;IACI,OAAO,IAAI,QAAQ;IAI1B;;;;OAIG;IACI,MAAM,IAAI;QAAE,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;IAIjD;;;OAGG;IACI,MAAM,IAAI,MAAM;IAIvB;;;OAGG;IACI,KAAK,IAAI,OAAO;IAIvB;;;OAGG;IACI,QAAQ,IAAI,QAAQ;IAY3B;;;OAGG;IACI,UAAU,IAAI,QAAQ;IAY7B;;OAEG;IACH,IAAW,KAAK,IAAI,QAAQ,CAE3B;IAED;;OAEG;IACH,IAAW,MAAM,IAAI,QAAQ,CAE5B;CACF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare type EnvelopeGeneratorParams = {
|
|
2
|
+
attack?: number;
|
|
3
|
+
decay?: number;
|
|
4
|
+
sustain?: number;
|
|
5
|
+
release?: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* This private class is for Envelope Generator.
|
|
9
|
+
* @constructor
|
|
10
|
+
* @extends {Effector}
|
|
11
|
+
*/
|
|
12
|
+
export declare class EnvelopeGenerator {
|
|
13
|
+
static MIN_GAIN: number;
|
|
14
|
+
private context;
|
|
15
|
+
private generators;
|
|
16
|
+
private activeIndexes;
|
|
17
|
+
private activeCounter;
|
|
18
|
+
private attack;
|
|
19
|
+
private decay;
|
|
20
|
+
private sustain;
|
|
21
|
+
private release;
|
|
22
|
+
/**
|
|
23
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
24
|
+
*/
|
|
25
|
+
constructor(context: AudioContext);
|
|
26
|
+
/**
|
|
27
|
+
* This method connects instance of `AudioNode`.
|
|
28
|
+
* @param {number} index This argument is in order to select instance of `GainNode` that is Envelope Generator.
|
|
29
|
+
* @param {AudioNode} input This argument is instance of `AudioNode` as input.
|
|
30
|
+
* @param {AudioNode} output This argument is instance of `AudioNode` as output.
|
|
31
|
+
*/
|
|
32
|
+
ready(index: number, input: AudioNode | null, output: AudioNode | null): void;
|
|
33
|
+
/**
|
|
34
|
+
* This method changes gain (Attack -> Decay -> Sustain).
|
|
35
|
+
* @param {number} startTime This argument is start time of Attack.
|
|
36
|
+
*/
|
|
37
|
+
start(startTime: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* This method changes gain (Attack or Decay or Sustain -> Release).
|
|
40
|
+
* @param {number} stopTime This argument is start time of Release.
|
|
41
|
+
* @param {boolean} useCurve This argument is to use different methods. The default value is `false`.
|
|
42
|
+
*/
|
|
43
|
+
stop(stopTime: number, useCurve?: boolean): void;
|
|
44
|
+
/**
|
|
45
|
+
* This method gets or sets parameters for envelope generator.
|
|
46
|
+
* This method is overloaded for type interface and type check.
|
|
47
|
+
* @param {keyof EnvelopeGeneratorParams|EnvelopeGeneratorParams} params This argument is string if getter. Otherwise, setter.
|
|
48
|
+
* @return {EnvelopeGeneratorParams[keyof EnvelopeGeneratorParams]|EnvelopeGenerator} Return value is parameter for envelope generator if getter.
|
|
49
|
+
* Otherwise, return value is for method chain.
|
|
50
|
+
*/
|
|
51
|
+
param(params: 'attack'): number;
|
|
52
|
+
param(params: 'decay'): number;
|
|
53
|
+
param(params: 'sustain'): number;
|
|
54
|
+
param(params: 'release'): number;
|
|
55
|
+
param(params: EnvelopeGeneratorParams): EnvelopeGenerator;
|
|
56
|
+
/**
|
|
57
|
+
* This method gets instance of `GainNode` for Envelope Generator.
|
|
58
|
+
* @param {number} index This argument is index of array that contains instance of `GainNode` for Envelope Generator.
|
|
59
|
+
* @return {GainNode} This is returned as instance of `GainNode` for Envelope Generator.
|
|
60
|
+
*/
|
|
61
|
+
getGenerator(index: number): GainNode | null;
|
|
62
|
+
/**
|
|
63
|
+
* This method sets instance of `GainNode` for Envelope Generator.
|
|
64
|
+
* @param {number} index This argument is index of array that contains instance of `GainNode` for Envelope Generator.
|
|
65
|
+
* @return {EnvelopeGenerator} This is returned for method chain.
|
|
66
|
+
*/
|
|
67
|
+
setGenerator(index: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* This method determines whether the all of gain schedulings have ended.
|
|
70
|
+
* @return {boolean} If the all of gain schedulings have ended, this value is `true`. Otherwise, this value is `false`.
|
|
71
|
+
*/
|
|
72
|
+
paused(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* This method clears variables for managing instance of `GainNode`.
|
|
75
|
+
* @param {boolean} isDisconnect This argument is in order to determine whether disconnect `AudioNode`.
|
|
76
|
+
* @return {EnvelopeGenerator} This is returned for method chain.
|
|
77
|
+
*/
|
|
78
|
+
clear(disconnected: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* This method gets effecter's parameters as associative array.
|
|
81
|
+
* @return {EnvelopeGeneratorParams}
|
|
82
|
+
*/
|
|
83
|
+
params(): EnvelopeGeneratorParams;
|
|
84
|
+
/**
|
|
85
|
+
* This method gets effecter's parameters as JSON.
|
|
86
|
+
* @return {string}
|
|
87
|
+
*/
|
|
88
|
+
toJSON(): string;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=EnvelopeGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvelopeGenerator.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/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I,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxC;;;OAGG;IACI,MAAM,IAAI,OAAO;IAuBxB;;;;OAIG;IACI,KAAK,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI;IAczC;;;OAGG;IACI,MAAM,IAAI,uBAAuB;IASxC;;;OAGG;IACI,MAAM,IAAI,MAAM;CAGxB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type EqualizerParams = {
|
|
3
|
+
state?: boolean;
|
|
4
|
+
bass?: number;
|
|
5
|
+
middle?: number;
|
|
6
|
+
treble?: number;
|
|
7
|
+
presence?: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Effector's subclass for Equalizer.
|
|
11
|
+
* @constructor
|
|
12
|
+
* @extends {Effector}
|
|
13
|
+
*/
|
|
14
|
+
export declare class Equalizer extends Effector {
|
|
15
|
+
private bass;
|
|
16
|
+
private middle;
|
|
17
|
+
private treble;
|
|
18
|
+
private presence;
|
|
19
|
+
/**
|
|
20
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
21
|
+
**/
|
|
22
|
+
constructor(context: AudioContext);
|
|
23
|
+
/** @override */
|
|
24
|
+
connect(): GainNode;
|
|
25
|
+
/**
|
|
26
|
+
* This method gets or sets parameters for equalizer.
|
|
27
|
+
* This method is overloaded for type interface and type check.
|
|
28
|
+
* @param {keyof EqualizerParams|EqualizerParams} params This argument is string if getter. Otherwise, setter.
|
|
29
|
+
* @return {EqualizerParams[keyof EqualizerParams]|Equalizer} Return value is parameter for equalizer if getter.
|
|
30
|
+
* Otherwise, return value is for method chain.
|
|
31
|
+
*/
|
|
32
|
+
param(params: 'bass'): number;
|
|
33
|
+
param(params: 'middle'): number;
|
|
34
|
+
param(params: 'treble'): number;
|
|
35
|
+
param(params: 'presence'): number;
|
|
36
|
+
param(params: EqualizerParams): Equalizer;
|
|
37
|
+
/** @override */
|
|
38
|
+
params(): EqualizerParams;
|
|
39
|
+
/** @override */
|
|
40
|
+
activate(): Equalizer;
|
|
41
|
+
/** @override */
|
|
42
|
+
deactivate(): Equalizer;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=Equalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Equalizer.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Equalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,QAAQ;IACrC,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,QAAQ,CAAmB;IAEnC;;QAEI;gBACQ,OAAO,EAAE,YAAY;IAsCjC,gBAAgB;IACA,OAAO,IAAI,QAAQ;IA2BnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM;IAC/B,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM;IAC/B,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM;IACjC,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS;IAmDhD,gBAAgB;IACA,MAAM,IAAI,eAAe;IAUzC,gBAAgB;IACA,QAAQ,IAAI,SAAS;IAKrC,gBAAgB;IACA,UAAU,IAAI,SAAS;CAIxC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type FilterParams = {
|
|
3
|
+
state?: boolean;
|
|
4
|
+
type?: BiquadFilterType;
|
|
5
|
+
frequency?: number;
|
|
6
|
+
Q?: number;
|
|
7
|
+
gain?: number;
|
|
8
|
+
range?: number;
|
|
9
|
+
attack?: number;
|
|
10
|
+
decay?: number;
|
|
11
|
+
sustain?: number;
|
|
12
|
+
release?: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Effector's subclass for Filter.
|
|
16
|
+
* @constructor
|
|
17
|
+
* @extends {Effector}
|
|
18
|
+
*/
|
|
19
|
+
export declare class Filter extends Effector {
|
|
20
|
+
private filter;
|
|
21
|
+
private maxFrequency;
|
|
22
|
+
private range;
|
|
23
|
+
private attack;
|
|
24
|
+
private decay;
|
|
25
|
+
private sustain;
|
|
26
|
+
private release;
|
|
27
|
+
/**
|
|
28
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
29
|
+
*/
|
|
30
|
+
constructor(context: AudioContext);
|
|
31
|
+
/** @override */
|
|
32
|
+
start(startTime?: number): void;
|
|
33
|
+
/** @override */
|
|
34
|
+
stop(stopTime?: number): void;
|
|
35
|
+
/** @override */
|
|
36
|
+
connect(): GainNode;
|
|
37
|
+
/**
|
|
38
|
+
* This method gets or sets parameters for filter effector.
|
|
39
|
+
* This method is overloaded for type interface and type check.
|
|
40
|
+
* @param {keyof FilterParams|FilterParams} params This argument is string if getter. Otherwise, setter.
|
|
41
|
+
* @return {FilterParams[keyof FilterParams]|Filter} Return value is parameter for filter effector if getter.
|
|
42
|
+
* Otherwise, return value is for method chain.
|
|
43
|
+
*/
|
|
44
|
+
param(params: 'type'): BiquadFilterType;
|
|
45
|
+
param(params: 'frequency'): number;
|
|
46
|
+
param(params: 'Q'): number;
|
|
47
|
+
param(params: 'gain'): number;
|
|
48
|
+
param(params: 'range'): number;
|
|
49
|
+
param(params: 'attack'): number;
|
|
50
|
+
param(params: 'decay'): number;
|
|
51
|
+
param(params: 'sustain'): number;
|
|
52
|
+
param(params: 'release'): number;
|
|
53
|
+
param(params: FilterParams): Filter;
|
|
54
|
+
/** @override */
|
|
55
|
+
params(): FilterParams;
|
|
56
|
+
/** @override */
|
|
57
|
+
activate(): Filter;
|
|
58
|
+
/** @override */
|
|
59
|
+
deactivate(): Filter;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=Filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ;IAClC,OAAO,CAAC,MAAM,CAAmB;IAEjC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,KAAK,CAAO;IAEpB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,OAAO,CAAO;IACtB,OAAO,CAAC,OAAO,CAAO;IAEtB;;OAEG;gBACS,OAAO,EAAE,YAAY;IAiBjC,gBAAgB;IACA,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAmB/C,gBAAgB;IACA,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAgB7C,gBAAgB;IACA,OAAO,IAAI,QAAQ;IAqBnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB;IACvC,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAClC,KAAK,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM;IAC1B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM;IAC/B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAChC,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAChC,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM;IA4F1C,gBAAgB;IACA,MAAM,IAAI,YAAY;IAetC,gBAAgB;IACA,QAAQ,IAAI,MAAM;IASlC,gBAAgB;IACA,UAAU,IAAI,MAAM;CAQrC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type FlangerParams = {
|
|
3
|
+
state?: boolean;
|
|
4
|
+
time?: number;
|
|
5
|
+
depth?: number;
|
|
6
|
+
rate?: number;
|
|
7
|
+
mix?: number;
|
|
8
|
+
tone?: number;
|
|
9
|
+
feedback?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Effector's subclass for Flanger.
|
|
13
|
+
* @constructor
|
|
14
|
+
* @extends {Effector}
|
|
15
|
+
*/
|
|
16
|
+
export declare class Flanger extends Effector {
|
|
17
|
+
private delay;
|
|
18
|
+
private tone;
|
|
19
|
+
private mix;
|
|
20
|
+
private feedback;
|
|
21
|
+
private depthRate;
|
|
22
|
+
/**
|
|
23
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
24
|
+
*/
|
|
25
|
+
constructor(context: AudioContext);
|
|
26
|
+
/** @override */
|
|
27
|
+
stop(stopTime?: number, releaseTime?: number): void;
|
|
28
|
+
/** @override */
|
|
29
|
+
connect(): GainNode;
|
|
30
|
+
/**
|
|
31
|
+
* This method gets or sets parameters for flanger effector.
|
|
32
|
+
* This method is overloaded for type interface and type check.
|
|
33
|
+
* @param {keyof FlangerParams|FlangerParams} params This argument is string if getter. Otherwise, setter.
|
|
34
|
+
* @return {FlangerParams[keyof FlangerParams]|Flanger} Return value is parameter for flanger effector if getter.
|
|
35
|
+
* Otherwise, return value is for method chain.
|
|
36
|
+
*/
|
|
37
|
+
param(params: 'time'): number;
|
|
38
|
+
param(params: 'depth'): number;
|
|
39
|
+
param(params: 'rate'): number;
|
|
40
|
+
param(params: 'mix'): number;
|
|
41
|
+
param(params: 'tone'): number;
|
|
42
|
+
param(params: 'feedback'): number;
|
|
43
|
+
param(params: FlangerParams): Flanger;
|
|
44
|
+
/** @override */
|
|
45
|
+
params(): FlangerParams;
|
|
46
|
+
/** @override */
|
|
47
|
+
activate(): Flanger;
|
|
48
|
+
/** @override */
|
|
49
|
+
deactivate(): Flanger;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=Flanger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flanger.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Flanger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,IAAI,CAAmB;IAC/B,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,SAAS,CAAK;IAEtB;;OAEG;gBACS,OAAO,EAAE,YAAY;IA6BjC,gBAAgB;IACA,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAUnE,gBAAgB;IACA,OAAO,IAAI,QAAQ;IA4BnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM;IAC5B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM;IACjC,KAAK,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAqE5C,gBAAgB;IACA,MAAM,IAAI,aAAa;IAYvC,gBAAgB;IACA,QAAQ,IAAI,OAAO;IAKnC,gBAAgB;IACA,UAAU,IAAI,OAAO;CAItC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type ListenerParams = {
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
|
+
z?: number;
|
|
6
|
+
fx?: number;
|
|
7
|
+
fy?: number;
|
|
8
|
+
fz?: number;
|
|
9
|
+
ux?: number;
|
|
10
|
+
uy?: number;
|
|
11
|
+
uz?: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Effector's subclass for Listener.
|
|
15
|
+
* @constructor
|
|
16
|
+
* @extends {Effector}
|
|
17
|
+
*/
|
|
18
|
+
export declare class Listener extends Effector {
|
|
19
|
+
private listener;
|
|
20
|
+
private positions;
|
|
21
|
+
private forwards;
|
|
22
|
+
private ups;
|
|
23
|
+
/**
|
|
24
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
25
|
+
*/
|
|
26
|
+
constructor(context: AudioContext);
|
|
27
|
+
/**
|
|
28
|
+
* This method gets or sets parameters for audio listener.
|
|
29
|
+
* This method is overloaded for type interface and type check.
|
|
30
|
+
* @param {keyof ListenerParams|ListenerParams} params This argument is string if getter. Otherwise, setter.
|
|
31
|
+
* @return {ListenerParams[keyof ListenerParams]|Listener} Return value is parameter for audio listener if getter.
|
|
32
|
+
* Otherwise, return value is for method chain.
|
|
33
|
+
*/
|
|
34
|
+
param(params: 'x'): number;
|
|
35
|
+
param(params: 'y'): number;
|
|
36
|
+
param(params: 'z'): number;
|
|
37
|
+
param(params: 'fx'): number;
|
|
38
|
+
param(params: 'fy'): number;
|
|
39
|
+
param(params: 'fz'): number;
|
|
40
|
+
param(params: 'ux'): number;
|
|
41
|
+
param(params: 'uy'): number;
|
|
42
|
+
param(params: 'uz'): number;
|
|
43
|
+
param(params: ListenerParams): Listener;
|
|
44
|
+
/** @override */
|
|
45
|
+
params(): ListenerParams;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=Listener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Listener.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Listener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,cAAc,GAAG;IAC3B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAC;AAEF;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,QAAQ;IACpC,OAAO,CAAC,QAAQ,CAAgB;IAEhC,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,GAAG,CAAa;IAExB;;OAEG;gBACS,OAAO,EAAE,YAAY;IAyBjC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM;IAC1B,KAAK,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM;IAC1B,KAAK,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM;IAC1B,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC3B,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC3B,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC3B,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC3B,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC3B,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC3B,KAAK,CAAC,MAAM,EAAE,cAAc,GAAG,QAAQ;IA2F9C,gBAAgB;IACA,MAAM,IAAI,cAAc;CAazC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Effector } from './Effector';
|
|
2
|
+
export declare type Position3D = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
z: number;
|
|
6
|
+
};
|
|
7
|
+
export declare type PannerParams = {
|
|
8
|
+
state?: boolean;
|
|
9
|
+
x?: number;
|
|
10
|
+
y?: number;
|
|
11
|
+
z?: number;
|
|
12
|
+
ox?: number;
|
|
13
|
+
oy?: number;
|
|
14
|
+
oz?: number;
|
|
15
|
+
refDistance?: number;
|
|
16
|
+
maxDistance?: number;
|
|
17
|
+
rolloffFactor?: number;
|
|
18
|
+
coneInnerAngle?: number;
|
|
19
|
+
coneOuterAngle?: number;
|
|
20
|
+
coneOuterGain?: number;
|
|
21
|
+
panningModel: PanningModelType;
|
|
22
|
+
distanceModel: DistanceModelType;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Effector's subclass for Panner.
|
|
26
|
+
* @constructor
|
|
27
|
+
* @extends {Effector}
|
|
28
|
+
*/
|
|
29
|
+
export declare class Panner extends Effector {
|
|
30
|
+
private panner;
|
|
31
|
+
private positions;
|
|
32
|
+
private orientations;
|
|
33
|
+
/**
|
|
34
|
+
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
35
|
+
*/
|
|
36
|
+
constructor(context: AudioContext);
|
|
37
|
+
/** @override */
|
|
38
|
+
connect(): GainNode;
|
|
39
|
+
/**
|
|
40
|
+
* This method gets or sets parameters for panner.
|
|
41
|
+
* This method is overloaded for type interface and type check.
|
|
42
|
+
* @param {keyof PannerParams|PannerParams} params This argument is string if getter. Otherwise, setter.
|
|
43
|
+
* @return {PannerParams[keyof PannerParams]|PannerParams} Return value is parameter for panner if getter.
|
|
44
|
+
* Otherwise, return value is for method chain.
|
|
45
|
+
*/
|
|
46
|
+
param(params: 'x'): number;
|
|
47
|
+
param(params: 'y'): number;
|
|
48
|
+
param(params: 'z'): number;
|
|
49
|
+
param(params: 'ox'): number;
|
|
50
|
+
param(params: 'oy'): number;
|
|
51
|
+
param(params: 'oz'): number;
|
|
52
|
+
param(params: 'refDistance'): number;
|
|
53
|
+
param(params: 'maxDistance'): number;
|
|
54
|
+
param(params: 'rolloffFactor'): number;
|
|
55
|
+
param(params: 'coneInnerAngle'): number;
|
|
56
|
+
param(params: 'coneOuterAngle'): number;
|
|
57
|
+
param(params: 'coneOuterGain'): number;
|
|
58
|
+
param(params: 'panningModel'): PanningModelType;
|
|
59
|
+
param(params: 'distanceModel'): DistanceModelType;
|
|
60
|
+
param(params: PannerParams): Panner;
|
|
61
|
+
/** @override */
|
|
62
|
+
params(): PannerParams;
|
|
63
|
+
/** @override */
|
|
64
|
+
activate(): Panner;
|
|
65
|
+
/** @override */
|
|
66
|
+
deactivate(): Panner;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=Panner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panner.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Panner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,UAAU,GAAG;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAA;CACV,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,aAAa,EAAE,iBAAiB,CAAA;CACjC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ;IAClC,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,SAAS,CAAa;I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