xsound 4.3.16 → 4.3.18
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 +8 -1
- package/build/types/src/SoundModule/Effectors/AmpSimulator.d.ts +16 -0
- package/build/types/src/SoundModule/Effectors/AmpSimulator.d.ts.map +1 -1
- package/build/types/src/SoundModule/Effectors/Booster.d.ts +2 -2
- package/build/types/src/SoundModule/Effectors/Distortion.d.ts +5 -4
- package/build/types/src/SoundModule/Effectors/Distortion.d.ts.map +1 -1
- package/build/types/src/SoundModule/Effectors/OverDrive.d.ts +2 -2
- 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 +1 -1
- package/build/xsound.min.js.LICENSE.txt +1 -1
- package/build/xsound.min.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ X.Analyser(context: AudioContext);
|
|
|
74
74
|
X.Recorder(context: AudioContext);
|
|
75
75
|
|
|
76
76
|
// Effectors
|
|
77
|
+
X.AmpSimulator(context: AudioContext);
|
|
77
78
|
X.Autopanner(context: AudioContext);
|
|
78
79
|
X.BitCrusher(context: AudioContext);
|
|
79
80
|
X.Booster(context: AudioContext);
|
|
@@ -93,7 +94,6 @@ X.OverDrive(context: AudioContext);
|
|
|
93
94
|
X.Panner(context: AudioContext);
|
|
94
95
|
X.Phaser(context: AudioContext);
|
|
95
96
|
X.PitchShifter(context: AudioContext);
|
|
96
|
-
X.AmpSimulator(context: AudioContext);
|
|
97
97
|
X.Reverb(context: AudioContext);
|
|
98
98
|
X.Ringmodulator(context: AudioContext);
|
|
99
99
|
X.Slicer(context: AudioContext);
|
|
@@ -101,6 +101,13 @@ X.Stereo(context: AudioContext);
|
|
|
101
101
|
X.Tremolo(context: AudioContext);
|
|
102
102
|
X.VocalCanceler(context: AudioContext);
|
|
103
103
|
X.Wah(context: AudioContext);
|
|
104
|
+
|
|
105
|
+
X.AmpSimulator.Preamps.Marshall(context: AudioContext);
|
|
106
|
+
X.AmpSimulator.Preamps.Fender(context: AudioContext);
|
|
107
|
+
X.AmpSimulator.Preamps.MesaBoogie(context: AudioContext);
|
|
108
|
+
X.AmpSimulator.Cabinets.SimpleCabinet(context: AudioContext);
|
|
109
|
+
X.AmpSimulator.Cabinets.FilterBankCabinet(context: AudioContext);
|
|
110
|
+
X.AmpSimulator.Cabinets.IRCabinet(context: AudioContext);
|
|
104
111
|
```
|
|
105
112
|
|
|
106
113
|
## Demo
|
|
@@ -5,6 +5,12 @@ import type { SimpleCabinetParams } from './Cabinets/SimpleCabinet';
|
|
|
5
5
|
import type { FilterBankCabinetParams } from './Cabinets/FilterBankCabinet';
|
|
6
6
|
import type { IRCabinetParams } from './Cabinets/IRCabinet';
|
|
7
7
|
import { Effector } from './Effector';
|
|
8
|
+
import { Marshall } from './Preamps/Marshall';
|
|
9
|
+
import { MesaBoogie } from './Preamps/MesaBoogie';
|
|
10
|
+
import { Fender } from './Preamps/Fender';
|
|
11
|
+
import { SimpleCabinet } from './Cabinets/SimpleCabinet';
|
|
12
|
+
import { FilterBankCabinet } from './Cabinets/FilterBankCabinet';
|
|
13
|
+
import { IRCabinet } from './Cabinets/IRCabinet';
|
|
8
14
|
export type PreampType = 'marshall' | 'mesa/boogie' | 'fender';
|
|
9
15
|
export type CabinetType = 'simple' | 'filterbank' | 'IR';
|
|
10
16
|
export type PreampCurve = Float32Array<ArrayBuffer> | null;
|
|
@@ -24,6 +30,16 @@ export declare class AmpSimulator extends Effector {
|
|
|
24
30
|
private cabinetType;
|
|
25
31
|
private preamp;
|
|
26
32
|
private cabinet;
|
|
33
|
+
static readonly Preamps: {
|
|
34
|
+
readonly Marshall: typeof Marshall;
|
|
35
|
+
readonly MesaBoogie: typeof MesaBoogie;
|
|
36
|
+
readonly Fender: typeof Fender;
|
|
37
|
+
};
|
|
38
|
+
static readonly Cabinets: {
|
|
39
|
+
readonly SimpleCabinet: typeof SimpleCabinet;
|
|
40
|
+
readonly FilterBankCabinet: typeof FilterBankCabinet;
|
|
41
|
+
readonly IRCabinet: typeof IRCabinet;
|
|
42
|
+
};
|
|
27
43
|
/**
|
|
28
44
|
* This static method creates instance of `Float32Array` for `WaveShaperNode`.
|
|
29
45
|
* @param {number} level This argument is preamp effect level.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpSimulator.d.ts","sourceRoot":"","sources":["../../../../../src/SoundModule/Effectors/AmpSimulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"AmpSimulator.d.ts","sourceRoot":"","sources":["../../../../../src/SoundModule/Effectors/AmpSimulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,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A,OAAO,IAAI,QAAQ;IAwBnC;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;IAC/B,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU;IACjC,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,UAAU;IACvC,KAAK,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW;IACzC,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC;IACrD,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC;IACvD,KAAK,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY;IAoMtD,gBAAgB;IACA,MAAM,IAAI,QAAQ,CAAC,kBAAkB,CAAC;CAUvD"}
|
|
@@ -21,8 +21,8 @@ export declare class Booster extends Effector {
|
|
|
21
21
|
private driveValue;
|
|
22
22
|
/**
|
|
23
23
|
* This static method creates instance of `Float32Array` for `WaveShaperNode`.
|
|
24
|
-
* @param {number} drive This argument is drive level.
|
|
25
|
-
* @param {number} numberOfSamples This argument is curve size. The default is `48000`.
|
|
24
|
+
* @param {number} drive This argument is drive level. The default value is `1`.
|
|
25
|
+
* @param {number} numberOfSamples This argument is curve size. The default value is `48000`.
|
|
26
26
|
* @return {Float32Array|null} Return value is `WaveShaperNode`'s 'curve'.
|
|
27
27
|
*/
|
|
28
28
|
static createBoosterCurve(drive?: number, numberOfSamples?: number): BoosterCurve;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effector } from './Effector';
|
|
2
|
-
export type DistortionType = 'distortion' | 'metal' | 'core';
|
|
2
|
+
export type DistortionType = 'distortion' | 'blues' | 'metal' | 'core';
|
|
3
3
|
export type DistortionCurve = Float32Array<ArrayBuffer> | null;
|
|
4
4
|
export type DistortionParams = {
|
|
5
5
|
state?: boolean;
|
|
@@ -28,11 +28,12 @@ export declare class Distortion extends Effector {
|
|
|
28
28
|
private driveValue;
|
|
29
29
|
/**
|
|
30
30
|
* This static method creates instance of `Float32Array` for `WaveShaperNode`.
|
|
31
|
-
* @param {number} amount This argument is curve shape.
|
|
32
|
-
* @param {number} numberOfSamples This argument is curve size. The default is `48000`.
|
|
31
|
+
* @param {number} amount This argument is curve shape. The default value is `500`.
|
|
32
|
+
* @param {number} numberOfSamples This argument is curve size. The default value is `48000`.
|
|
33
|
+
* @param {boolean} asymmetrical This argument is asymmetrical clipping if this value is `true`. The default value is `false`
|
|
33
34
|
* @return {Float32Array|null} Return value is `WaveShaperNode`'s 'curve'.
|
|
34
35
|
*/
|
|
35
|
-
static createDistortionCurve(amount?: number, numberOfSamples?: number): DistortionCurve;
|
|
36
|
+
static createDistortionCurve(amount?: number, numberOfSamples?: number, asymmetrical?: boolean): DistortionCurve;
|
|
36
37
|
/**
|
|
37
38
|
* @param {AudioContext} context This argument is in order to use Web Audio API.
|
|
38
39
|
*/
|
|
@@ -1 +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,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;
|
|
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,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE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AAE,gBAAgB,GAAG,UAAU;IA4HlD,gBAAgB;IACA,MAAM,IAAI,QAAQ,CAAC,gBAAgB,CAAC;CAYrD"}
|
|
@@ -25,14 +25,14 @@ export declare class OverDrive extends Effector {
|
|
|
25
25
|
private numberOfSamples;
|
|
26
26
|
/**
|
|
27
27
|
* This static method creates instance of `Float32Array` for `WaveShaperNode`.
|
|
28
|
-
* @param {number} numberOfSamples This argument is curve size. The default is `1024`.
|
|
28
|
+
* @param {number} numberOfSamples This argument is curve size. The default value is `1024`.
|
|
29
29
|
* @return {Float32Array|null} Return value is `WaveShaperNode`'s 'curve'.
|
|
30
30
|
*/
|
|
31
31
|
static createNaturalOverdriveCurve(numberOfSamples?: number): OverDriveCurve;
|
|
32
32
|
/**
|
|
33
33
|
* This static method creates instance of `Float32Array` for `WaveShaperNode`.
|
|
34
34
|
* @param {number} drive This argument is drive level.
|
|
35
|
-
* @param {number} numberOfSamples This argument is curve size. The default is `1024`.
|
|
35
|
+
* @param {number} numberOfSamples This argument is curve size. The default value is `1024`.
|
|
36
36
|
* @param {boolean} asymmetrical This argument is asymmetrical clipping if this value is `true`. The default value is `false`
|
|
37
37
|
* @return {Float32Array|null} Return value is `WaveShaperNode`'s 'curve'.
|
|
38
38
|
*/
|