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.
Files changed (121) hide show
  1. package/README.md +57 -29
  2. package/build/types/AudioModule/index.d.ts +198 -0
  3. package/build/types/AudioModule/index.d.ts.map +1 -0
  4. package/build/types/MIDI/index.d.ts +48 -0
  5. package/build/types/MIDI/index.d.ts.map +1 -0
  6. package/build/types/MML/Part.d.ts +78 -0
  7. package/build/types/MML/Part.d.ts.map +1 -0
  8. package/build/types/MML/Sequence.d.ts +66 -0
  9. package/build/types/MML/Sequence.d.ts.map +1 -0
  10. package/build/types/MML/Sequencer.d.ts +34 -0
  11. package/build/types/MML/Sequencer.d.ts.map +1 -0
  12. package/build/types/MML/Token.d.ts +40 -0
  13. package/build/types/MML/Token.d.ts.map +1 -0
  14. package/build/types/MML/Tokenizer.d.ts +21 -0
  15. package/build/types/MML/Tokenizer.d.ts.map +1 -0
  16. package/build/types/MML/Tree.d.ts +60 -0
  17. package/build/types/MML/Tree.d.ts.map +1 -0
  18. package/build/types/MML/TreeConstructor.d.ts +25 -0
  19. package/build/types/MML/TreeConstructor.d.ts.map +1 -0
  20. package/build/types/MML/index.d.ts +115 -0
  21. package/build/types/MML/index.d.ts.map +1 -0
  22. package/build/types/MediaModule/index.d.ts +223 -0
  23. package/build/types/MediaModule/index.d.ts.map +1 -0
  24. package/build/types/MixerModule/index.d.ts +99 -0
  25. package/build/types/MixerModule/index.d.ts.map +1 -0
  26. package/build/types/NoiseModule/index.d.ts +106 -0
  27. package/build/types/NoiseModule/index.d.ts.map +1 -0
  28. package/build/types/OneshotModule/index.d.ts +176 -0
  29. package/build/types/OneshotModule/index.d.ts.map +1 -0
  30. package/build/types/OscillatorModule/Glide.d.ts +47 -0
  31. package/build/types/OscillatorModule/Glide.d.ts.map +1 -0
  32. package/build/types/OscillatorModule/Oscillator.d.ts +77 -0
  33. package/build/types/OscillatorModule/Oscillator.d.ts.map +1 -0
  34. package/build/types/OscillatorModule/index.d.ts +138 -0
  35. package/build/types/OscillatorModule/index.d.ts.map +1 -0
  36. package/build/types/ProcessorModule/index.d.ts +124 -0
  37. package/build/types/ProcessorModule/index.d.ts.map +1 -0
  38. package/build/types/SoundModule/Analyser/FFT.d.ts +61 -0
  39. package/build/types/SoundModule/Analyser/FFT.d.ts.map +1 -0
  40. package/build/types/SoundModule/Analyser/Time.d.ts +54 -0
  41. package/build/types/SoundModule/Analyser/Time.d.ts.map +1 -0
  42. package/build/types/SoundModule/Analyser/TimeOverview.d.ts +132 -0
  43. package/build/types/SoundModule/Analyser/TimeOverview.d.ts.map +1 -0
  44. package/build/types/SoundModule/Analyser/Visualizer.d.ts +150 -0
  45. package/build/types/SoundModule/Analyser/Visualizer.d.ts.map +1 -0
  46. package/build/types/SoundModule/Analyser/index.d.ts +85 -0
  47. package/build/types/SoundModule/Analyser/index.d.ts.map +1 -0
  48. package/build/types/SoundModule/Effectors/Autopanner.d.ts +39 -0
  49. package/build/types/SoundModule/Effectors/Autopanner.d.ts.map +1 -0
  50. package/build/types/SoundModule/Effectors/Chorus.d.ts +51 -0
  51. package/build/types/SoundModule/Effectors/Chorus.d.ts.map +1 -0
  52. package/build/types/SoundModule/Effectors/Compressor.d.ts +43 -0
  53. package/build/types/SoundModule/Effectors/Compressor.d.ts.map +1 -0
  54. package/build/types/SoundModule/Effectors/Delay.d.ts +48 -0
  55. package/build/types/SoundModule/Effectors/Delay.d.ts.map +1 -0
  56. package/build/types/SoundModule/Effectors/Distortion.d.ts +90 -0
  57. package/build/types/SoundModule/Effectors/Distortion.d.ts.map +1 -0
  58. package/build/types/SoundModule/Effectors/Effector.d.ts +79 -0
  59. package/build/types/SoundModule/Effectors/Effector.d.ts.map +1 -0
  60. package/build/types/SoundModule/Effectors/EnvelopeGenerator.d.ts +90 -0
  61. package/build/types/SoundModule/Effectors/EnvelopeGenerator.d.ts.map +1 -0
  62. package/build/types/SoundModule/Effectors/Equalizer.d.ts +44 -0
  63. package/build/types/SoundModule/Effectors/Equalizer.d.ts.map +1 -0
  64. package/build/types/SoundModule/Effectors/Filter.d.ts +61 -0
  65. package/build/types/SoundModule/Effectors/Filter.d.ts.map +1 -0
  66. package/build/types/SoundModule/Effectors/Flanger.d.ts +51 -0
  67. package/build/types/SoundModule/Effectors/Flanger.d.ts.map +1 -0
  68. package/build/types/SoundModule/Effectors/Listener.d.ts +47 -0
  69. package/build/types/SoundModule/Effectors/Listener.d.ts.map +1 -0
  70. package/build/types/SoundModule/Effectors/Panner.d.ts +68 -0
  71. package/build/types/SoundModule/Effectors/Panner.d.ts.map +1 -0
  72. package/build/types/SoundModule/Effectors/Phaser.d.ts +55 -0
  73. package/build/types/SoundModule/Effectors/Phaser.d.ts.map +1 -0
  74. package/build/types/SoundModule/Effectors/PitchShifter.d.ts +42 -0
  75. package/build/types/SoundModule/Effectors/PitchShifter.d.ts.map +1 -0
  76. package/build/types/SoundModule/Effectors/Reverb.d.ts +81 -0
  77. package/build/types/SoundModule/Effectors/Reverb.d.ts.map +1 -0
  78. package/build/types/SoundModule/Effectors/Ringmodulator.d.ts +39 -0
  79. package/build/types/SoundModule/Effectors/Ringmodulator.d.ts.map +1 -0
  80. package/build/types/SoundModule/Effectors/Stereo.d.ts +45 -0
  81. package/build/types/SoundModule/Effectors/Stereo.d.ts.map +1 -0
  82. package/build/types/SoundModule/Effectors/Tremolo.d.ts +41 -0
  83. package/build/types/SoundModule/Effectors/Tremolo.d.ts.map +1 -0
  84. package/build/types/SoundModule/Effectors/VocalCanceler.d.ts +31 -0
  85. package/build/types/SoundModule/Effectors/VocalCanceler.d.ts.map +1 -0
  86. package/build/types/SoundModule/Effectors/Wah.d.ts +49 -0
  87. package/build/types/SoundModule/Effectors/Wah.d.ts.map +1 -0
  88. package/build/types/SoundModule/Recorder/Channel.d.ts +44 -0
  89. package/build/types/SoundModule/Recorder/Channel.d.ts.map +1 -0
  90. package/build/types/SoundModule/Recorder/Track.d.ts +36 -0
  91. package/build/types/SoundModule/Recorder/Track.d.ts.map +1 -0
  92. package/build/types/SoundModule/Recorder/index.d.ts +118 -0
  93. package/build/types/SoundModule/Recorder/index.d.ts.map +1 -0
  94. package/build/types/SoundModule/Session/Room.d.ts +69 -0
  95. package/build/types/SoundModule/Session/Room.d.ts.map +1 -0
  96. package/build/types/SoundModule/Session/index.d.ts +94 -0
  97. package/build/types/SoundModule/Session/index.d.ts.map +1 -0
  98. package/build/types/SoundModule/index.d.ts +147 -0
  99. package/build/types/SoundModule/index.d.ts.map +1 -0
  100. package/build/types/StreamModule/NoiseGate.d.ts +29 -0
  101. package/build/types/StreamModule/NoiseGate.d.ts.map +1 -0
  102. package/build/types/StreamModule/NoiseSuppressor.d.ts +30 -0
  103. package/build/types/StreamModule/NoiseSuppressor.d.ts.map +1 -0
  104. package/build/types/StreamModule/index.d.ts +175 -0
  105. package/build/types/StreamModule/index.d.ts.map +1 -0
  106. package/build/types/XSound/index.d.ts +155 -0
  107. package/build/types/XSound/index.d.ts.map +1 -0
  108. package/build/types/interfaces.d.ts +23 -0
  109. package/build/types/interfaces.d.ts.map +1 -0
  110. package/build/types/main.d.ts +117 -0
  111. package/build/types/main.d.ts.map +1 -0
  112. package/build/types/types.d.ts +10 -0
  113. package/build/types/types.d.ts.map +1 -0
  114. package/build/xsound.js +1 -1
  115. package/build/xsound.js.LICENSE.txt +1 -1
  116. package/build/xsound.js.map +1 -1
  117. package/build/xsound.min.js +3 -0
  118. package/build/xsound.min.js.LICENSE.txt +1 -0
  119. package/build/xsound.min.js.map +1 -0
  120. package/package.json +38 -33
  121. package/build/xsound.d.ts +0 -3
