@audio/shift-hybrid 1.2.0 → 1.2.1

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 +6 -4
  2. package/package.json +1 -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 'pitchHybrid' */
@@ -20,9 +22,9 @@ export declare const pitchHybrid: {
20
22
  (ctx: Ctx): Process
21
23
  channels: "any"
22
24
  streaming: false
23
- tail: (at: { sampleRate: number, params: Live, buffers: {} }) => number
25
+ tail: (at: { sampleRate: number, params: Live, buffers?: {}, transport: Transport }) => number
24
26
  params: {
25
27
  /** -24..24 st (default 0) */
26
- "semitones": { type: "number", default: 0 }
28
+ "semitones": { type: "number", min: -24, max: 24, default: 0, unit: "st" }
27
29
  }
28
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/shift-hybrid",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Hybrid pitch shift — runs phase-lock + WSOLA in parallel, crossfades by transient confidence",
5
5
  "type": "module",
6
6
  "sideEffects": false,