@audio/effect-pingpong 1.1.1 → 1.1.3

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/audio.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ // Generated from the audio.js manifest (params metadata is the source of truth).
2
+ // Regenerate: node tools/dts.js in @audio/compile. Do not edit by hand.
3
+
4
+ /** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
5
+ type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
6
+ /** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
7
+ type Live = Record<string, Float32Array | string | boolean>
8
+ type Ctx = { sampleRate: number, maxBlockSize: number, maxChannels: number, currentTime: number, duration?: number, events?: readonly any[], emit?: (name: string, ...args: any[]) => void, [k: string]: unknown }
9
+ type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
10
+
11
+ /** Chainable-host options for 'pingpong' */
12
+ export interface PingpongOptions {
13
+ /** 0.01..2 s (default 0.25) */
14
+ "time"?: Auto
15
+ /** 0..0.9 (default 0.4) */
16
+ "feedback"?: Auto
17
+ /** 0..1 (default 0.5) */
18
+ "mix"?: Auto
19
+ at?: number | string
20
+ duration?: number | string
21
+ }
22
+
23
+ export declare const pingpong: {
24
+ (ctx: Ctx): Process
25
+ channels: 2
26
+ tail: (ctx: { sampleRate: number, params: Live }) => number
27
+ params: {
28
+ /** 0.01..2 s (default 0.25) [restart] */
29
+ "time": { type: "number", default: 0.25 }
30
+ /** 0..0.9 (default 0.4) */
31
+ "feedback": { type: "number", default: 0.4 }
32
+ /** 0..1 (default 0.5) */
33
+ "mix": { type: "number", default: 0.5 }
34
+ }
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/effect-pingpong",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Ping-pong delay — stereo: left and right delays alternate",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -8,11 +8,15 @@
8
8
  "exports": {
9
9
  ".": "./ping-pong.js",
10
10
  "./package.json": "./package.json",
11
- "./atom": "./atom.js"
11
+ "./audio": {
12
+ "types": "./audio.d.ts",
13
+ "default": "./audio.js"
14
+ }
12
15
  },
13
16
  "files": [
14
17
  "ping-pong.js",
15
- "atom.js"
18
+ "audio.js",
19
+ "audio.d.ts"
16
20
  ],
17
21
  "keywords": [
18
22
  "audio",
@@ -37,5 +41,5 @@
37
41
  "publishConfig": {
38
42
  "access": "public"
39
43
  },
40
- "atom": "./atom.js"
44
+ "audio": "./audio.js"
41
45
  }
File without changes