@audio/synth-chirp 1.1.3 → 1.1.4

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 +7 -5
  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 'chirp' */
@@ -28,12 +30,12 @@ export declare const chirp: {
28
30
  streaming: false
29
31
  params: {
30
32
  /** 1..20000 Hz (default 20) */
31
- "f0": { type: "number", default: 20 }
33
+ "f0": { type: "number", min: 1, max: 20000, default: 20, unit: "Hz", curve: "log" }
32
34
  /** 1..22050 Hz (default 20000) */
33
- "f1": { type: "number", default: 20000 }
35
+ "f1": { type: "number", min: 1, max: 22050, default: 20000, unit: "Hz", curve: "log" }
34
36
  /** default "exp" */
35
37
  "method": { type: "enum", values: ["exp","linear"], default: "exp" }
36
38
  /** 0..1 (default 0.9) */
37
- "amp": { type: "number", default: 0.9 }
39
+ "amp": { type: "number", min: 0, max: 1, default: 0.9 }
38
40
  }
39
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/synth-chirp",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Chirp — linear/exponential frequency sweep (ESS measurement signal, Farina 2000)",
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
  "chirp.js",
18
21
  "chirp.d.ts",