@thi.ng/dsp 4.7.13 → 4.7.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-22T11:59:16Z
3
+ - **Last updated**: 2024-02-25T14:07:53Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/addg.d.ts CHANGED
@@ -10,7 +10,9 @@ import type { IGen } from "./api.js";
10
10
  *
11
11
  * @example
12
12
  * ```ts
13
- * addg(constant(1), 10).take(5)
13
+ * import { addG, constant } from "@thi.ng/dsp";
14
+ *
15
+ * addG(constant(1), 10).take(5)
14
16
  * // [ 10, 11, 12, 13, 14 ]
15
17
  * ```
16
18
  *
package/convert.d.ts CHANGED
@@ -34,6 +34,8 @@ export declare const radFreq: FnN2;
34
34
  *
35
35
  * @example
36
36
  * ```ts
37
+ * import { msFrames } from "@thi.ng/dsp";
38
+ *
37
39
  * // samples per 20 ms @ 44.1kHz
38
40
  * msFrames(20, 44100)
39
41
  * // 882
package/curve.d.ts CHANGED
@@ -17,6 +17,8 @@ import { MAdd } from "./madd.js";
17
17
  *
18
18
  * @example
19
19
  * ```ts
20
+ * import { curve } from "@thi.ng/dsp";
21
+ *
20
22
  * curve(-1, 1, 5, 0.1).take(7)
21
23
  * // [
22
24
  * // -1,
package/fft.d.ts CHANGED
@@ -29,6 +29,8 @@ export declare const copyComplex: (complex: ComplexArray) => ComplexArray;
29
29
  *
30
30
  * @example
31
31
  * ```ts
32
+ * import { conjugate } from "@thi.ng/dsp";
33
+ *
32
34
  * conjugate([0, 3, 2, 1], true)
33
35
  * // Float64Array [ 0, 3, 2, 1, 0, -1, -2, -3 ]
34
36
  *
@@ -44,6 +46,8 @@ export declare const copyComplex: (complex: ComplexArray) => ComplexArray;
44
46
  *
45
47
  * @example
46
48
  * ```ts
49
+ * import { conjugate, ifft } from "@thi.ng/dsp";
50
+ *
47
51
  * // generate single-period sine (window size = 16)
48
52
  * ifft(conjugate([0, -8, 0, 0, 0, 0, 0, 0]))[0]
49
53
  * // [
package/line.d.ts CHANGED
@@ -11,6 +11,8 @@ import { Add } from "./add.js";
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
+ * import { line } from "@thi.ng/dsp";
15
+ *
14
16
  * line(0, 1, 5).take(7)
15
17
  * // [ 0, 0.2, 0.4, 0.6, 0.8, 1, 1.2 ]
16
18
  * ```
package/osc.d.ts CHANGED
@@ -34,6 +34,8 @@ export declare const osc: (osc: StatelessOscillator, freq: IGen<number> | number
34
34
  *
35
35
  * @example
36
36
  * ```ts
37
+ * import { modOsc, osc, saw, sin, rect } from "@thi.ng/dsp";
38
+ *
37
39
  * // FM sin osc using rect osc as frequency modulator
38
40
  * modOsc(sin, 0.01, osc(rect, 0.1, 0.2))
39
41
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/dsp",
3
- "version": "4.7.13",
3
+ "version": "4.7.15",
4
4
  "description": "Composable signal generators, oscillators, filters, FFT, spectrum, windowing & related DSP utils",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,12 +36,12 @@
36
36
  "tool:diagrams": "bun tools/generate-diagrams.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.9.25",
39
+ "@thi.ng/api": "^8.9.26",
40
40
  "@thi.ng/checks": "^3.5.0",
41
41
  "@thi.ng/errors": "^2.4.18",
42
- "@thi.ng/math": "^5.10.2",
43
- "@thi.ng/random": "^3.6.32",
44
- "@thi.ng/transducers": "^8.9.5"
42
+ "@thi.ng/math": "^5.10.3",
43
+ "@thi.ng/random": "^3.6.33",
44
+ "@thi.ng/transducers": "^8.9.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@microsoft/api-extractor": "^7.40.1",
@@ -288,5 +288,5 @@
288
288
  ],
289
289
  "year": 2015
290
290
  },
291
- "gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n"
291
+ "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
292
292
  }
package/sweep.d.ts CHANGED
@@ -6,6 +6,8 @@
6
6
  *
7
7
  * @example
8
8
  * ```ts
9
+ * import { adsr, osc, sin, sweep } from "@thi.ng/dsp";
10
+ *
9
11
  * // render 2 sec osc sweep from 100 - 10000Hz
10
12
  * // FS = 44100
11
13
  * osc(