@@ -0,0 +1,55 @@
1
+ import { Effector } from './Effector';
2
+ export declare type PhaserNumberOfStages = 0 | 2 | 4 | 8 | 12 | 24;
3
+ export declare type PhaserParams = {
4
+ state?: boolean;
5
+ stage?: PhaserNumberOfStages;
6
+ frequency?: number;
7
+ resonance?: number;
8
+ depth?: number;
9
+ rate?: number;
10
+ mix?: number;
11
+ feedback?: number;
12
+ };
13
+ /**
14
+ * Effector's subclass for Phaser.
15
+ * @constructor
16
+ * @extends {Effector}
17
+ */
18
+ export declare class Phaser extends Effector {
19
+ static MAX_STAGES: number;
20
+ private numberOfStages;
21
+ private filters;
22
+ private mix;
23
+ private feedback;
24
+ private depthRate;
25
+ /**
26
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
27
+ */
28
+ constructor(context: AudioContext);
29
+ /** @override */
30
+ stop(stopTime?: number, releaseTime?: number): void;
31
+ /** @override */
32
+ connect(): GainNode;
33
+ /**
34
+ * This method gets or sets parameters for phaser effector.
35
+ * This method is overloaded for type interface and type check.
36
+ * @param {keyof PhaserParams|PhaserParams} params This argument is string if getter. Otherwise, setter.
37
+ * @return {PhaserParams[keyof PhaserParams]|Phaser} Return value is parameter for phaser effector if getter.
38
+ * Otherwise, return value is for method chain.
39
+ */
40
+ param(params: 'stage'): PhaserNumberOfStages;
41
+ param(params: 'frequency'): number;
42
+ param(params: 'resonance'): number;
43
+ param(params: 'depth'): number;
44
+ param(params: 'rate'): number;
45
+ param(params: 'mix'): number;
46
+ param(params: 'feedback'): number;
47
+ param(params: PhaserParams): Phaser;
48
+ /** @override */
49
+ params(): PhaserParams;
50
+ /** @override */
51
+ activate(): Phaser;
52
+ /** @override */
53
+ deactivate(): Phaser;
54
+ }
55
+ //# sourceMappingURL=Phaser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Phaser.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Phaser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,oBAAoB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;AAE3D,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,SAAS,CAAC,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Params = {
4
+ state?: boolean;
5
+ pitch?: number;
6
+ };
7
+ /**
8
+ * Effector's subclass for Pitch Shifter.
9
+ * @constructor
10
+ * @extends {Effector}
11
+ */
12
+ export declare class PitchShifter extends Effector {
13
+ private pitch;
14
+ private gainCorrection;
15
+ /**
16
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
17
+ * @param {BufferSize} bufferSize This argument is buffer size for `ScriptProcessorNode`.
18
+ */
19
+ constructor(context: AudioContext, bufferSize: BufferSize);
20
+ /** @override */
21
+ start(): void;
22
+ /** @override */
23
+ stop(): void;
24
+ /** @override */
25
+ connect(): GainNode;
26
+ /**
27
+ * This method gets or sets parameters for pitch shifter.
28
+ * This method is overloaded for type interface and type check.
29
+ * @param {keyof PitchShifterParams|PitchShifterParams} params This argument is string if getter. Otherwise, setter.
30
+ * @return {PitchShifterParams[keyof PitchShifterParams]|PitchShifter} Return value is parameter for pitch shifter if getter.
31
+ * Otherwise, return value is for method chain.
32
+ */
33
+ param(params: 'pitch'): number;
34
+ param(params: PitchShifterParams): PitchShifter;
35
+ /** @override */
36
+ params(): PitchShifterParams;
37
+ /** @override */
38
+ activate(): PitchShifter;
39
+ /** @override */
40
+ deactivate(): PitchShifter;
41
+ }
42
+ //# sourceMappingURL=PitchShifter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PitchShifter.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/PitchShifter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAEF;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,QAAQ;IACxC,OAAO,CAAC,KAAK,CAAO;IACpB,OAAO,CAAC,cAAc,CAAO;IAE7B;;;OAGG;gBACS,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU;IASzD,gBAAgB;IACA,KAAK,IAAI,IAAI;IA0D7B,gBAAgB;IACA,IAAI,IAAI,IAAI;IAgB5B,gBAAgB;IACA,OAAO,IAAI,QAAQ;IAiBnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY;IA6BtD,gBAAgB;IACA,MAAM,IAAI,kBAAkB;IAO5C,gBAAgB;IACA,QAAQ,IAAI,YAAY;IAKxC,gBAAgB;IACA,UAAU,IAAI,YAAY;CAI3C"}
@@ -0,0 +1,81 @@
1
+ import { Effector } from './Effector';
2
+ declare type ReverbErrorText = 'error' | 'timeout' | 'decode';
3
+ export declare type ReverbParams = {
4
+ state?: boolean;
5
+ buffer?: number | AudioBuffer | null;
6
+ dry?: number;
7
+ wet?: number;
8
+ tone?: number;
9
+ };
10
+ /**
11
+ * Effector's subclass for Reverb.
12
+ * @constructor
13
+ * @extends {Effector}
14
+ */
15
+ export declare class Reverb extends Effector {
16
+ private convolver;
17
+ private dry;
18
+ private wet;
19
+ private tone;
20
+ private rirs;
21
+ private isLoadError;
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 reverb effector.
30
+ * This method is overloaded for type interface and type check.
31
+ * @param {keyof ReverbParams|ReverbParams} params This argument is string if getter. Otherwise, setter.
32
+ * @return {ReverbParams[keyof ReverbParams]|Reverb} Return value is parameter for reverb effector if getter.
33
+ * Otherwise, return value is for method chain.
34
+ */
35
+ param(params: 'buffer'): AudioBuffer | null;
36
+ param(params: 'dry'): number;
37
+ param(params: 'wet'): number;
38
+ param(params: 'tone'): number;
39
+ param(params: ReverbParams): Reverb;
40
+ /**
41
+ * This method sets instance of `AudioBuffer` to `ConvolverNode`.
42
+ * @param {ArrayBuffer|AudioBuffer} impulse This argument is in order to convolve impulse response.
43
+ * This argument is instance of `AudioBuffer` or `ArrayBuffer` for impulse response.
44
+ * @param {function} errorCallback This argument is invoked on decode failure.
45
+ * @return {Reverb} Return value is for method chain.
46
+ */
47
+ add(impulse: ArrayBuffer | AudioBuffer, errorCallback?: (error: Error) => void): Reverb;
48
+ /**
49
+ * This method creates and appends to Reverb presets instance of `AudioBuffer` by Ajax.
50
+ * @param {Array<string>|Array<AudioBuffer>} rirs This argument is array that contains URL or instance of `AudioBuffer` for impulse response.
51
+ * @param {number} timeout This argument is timeout of Ajax. The default value is 60000 msec (1 minutes).
52
+ * @param {function} successCallback This argument is invoked on success.
53
+ * @param {function} errorCallback This argument is invoked on failure.
54
+ * @param {function} progressCallback This argument is invoked during receiving audio data.
55
+ */
56
+ preset(params: {
57
+ rirs: string[] | AudioBuffer[];
58
+ timeout?: number;
59
+ successCallback?(event: ProgressEvent): void;
60
+ errorCallback?(event: ProgressEvent | Error, textStatus: ReverbErrorText): void;
61
+ progressCallback?(event: ProgressEvent): void;
62
+ }): void;
63
+ /** @override */
64
+ params(): ReverbParams;
65
+ /** @override */
66
+ activate(): Reverb;
67
+ /** @override */
68
+ deactivate(): Reverb;
69
+ /**
70
+ * This method retrives `ArrayBuffer` and creates instance of `AudioBuffer`.
71
+ * @param {string} url This argument is resource URL for one-shot audio.
72
+ * @param {number} index This argument is in order to assign instance of `AudioBuffer`.
73
+ * @param {number} timeout This argument is Ajax timeout.
74
+ * @param {function} successCallback This argument is invoked on success.
75
+ * @param {function} errorCallback This argument is invoked on failure
76
+ * @param {function} progressCallback This argument is invoked during receiving audio data.
77
+ */
78
+ private load;
79
+ }
80
+ export {};
81
+ //# sourceMappingURL=Reverb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Reverb.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Reverb.ts"],"names":[],"mappings":"AAAA,OAAO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CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;QAC7C,aAAa,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,EAAE,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;QAChF,gBAAgB,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;KAC/C,GAAG,IAAI;IAgBV,gBAAgB;IACA,MAAM,IAAI,YAAY;IAStC,gBAAgB;IACA,QAAQ,IAAI,MAAM;IASlC,gBAAgB;IACA,UAAU,IAAI,MAAM;IASpC;;;;;;;;OAQG;IACH,OAAO,CAAC,IAAI;CAwEb"}
@@ -0,0 +1,39 @@
1
+ import { Effector } from './Effector';
2
+ export declare type RingmodulatorParams = {
3
+ state?: boolean;
4
+ depth?: number;
5
+ rate?: number;
6
+ };
7
+ /**
8
+ * Effector's subclass for Ring Modulator.
9
+ * @constructor
10
+ * @extends {Effector}
11
+ */
12
+ export declare class Ringmodulator extends Effector {
13
+ private amplitude;
14
+ /**
15
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
16
+ */
17
+ constructor(context: AudioContext);
18
+ /** @override */
19
+ stop(stopTime?: number, releaseTime?: number): void;
20
+ /** @override */
21
+ connect(): GainNode;
22
+ /**
23
+ * This method gets or sets parameters for ring modulator effector.
24
+ * This method is overloaded for type interface and type check.
25
+ * @param {keyof RingmodulatorParams|RingmodulatorParams} params This argument is string if getter. Otherwise, setter.
26
+ * @return {RingmodulatorParams[keyof RingmodulatorParams]|Autopanner} Return value is parameter for ring modulator effector if getter.
27
+ * Otherwise, return value is for method chain.
28
+ */
29
+ param(params: 'depth'): number;
30
+ param(params: 'rate'): number;
31
+ param(params: RingmodulatorParams): Ringmodulator;
32
+ /** @override */
33
+ params(): RingmodulatorParams;
34
+ /** @override */
35
+ activate(): Ringmodulator;
36
+ /** @override */
37
+ deactivate(): Ringmodulator;
38
+ }
39
+ //# sourceMappingURL=Ringmodulator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ringmodulator.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Ringmodulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAEF;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IACzC,OAAO,CAAC,SAAS,CAAW;IAE5B;;OAEG;gBACS,OAAO,EAAE,YAAY;IAmBjC,gBAAgB;IACA,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAUnE,gBAAgB;IACA,OAAO,IAAI,QAAQ;IAqBnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa;IAmCxD,gBAAgB;IACA,MAAM,IAAI,mBAAmB;IAQ7C,gBAAgB;IACA,QAAQ,IAAI,aAAa;IAKzC,gBAAgB;IACA,UAAU,IAAI,aAAa;CAI5C"}
@@ -0,0 +1,45 @@
1
+ import { BufferSize } from '../../types';
2
+ import { Effector } from './Effector';
3
+ export declare type StereoParams = {
4
+ state?: boolean;
5
+ time?: number;
6
+ };
7
+ /**
8
+ * Effector's subclass for Stereo.
9
+ * @constructor
10
+ * @extends {Effector}
11
+ */
12
+ export declare class Stereo extends Effector {
13
+ static MAX_DELAY_TIME: number;
14
+ private splitter;
15
+ private merger;
16
+ private delayL;
17
+ private delayR;
18
+ /**
19
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
20
+ * @param {BufferSize} bufferSize This argument is buffer size for `ScriptProcessorNode`.
21
+ */
22
+ constructor(context: AudioContext, bufferSize: BufferSize);
23
+ /** @override */
24
+ start(): void;
25
+ /** @override */
26
+ stop(): void;
27
+ /** @override */
28
+ connect(): GainNode;
29
+ /**
30
+ * This method gets or sets parameters for stereo effector
31
+ * This method is overloaded for type interface and type check.
32
+ * @param {keyof StereoParams|StereoParams} params This argument is string if getter. Otherwise, setter.
33
+ * @return {StereoParams[keyof StereoParams]|Stereo} Return value is parameter for stereo effector if getter.
34
+ * Otherwise, return value is for method chain.
35
+ */
36
+ param(params: 'time'): number;
37
+ param(params: StereoParams): Stereo;
38
+ /** @override */
39
+ params(): StereoParams;
40
+ /** @override */
41
+ activate(): Stereo;
42
+ /** @override */
43
+ deactivate(): Stereo;
44
+ }
45
+ //# sourceMappingURL=Stereo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stereo.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Stereo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAEF;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,QAAQ;IAClC,OAAc,cAAc,SAAK;IAEjC,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,MAAM,CAAY;IAE1B;;;OAGG;gBACS,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU;IAgBzD,gBAAgB;IACA,KAAK,IAAI,IAAI;IA2B7B,gBAAgB;IACA,IAAI,IAAI,IAAI;IAgB5B,gBAAgB;IACA,OAAO,IAAI,QAAQ;IA4BnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM;IA4B1C,gBAAgB;IACA,MAAM,IAAI,YAAY;IAOtC,gBAAgB;IACA,QAAQ,IAAI,MAAM;IAKlC,gBAAgB;IACA,UAAU,IAAI,MAAM;CAIrC"}
@@ -0,0 +1,41 @@
1
+ import { Effector } from './Effector';
2
+ export declare type TremoloParams = {
3
+ state?: boolean;
4
+ type?: OscillatorType;
5
+ depth?: number;
6
+ rate?: number;
7
+ };
8
+ /**
9
+ * Effector's subclass for Tremolo.
10
+ * @constructor
11
+ * @extends {Effector}
12
+ */
13
+ export declare class Tremolo extends Effector {
14
+ private amplitude;
15
+ /**
16
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
17
+ */
18
+ constructor(context: AudioContext);
19
+ /** @override */
20
+ stop(stopTime?: number, releaseTime?: number): void;
21
+ /** @override */
22
+ connect(): GainNode;
23
+ /**
24
+ * This method gets or sets parameters for tremolo effector.
25
+ * This method is overloaded for type interface and type check.
26
+ * @param {keyof TremoloParams|TremoloParams} params This argument is string if getter. Otherwise, setter.
27
+ * @return {TremoloParams[keyof TremoloParams]|Tremolo} Return value is parameter for tremolo effector if getter.
28
+ * Otherwise, return value is for method chain.
29
+ */
30
+ param(params: 'type'): OscillatorType;
31
+ param(params: 'depth'): number;
32
+ param(params: 'rate'): number;
33
+ param(params: TremoloParams): Tremolo;
34
+ /** @override */
35
+ params(): TremoloParams;
36
+ /** @override */
37
+ activate(): Tremolo;
38
+ /** @override */
39
+ deactivate(): Tremolo;
40
+ }
41
+ //# sourceMappingURL=Tremolo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tremolo.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Tremolo.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,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;AAEF;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,OAAO,CAAC,SAAS,CAAW;IAE5B;;OAEG;gBACS,OAAO,EAAE,YAAY;IAoBjC,gBAAgB;IACA,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI;IAUnE,gBAAgB;IACA,OAAO,IAAI,QAAQ;IAqBnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc;IACrC,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IA2C5C,gBAAgB;IACA,MAAM,IAAI,aAAa;IASvC,gBAAgB;IACA,QAAQ,IAAI,OAAO;IAKnC,gBAAgB;IACA,UAAU,IAAI,OAAO;CAItC"}
@@ -0,0 +1,31 @@
1
+ export declare type VocalCancelerParams = {
2
+ depth?: number;
3
+ };
4
+ /**
5
+ * This private class is for Vocal Canceler.
6
+ * @constructor
7
+ */
8
+ export declare class VocalCanceler {
9
+ private depth;
10
+ constructor();
11
+ /**
12
+ * This method removes vocal part from audio on playing.
13
+ * @param {number} dataL This argument is gain level for Left channel.
14
+ * @param {number} dataR This argument is gain level for Right channel.
15
+ * @return {number} Return value is audio data except vocal part.
16
+ */
17
+ start(dataL: number, dataR: number): number;
18
+ /**
19
+ * This method gets or sets parameters for vocal canceler.
20
+ * @param {keyof VocalCancelerParams|VocalCancelerParams} params This argument is string if getter. Otherwise, setter.
21
+ * @return {VocalCancelerParams[keyof VocalCancelerParams]|VocalCanceler} Return value is parameter for vocal canceler if getter.
22
+ * Otherwise, return value is for method chain.
23
+ */
24
+ param(params: keyof VocalCancelerParams | VocalCancelerParams): VocalCancelerParams[keyof VocalCancelerParams] | VocalCanceler;
25
+ /**
26
+ * This method gets vocal canceler parameters as associative array.
27
+ * @return {VocalCancelerParams}
28
+ */
29
+ params(): VocalCancelerParams;
30
+ }
31
+ //# sourceMappingURL=VocalCanceler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VocalCanceler.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/VocalCanceler.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAEF;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAK;;IAMlB;;;;;OAKG;IACI,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAIlD;;;;;OAKG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,mBAAmB,CAAC,GAAG,aAAa;IA0BrI;;;OAGG;IACI,MAAM,IAAI,mBAAmB;CAKrC"}
@@ -0,0 +1,49 @@
1
+ import { Effector } from './Effector';
2
+ export declare type WahParams = {
3
+ state?: boolean;
4
+ auto?: boolean;
5
+ cutoff?: number;
6
+ depth?: number;
7
+ rate?: number;
8
+ resonance?: number;
9
+ };
10
+ /**
11
+ * Effector's subclass for Wah.
12
+ * @constructor
13
+ * @extends {Effector}
14
+ */
15
+ export declare class Wah extends Effector {
16
+ private auto;
17
+ private lowpass;
18
+ private envelopeFollower;
19
+ private sensitivity;
20
+ private depthRate;
21
+ /**
22
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
23
+ */
24
+ constructor(context: AudioContext);
25
+ /** @override */
26
+ stop(stopTime?: number, releaseTime?: number): void;
27
+ /** @override */
28
+ connect(): GainNode;
29
+ /**
30
+ * This method gets or sets parameters for wah effector.
31
+ * This method is overloaded for type interface and type check.
32
+ * @param {keyof WahParams|WahParams} params This argument is string if getter. Otherwise, setter.
33
+ * @return {WahParams[keyof WahParams]|Wah} Return value is parameter for wah effector if getter.
34
+ * Otherwise, return value is for method chain.
35
+ */
36
+ param(params: 'auto'): boolean;
37
+ param(params: 'cutoff'): number;
38
+ param(params: 'depth'): number;
39
+ param(params: 'rate'): number;
40
+ param(params: 'resonance'): number;
41
+ param(params: WahParams): Wah;
42
+ /** @override */
43
+ params(): WahParams;
44
+ /** @override */
45
+ activate(): Wah;
46
+ /** @override */
47
+ deactivate(): Wah;
48
+ }
49
+ //# sourceMappingURL=Wah.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wah.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Effectors/Wah.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAO,YAAY,CAAC;AAEvC,oBAAY,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,GAAI,SAAQ,QAAQ;IAC/B,OAAO,CAAC,IAAI,CAAS;IAErB,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,gBAAgB,CAAiB;IACzC,OAAO,CAAC,WAAW,CAAmB;IAEtC,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;IA4CnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAC9B,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM;IAC/B,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM;IAC9B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAC7B,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAClC,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,GAAG;IAuEpC,gBAAgB;IACA,MAAM,IAAI,SAAS;IAWnC,gBAAgB;IACA,QAAQ,IAAI,GAAG;IAK/B,gBAAgB;IACA,UAAU,IAAI,GAAG;CAIlC"}
@@ -0,0 +1,44 @@
1
+ import { Track } from './Track';
2
+ /**
3
+ * This class is entity for recording channel.
4
+ * @constructor
5
+ */
6
+ export declare class Channel {
7
+ private id;
8
+ private tracks;
9
+ private channelGain;
10
+ /**
11
+ * @param {string} id This argument is channel ID.
12
+ */
13
+ constructor(id: string);
14
+ /**
15
+ * This method appends instance of `Track`.
16
+ * @param {Track} track This argument is instance of `Track` as recording track.
17
+ * @return {Channel} Return value is for method chain.
18
+ */
19
+ append(track: Track): Channel;
20
+ /**
21
+ * This method gets designated track or array that contains the all of tracks.
22
+ * This method is overloaded for type interface and type check.
23
+ * @param {number} trackNumber This argument is target track number.
24
+ * @return {Track|Array<Track>}
25
+ */
26
+ get(trackNumber: number): Track;
27
+ get(): Track[];
28
+ /**
29
+ * This method gets or sets channel gain.
30
+ * This method is overloaded for type interface and type check.
31
+ * @param {number} param This argument is channel gain.
32
+ * @return {number} Return value is channel gain.
33
+ */
34
+ gain(): number;
35
+ gain(param: number): void;
36
+ /**
37
+ * This method gets the number of tracks.
38
+ * @return {number}
39
+ */
40
+ length(): number;
41
+ /** @override */
42
+ toString(): string;
43
+ }
44
+ //# sourceMappingURL=Channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Recorder/Channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;GAGG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,WAAW,CAAK;IAExB;;OAEG;gBACS,EAAE,EAAE,MAAM;IAItB;;;;OAIG;IACI,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAKpC;;;;;OAKG;IACI,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK;IAC/B,GAAG,IAAI,KAAK,EAAE;IASrB;;;;;OAKG;IACI,IAAI,IAAI,MAAM;IACd,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAUhC;;;OAGG;IACI,MAAM,IAAI,MAAM;IAIvB,gBAAgB;IACT,QAAQ,IAAI,MAAM;CAG1B"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * This class is entity for recording track.
3
+ * Namely, this class has recorded sound data.
4
+ * @constructor
5
+ */
6
+ export declare class Track {
7
+ private id;
8
+ private dataBlocks;
9
+ /**
10
+ * @param {id} id This argument is track ID.
11
+ */
12
+ constructor(id: string);
13
+ /**
14
+ * This method gets array that contains recorded sound data.
15
+ * @return {Array<Float32Array>}
16
+ */
17
+ get(): Float32Array[];
18
+ /**
19
+ * This method appends recorded sound data as `Float32Array`.
20
+ * @param {Float32Array} dataBlock This argument is instance of `Float32Array` that has recorded sound data.
21
+ * @return {Track} Return value is for method chain.
22
+ */
23
+ append(dataBlock: Float32Array): Track;
24
+ /**
25
+ * This method clears data blocks.
26
+ */
27
+ clear(): void;
28
+ /**
29
+ * This method determines whether contains recorded sound data.
30
+ * @return {boolean} If track has recorded data, this value is `true`. Otherwise, this value is `false`.
31
+ */
32
+ has(): boolean;
33
+ /** @override */
34
+ toString(): string;
35
+ }
36
+ //# sourceMappingURL=Track.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Recorder/Track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,UAAU,CAAsB;IAExC;;OAEG;gBACS,EAAE,EAAE,MAAM;IAItB;;;OAGG;IACI,GAAG,IAAI,YAAY,EAAE;IAI5B;;;;OAIG;IACI,MAAM,CAAC,SAAS,EAAE,YAAY,GAAG,KAAK;IAK7C;;OAEG;IACI,KAAK,IAAI,IAAI;IAIpB;;;OAGG;IACI,GAAG,IAAI,OAAO;IAIrB,gBAAgB;IACT,QAAQ,IAAI,MAAM;CAG1B"}
@@ -0,0 +1,118 @@
1
+ import { Connectable } from '../../interfaces';
2
+ import { BufferSize } from '../../types';
3
+ export declare type RecordType = 1 | 2;
4
+ export declare type ChannelNumber = -1 | 0 | 1;
5
+ export declare type QuantizationBit = 8 | 16;
6
+ export declare type WaveExportType = 'base64' | 'dataURL' | 'blob' | 'objectURL';
7
+ export declare type RecorderParams = {
8
+ '0'?: number;
9
+ '1'?: number;
10
+ };
11
+ /**
12
+ * This private class is for multi track recording.
13
+ * @constructor
14
+ */
15
+ export declare class Recorder implements Connectable {
16
+ private processor;
17
+ private sampleRate;
18
+ private channels;
19
+ private activeTrack;
20
+ private paused;
21
+ /**
22
+ * @param {AudioContext} context This argument is in order to use Web Audio API.
23
+ * @param {BufferSize} bufferSize This argument is buffer size for `ScriptProcessorNode`.
24
+ * @param {RecordType} numberOfInputs This argument is the number of inputs for `ScriptProcessorNode`.
25
+ * @param {RecordType} numberOfOutputs This argument the number of outputs for `ScriptProcessorNode`.
26
+ */
27
+ constructor(context: AudioContext, bufferSize: BufferSize, numberOfInputs: RecordType, numberOfOutputs: RecordType);
28
+ /**
29
+ * This method sets the max number of tracks.
30
+ * @param {RecordType} numberOfTracks This argument is the number of channels (not used currently).
31
+ * @param {number} numberOfTracks This argument is the max number of tracks.
32
+ * @return {Recorder} Return value is for method chain.
33
+ */
34
+ setup(numberOfChannels: RecordType, numberOfTracks: number): Recorder;
35
+ /**
36
+ * This method selects active track.
37
+ * @param {number} trackNumber This argument is in order to select active track.
38
+ * If there is not designated track number, active track number is -1.
39
+ * @return {Recorder} Return value is for method chain.
40
+ */
41
+ ready(trackNumber: number): Recorder;
42
+ /**
43
+ * This method starts sound recording. If there is not any active track, this method stops `onaudioprocess` event handler.
44
+ * @return {Recorder} Return value is for method chain.
45
+ */
46
+ start(): Recorder;
47
+ /**
48
+ * This method turns off active track, and stops `onaudioprocess` event handler.
49
+ * @return {Recorder} Return value is for method chain.
50
+ */
51
+ stop(): Recorder;
52
+ /**
53
+ * This method gets or sets parameters for recorder.
54
+ * This method is overloaded for type interface and type check.
55
+ * @param {keyof RecorderParams|RecorderParams} params This argument is string if getter. Otherwise, setter.
56
+ * @return {RecorderParams[keyof RecorderParams]|Recorder} Return value is parameter for recorder if getter.
57
+ * Otherwise, return value is for method chain.
58
+ */
59
+ param(params: '0' | '1'): number;
60
+ param(params: RecorderParams): Recorder;
61
+ /**
62
+ * This method determines whether active track exists.
63
+ * @return {number} Return value is active track number.
64
+ */
65
+ get(): number;
66
+ /**
67
+ * This method clears record track.
68
+ * @param {number} trackNumber This argument is track for clearing. If this argument is -1, target is the all of tracks.
69
+ * @return {Recorder} Return value is for method chain.
70
+ */
71
+ clear(trackNumber: number): Recorder;
72
+ /**
73
+ * This method creates WAVE file as one of Base64, Data URL, Blob, Object URL.
74
+ * @param {number} trackNumber This argument is track number for mixing. If this argument is -1, target is the all of tracks.
75
+ * @param {RecordType} numberOfChannels This argument is in order to select monaural or stereo.
76
+ * @param {QuantizationBit} qbit This argument is quantization bit for PCM.
77
+ * @param {WaveExportType} type This argument is one of 'base64', 'dataURL', 'blob', 'objectURL'.
78
+ * @return {string|Blob} Return value is one of Base64, Data URL, Blob, Object URL as WAVE file.
79
+ */
80
+ create(trackNumber: number, numberOfChannels: RecordType, qbit: QuantizationBit, type: WaveExportType): string | Blob;
81
+ /**
82
+ * This method determines whether track has recorded data.
83
+ * @param {ChanneNumber} channelNumber This argument is target channel number (if this argument is -1, target is the all of channels).
84
+ * @param {number} trackNumber This argument is target track number (if this argument is -1, target is the all of tracks).
85
+ * @return {boolean} If there is track that has recorded data at least, this method returns `true`. Otherwise this value is `false`.
86
+ */
87
+ has(channelNumber: ChannelNumber, trackNumber: number): boolean;
88
+ /**
89
+ * This method determines whether designated channel number is valid.
90
+ * @param {ChanneNumber} channelNumber This argument is channel number for validation.
91
+ * @return {boolean} If designated channel is valid, this value is `true`. Otherwise, this value is `false`.
92
+ */
93
+ hasChannel(channelNumber: ChannelNumber): boolean;
94
+ /**
95
+ * This method determines whether designated track number is valid.
96
+ * @param {number} trackNumber This argument is track number for validation.
97
+ * @return {boolean} If designated track is valid, this value is `true`. Otherwise, this value is `false`.
98
+ */
99
+ hasTrack(trackNumber: number): boolean;
100
+ /** @override */
101
+ get INPUT(): ScriptProcessorNode;
102
+ /** @override */
103
+ get OUTPUT(): ScriptProcessorNode;
104
+ /**
105
+ * This method flats recorded sound data (data block of `Float32Array`) that track contains.
106
+ * @param {ChanneNumber} channelNumber This argument is channel number for mixing.
107
+ * @param {number} trackNumber This argument is track number.
108
+ * @return {Float32Array} Return value is instance of `Float32Array` that contains flatten sound data.
109
+ */
110
+ private flatTrack;
111
+ /**
112
+ * This method synthesizes recorded sound data that plural track contains.
113
+ * @param {ChannelNumber} channelNumber This argument is channel number for mixing.
114
+ * @return {Float32Array} Return value is instance of `Float32Array` that contains synthesized sound data.
115
+ */
116
+ private mixTrack;
117
+ }
118
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/SoundModule/Recorder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,oBAAY,UAAU,GAAQ,CAAC,GAAG,CAAC,CAA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