@audio/synth-pluck 1.1.4 → 1.1.5

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.
Files changed (2) hide show
  1. package/audio.d.ts +8 -6
  2. package/package.json +4 -1
package/audio.d.ts CHANGED
@@ -1,11 +1,13 @@
1
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.
2
+ // Regenerate: node tools/dts.js in @audio/plugin. Do not edit by hand.
3
3
 
4
4
  /** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
5
5
  type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
6
6
  /** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
7
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 }
8
+ type Transport = Readonly<{ playing: boolean, bpm: number, beat: number, barStart: number, timeSig: [number, number] }>
9
+ /** What a host hands a processor it builds: the contract's Context (CONTRACT.d.ts, 1.0) */
10
+ type Ctx = { readonly sampleRate: number, readonly maxBlockSize: number, readonly maxChannels: number, readonly layouts?: { readonly inputs: readonly (string | undefined)[], readonly outputs: readonly (string | undefined)[] }, readonly params: Live, readonly buffers: Readonly<Record<string, Float32Array[] | undefined>>, readonly events?: readonly { time: number, kind: 'on' | 'off', midi: number, velocity: number, id: number }[], emit(name: string, value: number): void, readonly transport: Transport }
9
11
  type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
10
12
 
11
13
  /** Chainable-host options for 'pluck' */
@@ -28,12 +30,12 @@ export declare const pluck: {
28
30
  streaming: false
29
31
  params: {
30
32
  /** 20..4000 Hz (default 220) */
31
- "freq": { type: "number", default: 220 }
33
+ "freq": { type: "number", min: 20, max: 4000, default: 220, unit: "Hz", curve: "log" }
32
34
  /** 0.9..0.9999 (default 0.996) */
33
- "damp": { type: "number", default: 0.996 }
35
+ "damp": { type: "number", min: 0.9, max: 0.9999, default: 0.996 }
34
36
  /** 0..1 (default 0.7) */
35
- "amp": { type: "number", default: 0.7 }
37
+ "amp": { type: "number", min: 0, max: 1, default: 0.7 }
36
38
  /** 1..65536 (default 1) */
37
- "seed": { type: "number", default: 1 }
39
+ "seed": { type: "number", min: 1, max: 65536, default: 1, step: 1 }
38
40
  }
39
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/synth-pluck",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Karplus-Strong plucked string synthesis",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -13,6 +13,9 @@
13
13
  },
14
14
  "./package.json": "./package.json"
15
15
  },
16
+ "scripts": {
17
+ "prepublishOnly": "node ../../../compile/tools/tested.js"
18
+ },
16
19
  "files": [
17
20
  "pluck.js",
18
21
  "pluck.d.ts",