@thi.ng/dsp 4.2.23 → 4.2.25
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/CHANGELOG.md +1 -1
- package/README.md +8 -11
- package/api.d.ts +7 -7
- package/package.json +14 -14
- package/pink-noise.d.ts +1 -1
- package/waveshaper.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
|
|
3
|
-
# 
|
|
3
|
+
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/dsp)
|
|
6
6
|

|
|
7
|
-
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
This project is part of the
|
|
10
10
|
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
|
|
@@ -35,7 +35,7 @@ This project is part of the
|
|
|
35
35
|
|
|
36
36
|
## About
|
|
37
37
|
|
|
38
|
-
Composable signal generators, oscillators, filters, FFT, spectrum, windowing & related DSP utils
|
|
38
|
+
Composable signal generators, oscillators, filters, FFT, spectrum, windowing & related DSP utils
|
|
39
39
|
|
|
40
40
|
Partially ported from other thi.ng projects (e.g.
|
|
41
41
|
[thi.ng/synstack](https://github.com/thi-ng/synstack),
|
|
@@ -79,14 +79,11 @@ ES module import:
|
|
|
79
79
|
|
|
80
80
|
For Node.js REPL:
|
|
81
81
|
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
node --experimental-repl-await
|
|
85
|
-
|
|
86
|
-
> const dsp = await import("@thi.ng/dsp");
|
|
82
|
+
```js
|
|
83
|
+
const dsp = await import("@thi.ng/dsp");
|
|
87
84
|
```
|
|
88
85
|
|
|
89
|
-
Package sizes (
|
|
86
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 6.84 KB
|
|
90
87
|
|
|
91
88
|
## Dependencies
|
|
92
89
|
|
|
@@ -569,7 +566,7 @@ Desmos](https://www.desmos.com/calculator/lkyf2ag3ta) to experiment.
|
|
|
569
566
|
|
|
570
567
|
## Authors
|
|
571
568
|
|
|
572
|
-
Karsten Schmidt
|
|
569
|
+
- [Karsten Schmidt](https://thi.ng)
|
|
573
570
|
|
|
574
571
|
If this project contributes to an academic publication, please cite it as:
|
|
575
572
|
|
|
@@ -584,4 +581,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
584
581
|
|
|
585
582
|
## License
|
|
586
583
|
|
|
587
|
-
© 2015 - 2022 Karsten Schmidt // Apache
|
|
584
|
+
© 2015 - 2022 Karsten Schmidt // Apache License 2.0
|
package/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FnN2, IDeref, NumericArray } from "@thi.ng/api";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type StatelessOscillator = (phase: number, freq: number, amp?: number, dc?: number, ...opts: any[]) => number;
|
|
3
|
+
export type ComplexArray = [NumericArray, NumericArray];
|
|
4
|
+
export type WindowFn = FnN2;
|
|
5
5
|
export interface IGen<T> extends Iterable<T>, IDeref<T> {
|
|
6
6
|
next(): T;
|
|
7
7
|
take(num: number, out?: T[], idx?: number): T[];
|
|
@@ -28,8 +28,8 @@ export interface IFilter {
|
|
|
28
28
|
*/
|
|
29
29
|
filterCoeffs(): FilterConfig;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
31
|
+
export type FilterType = "lp" | "hp" | "bp" | "notch" | "peak" | "loshelf" | "hishelf" | "all";
|
|
32
|
+
export type BiquadType = "lp" | "hp" | "bp" | "notch" | "peak" | "loshelf" | "hishelf";
|
|
33
|
+
export type OnepoleType = "lp" | "hp";
|
|
34
|
+
export type SVFType = "lp" | "hp" | "bp" | "notch" | "peak" | "all";
|
|
35
35
|
//# sourceMappingURL=api.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/dsp",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.25",
|
|
4
4
|
"description": "Composable signal generators, oscillators, filters, FFT, spectrum, windowing & related DSP utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"url": "https://patreon.com/thing_umbrella"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
|
-
"author": "Karsten Schmidt
|
|
24
|
+
"author": "Karsten Schmidt (https://thi.ng)",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && tsc --declaration",
|
|
28
|
-
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
|
|
28
|
+
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc internal",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
31
|
"doc:readme": "yarn doc:stats && tools:readme",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/checks": "^3.3.
|
|
39
|
-
"@thi.ng/errors": "^2.2.
|
|
40
|
-
"@thi.ng/math": "^5.3.
|
|
41
|
-
"@thi.ng/random": "^3.3.
|
|
42
|
-
"@thi.ng/transducers": "^8.3.
|
|
37
|
+
"@thi.ng/api": "^8.6.0",
|
|
38
|
+
"@thi.ng/checks": "^3.3.5",
|
|
39
|
+
"@thi.ng/errors": "^2.2.6",
|
|
40
|
+
"@thi.ng/math": "^5.3.16",
|
|
41
|
+
"@thi.ng/random": "^3.3.18",
|
|
42
|
+
"@thi.ng/transducers": "^8.3.26"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.33.
|
|
46
|
-
"@thi.ng/testament": "^0.3.
|
|
45
|
+
"@microsoft/api-extractor": "^7.33.7",
|
|
46
|
+
"@thi.ng/testament": "^0.3.7",
|
|
47
47
|
"rimraf": "^3.0.2",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.23.
|
|
50
|
-
"typescript": "^4.
|
|
49
|
+
"typedoc": "^0.23.22",
|
|
50
|
+
"typescript": "^4.9.4"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"allpass",
|
|
@@ -272,5 +272,5 @@
|
|
|
272
272
|
],
|
|
273
273
|
"year": 2015
|
|
274
274
|
},
|
|
275
|
-
"gitHead": "
|
|
275
|
+
"gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
|
|
276
276
|
}
|
package/pink-noise.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IReset, Tuple } from "@thi.ng/api";
|
|
2
2
|
import type { IRandom } from "@thi.ng/random";
|
|
3
3
|
import { AGen } from "./agen.js";
|
|
4
|
-
|
|
4
|
+
type PNoiseCoeffs = Tuple<number, 5>;
|
|
5
5
|
/**
|
|
6
6
|
* Pink noise generator with customizable frequency distribution. The
|
|
7
7
|
* default config produces a power spectrum roughly following the `1/f`
|
package/waveshaper.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Fn2 } from "@thi.ng/api";
|
|
2
2
|
import { AProc } from "./aproc.js";
|
|
3
|
-
export
|
|
3
|
+
export type WaveShaperFn = Fn2<number, number, number>;
|
|
4
4
|
/**
|
|
5
5
|
* Customizable wave shaper for user defined shaping function supporting
|
|
6
6
|
* one (optional, implementation specific) adjustable curve parameter.
|