@thi.ng/colored-noise 0.3.3 → 0.3.6
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 +1 -1
- package/blue.d.ts +3 -3
- package/blue.js +3 -3
- package/green.d.ts +3 -3
- package/green.js +3 -3
- package/package.json +21 -21
- package/pink.d.ts +3 -3
- package/pink.js +3 -3
- package/red.d.ts +3 -3
- package/red.js +3 -3
- package/violet.d.ts +3 -3
- package/violet.js +3 -3
- package/white.d.ts +2 -2
- package/white.js +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/blue.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { INorm } from "@thi.ng/random";
|
|
|
2
2
|
/**
|
|
3
3
|
* High-pass filtered noise. Opposite of {@link red}.
|
|
4
4
|
*
|
|
5
|
-
* @param n
|
|
6
|
-
* @param scale
|
|
7
|
-
* @param rnd
|
|
5
|
+
* @param n -
|
|
6
|
+
* @param scale -
|
|
7
|
+
* @param rnd -
|
|
8
8
|
*/
|
|
9
9
|
export declare function blue(n?: number, scale?: number, rnd?: INorm): Generator<number, void, unknown>;
|
|
10
10
|
//# sourceMappingURL=blue.d.ts.map
|
package/blue.js
CHANGED
|
@@ -3,9 +3,9 @@ import { preseed, sum } from "./utils.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* High-pass filtered noise. Opposite of {@link red}.
|
|
5
5
|
*
|
|
6
|
-
* @param n
|
|
7
|
-
* @param scale
|
|
8
|
-
* @param rnd
|
|
6
|
+
* @param n -
|
|
7
|
+
* @param scale -
|
|
8
|
+
* @param rnd -
|
|
9
9
|
*/
|
|
10
10
|
export function* blue(n = 2, scale = 1, rnd = SYSTEM) {
|
|
11
11
|
const state = preseed(n, scale, rnd);
|
package/green.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import type { INorm } from "@thi.ng/random";
|
|
|
3
3
|
* Band-pass filtered noise (interleaved blue noise). Opposite of
|
|
4
4
|
* {@link violet}.
|
|
5
5
|
*
|
|
6
|
-
* @param n
|
|
7
|
-
* @param scale
|
|
8
|
-
* @param rnd
|
|
6
|
+
* @param n -
|
|
7
|
+
* @param scale -
|
|
8
|
+
* @param rnd -
|
|
9
9
|
*/
|
|
10
10
|
export declare const green: (n?: number, scale?: number, rnd?: INorm) => Generator<number, void, unknown>;
|
|
11
11
|
//# sourceMappingURL=green.d.ts.map
|
package/green.js
CHANGED
|
@@ -5,8 +5,8 @@ import { interleave } from "./utils.js";
|
|
|
5
5
|
* Band-pass filtered noise (interleaved blue noise). Opposite of
|
|
6
6
|
* {@link violet}.
|
|
7
7
|
*
|
|
8
|
-
* @param n
|
|
9
|
-
* @param scale
|
|
10
|
-
* @param rnd
|
|
8
|
+
* @param n -
|
|
9
|
+
* @param scale -
|
|
10
|
+
* @param rnd -
|
|
11
11
|
*/
|
|
12
12
|
export const green = (n = 2, scale = 1, rnd = SYSTEM) => interleave(blue(n, scale, rnd), blue(n, scale, rnd));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/colored-noise",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Customizable O(1) ES6 generators for colored noise",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/binary": "^3.
|
|
38
|
-
"@thi.ng/random": "^3.2.
|
|
37
|
+
"@thi.ng/binary": "^3.2.2",
|
|
38
|
+
"@thi.ng/random": "^3.2.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@microsoft/api-extractor": "^7.
|
|
42
|
-
"@thi.ng/api": "^8.3.
|
|
43
|
-
"@thi.ng/dsp": "^4.1
|
|
44
|
-
"@thi.ng/dsp-io-wav": "^2.1.
|
|
45
|
-
"@thi.ng/testament": "^0.2.
|
|
46
|
-
"@thi.ng/text-canvas": "^2.2
|
|
47
|
-
"@thi.ng/transducers": "^8.
|
|
48
|
-
"@thi.ng/vectors": "^7.
|
|
41
|
+
"@microsoft/api-extractor": "^7.23.1",
|
|
42
|
+
"@thi.ng/api": "^8.3.6",
|
|
43
|
+
"@thi.ng/dsp": "^4.2.1",
|
|
44
|
+
"@thi.ng/dsp-io-wav": "^2.1.7",
|
|
45
|
+
"@thi.ng/testament": "^0.2.6",
|
|
46
|
+
"@thi.ng/text-canvas": "^2.3.2",
|
|
47
|
+
"@thi.ng/transducers": "^8.3.2",
|
|
48
|
+
"@thi.ng/vectors": "^7.5.3",
|
|
49
49
|
"rimraf": "^3.0.2",
|
|
50
50
|
"tools": "^0.0.1",
|
|
51
|
-
"typedoc": "^0.22.
|
|
52
|
-
"typescript": "^4.
|
|
51
|
+
"typedoc": "^0.22.15",
|
|
52
|
+
"typescript": "^4.6.4"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"1d",
|
|
@@ -79,25 +79,25 @@
|
|
|
79
79
|
],
|
|
80
80
|
"exports": {
|
|
81
81
|
".": {
|
|
82
|
-
"
|
|
82
|
+
"default": "./index.js"
|
|
83
83
|
},
|
|
84
84
|
"./blue": {
|
|
85
|
-
"
|
|
85
|
+
"default": "./blue.js"
|
|
86
86
|
},
|
|
87
87
|
"./green": {
|
|
88
|
-
"
|
|
88
|
+
"default": "./green.js"
|
|
89
89
|
},
|
|
90
90
|
"./pink": {
|
|
91
|
-
"
|
|
91
|
+
"default": "./pink.js"
|
|
92
92
|
},
|
|
93
93
|
"./red": {
|
|
94
|
-
"
|
|
94
|
+
"default": "./red.js"
|
|
95
95
|
},
|
|
96
96
|
"./violet": {
|
|
97
|
-
"
|
|
97
|
+
"default": "./violet.js"
|
|
98
98
|
},
|
|
99
99
|
"./white": {
|
|
100
|
-
"
|
|
100
|
+
"default": "./white.js"
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
"thi.ng": {
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
],
|
|
109
109
|
"year": 2015
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "cf084be5fd5932226054d2dd32bad35481379f5d\n"
|
|
112
112
|
}
|
package/pink.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ import type { INorm } from "@thi.ng/random";
|
|
|
11
11
|
* - https://www.dsprelated.com/showarticle/908.php
|
|
12
12
|
* - https://www.firstpr.com.au/dsp/pink-noise/#Voss-McCartney
|
|
13
13
|
*
|
|
14
|
-
* @param n
|
|
15
|
-
* @param scale
|
|
16
|
-
* @param rnd
|
|
14
|
+
* @param n -
|
|
15
|
+
* @param scale -
|
|
16
|
+
* @param rnd -
|
|
17
17
|
*/
|
|
18
18
|
export declare function pink(n?: number, scale?: number, rnd?: INorm): Generator<number, void, unknown>;
|
|
19
19
|
//# sourceMappingURL=pink.d.ts.map
|
package/pink.js
CHANGED
|
@@ -13,9 +13,9 @@ import { preseed, sum } from "./utils.js";
|
|
|
13
13
|
* - https://www.dsprelated.com/showarticle/908.php
|
|
14
14
|
* - https://www.firstpr.com.au/dsp/pink-noise/#Voss-McCartney
|
|
15
15
|
*
|
|
16
|
-
* @param n
|
|
17
|
-
* @param scale
|
|
18
|
-
* @param rnd
|
|
16
|
+
* @param n -
|
|
17
|
+
* @param scale -
|
|
18
|
+
* @param rnd -
|
|
19
19
|
*/
|
|
20
20
|
export function* pink(n = 8, scale = 1, rnd = SYSTEM) {
|
|
21
21
|
const state = preseed(n, scale, rnd);
|
package/red.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { INorm } from "@thi.ng/random";
|
|
|
2
2
|
/**
|
|
3
3
|
* Low-pass filtered noise (same as brown noise). Opposite of {@link blue}.
|
|
4
4
|
*
|
|
5
|
-
* @param n
|
|
6
|
-
* @param scale
|
|
7
|
-
* @param rnd
|
|
5
|
+
* @param n -
|
|
6
|
+
* @param scale -
|
|
7
|
+
* @param rnd -
|
|
8
8
|
*/
|
|
9
9
|
export declare function red(n?: number, scale?: number, rnd?: INorm): Generator<number, void, unknown>;
|
|
10
10
|
//# sourceMappingURL=red.d.ts.map
|
package/red.js
CHANGED
|
@@ -3,9 +3,9 @@ import { preseed, sum } from "./utils.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Low-pass filtered noise (same as brown noise). Opposite of {@link blue}.
|
|
5
5
|
*
|
|
6
|
-
* @param n
|
|
7
|
-
* @param scale
|
|
8
|
-
* @param rnd
|
|
6
|
+
* @param n -
|
|
7
|
+
* @param scale -
|
|
8
|
+
* @param rnd -
|
|
9
9
|
*/
|
|
10
10
|
export function* red(n = 2, scale = 1, rnd = SYSTEM) {
|
|
11
11
|
const state = preseed(n, scale, rnd);
|
package/violet.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { INorm } from "@thi.ng/random";
|
|
|
2
2
|
/**
|
|
3
3
|
* Band-stop filtered noise (interleaved red noise). Opposite of {@link green}.
|
|
4
4
|
*
|
|
5
|
-
* @param n
|
|
6
|
-
* @param scale
|
|
7
|
-
* @param rnd
|
|
5
|
+
* @param n -
|
|
6
|
+
* @param scale -
|
|
7
|
+
* @param rnd -
|
|
8
8
|
*/
|
|
9
9
|
export declare const violet: (n?: number, scale?: number, rnd?: INorm) => Generator<number, void, unknown>;
|
|
10
10
|
//# sourceMappingURL=violet.d.ts.map
|
package/violet.js
CHANGED
|
@@ -4,8 +4,8 @@ import { interleave } from "./utils.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Band-stop filtered noise (interleaved red noise). Opposite of {@link green}.
|
|
6
6
|
*
|
|
7
|
-
* @param n
|
|
8
|
-
* @param scale
|
|
9
|
-
* @param rnd
|
|
7
|
+
* @param n -
|
|
8
|
+
* @param scale -
|
|
9
|
+
* @param rnd -
|
|
10
10
|
*/
|
|
11
11
|
export const violet = (n = 2, scale = 1, rnd = SYSTEM) => interleave(red(n, scale, rnd), red(n, scale, rnd));
|
package/white.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { INorm } from "@thi.ng/random";
|
|
|
3
3
|
* Unfiltered noise w/ uniform distribution. Merely yields samples from
|
|
4
4
|
* given PRNG.
|
|
5
5
|
*
|
|
6
|
-
* @param scale
|
|
7
|
-
* @param rnd
|
|
6
|
+
* @param scale -
|
|
7
|
+
* @param rnd -
|
|
8
8
|
*/
|
|
9
9
|
export declare function white(scale?: number, rnd?: INorm): Generator<number, void, unknown>;
|
|
10
10
|
//# sourceMappingURL=white.d.ts.map
|
package/white.js
CHANGED
|
@@ -3,8 +3,8 @@ import { SYSTEM } from "@thi.ng/random/system";
|
|
|
3
3
|
* Unfiltered noise w/ uniform distribution. Merely yields samples from
|
|
4
4
|
* given PRNG.
|
|
5
5
|
*
|
|
6
|
-
* @param scale
|
|
7
|
-
* @param rnd
|
|
6
|
+
* @param scale -
|
|
7
|
+
* @param rnd -
|
|
8
8
|
*/
|
|
9
9
|
export function* white(scale = 1, rnd = SYSTEM) {
|
|
10
10
|
while (true) {
|