@audio/synth-drum 1.1.1 → 1.1.2

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 +79 -0
  2. package/package.json +7 -3
package/audio.d.ts ADDED
@@ -0,0 +1,79 @@
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 'cymbal' */
12
+ export interface CymbalOptions {
13
+ /** 100..800 Hz (default 200) */
14
+ "freq"?: Auto
15
+ /** 0..1 (default 0.5) */
16
+ "amp"?: Auto
17
+ at?: number | string
18
+ duration?: number | string
19
+ }
20
+
21
+ export declare const cymbal: {
22
+ (ctx: Ctx): Process
23
+ channels: {"inputs":[],"outputs":"any"}
24
+ streaming: false
25
+ params: {
26
+ /** 100..800 Hz (default 200) */
27
+ "freq": { type: "number", default: 200 }
28
+ /** 0..1 (default 0.5) */
29
+ "amp": { type: "number", default: 0.5 }
30
+ }
31
+ }
32
+
33
+ /** Chainable-host options for 'kick' */
34
+ export interface KickOptions {
35
+ /** 30..120 Hz (default 55) */
36
+ "freq"?: Auto
37
+ /** 1..8 (default 3) */
38
+ "drop"?: Auto
39
+ /** 0..1 (default 0.9) */
40
+ "amp"?: Auto
41
+ at?: number | string
42
+ duration?: number | string
43
+ }
44
+
45
+ export declare const kick: {
46
+ (ctx: Ctx): Process
47
+ channels: {"inputs":[],"outputs":"any"}
48
+ streaming: false
49
+ params: {
50
+ /** 30..120 Hz (default 55) */
51
+ "freq": { type: "number", default: 55 }
52
+ /** 1..8 (default 3) */
53
+ "drop": { type: "number", default: 3 }
54
+ /** 0..1 (default 0.9) */
55
+ "amp": { type: "number", default: 0.9 }
56
+ }
57
+ }
58
+
59
+ /** Chainable-host options for 'snare' */
60
+ export interface SnareOptions {
61
+ /** 0..1 (default 0.7) */
62
+ "amp"?: Auto
63
+ /** 1..65536 (default 9) */
64
+ "seed"?: Auto
65
+ at?: number | string
66
+ duration?: number | string
67
+ }
68
+
69
+ export declare const snare: {
70
+ (ctx: Ctx): Process
71
+ channels: {"inputs":[],"outputs":"any"}
72
+ streaming: false
73
+ params: {
74
+ /** 0..1 (default 0.7) */
75
+ "amp": { type: "number", default: 0.7 }
76
+ /** 1..65536 (default 9) */
77
+ "seed": { type: "number", default: 9 }
78
+ }
79
+ }
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "@audio/synth-drum",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Drum synthesis — membrane kick, metal cymbal, noise snare (Tone.js class)",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "main": "drum.js",
8
8
  "exports": {
9
9
  ".": "./drum.js",
10
- "./audio": "./audio.js",
10
+ "./audio": {
11
+ "types": "./audio.d.ts",
12
+ "default": "./audio.js"
13
+ },
11
14
  "./package.json": "./package.json"
12
15
  },
13
16
  "files": [
14
17
  "drum.js",
15
- "audio.js"
18
+ "audio.js",
19
+ "audio.d.ts"
16
20
  ],
17
21
  "keywords": [
18
22
  "audio",