@audio/synth-risset 1.1.2 → 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.
Files changed (3) hide show
  1. package/README.md +32 -0
  2. package/package.json +10 -2
  3. package/risset.d.ts +12 -0
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @audio/synth-risset [![npm](https://img.shields.io/npm/v/@audio/synth-risset)](https://www.npmjs.com/package/@audio/synth-risset) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)
2
+
3
+ Risset drum (inharmonic bell-drum)
4
+
5
+ ```
6
+ npm install @audio/synth-risset
7
+ ```
8
+
9
+ ```js
10
+ import risset from '@audio/synth-risset'
11
+ ```
12
+
13
+ Risset drum: a fixed set of five inharmonic partials plus a sub-sine an octave below with slower decay, a simplified take on Risset's classic bell-drum catalogue. Amplitude-normalized to `amp` at the peak. Pitched — `(freq, opts)`.
14
+
15
+ ```js
16
+ risset(100, { duration: 1.2 }) // → Float32Array
17
+ ```
18
+
19
+ | Param | Default | |
20
+ |---|---|---|
21
+ | `freq` | — | Hz (positional) |
22
+ | `duration` | `1.2` | Seconds |
23
+ | `amp` | `0.6` | Peak amplitude (post-normalization) |
24
+ | `fs` | `44100` | Sample rate |
25
+
26
+ **Use when:** a cheap inharmonic drum/bell hybrid distinct from the literature-grounded [`synth-modal`](https://github.com/audiojs/synth/tree/main/packages/synth-modal).
27
+
28
+ ---
29
+
30
+ Part of [@audio/synth](https://github.com/audiojs/synth) — the synth family umbrella.
31
+
32
+ MIT © [audiojs](https://github.com/audiojs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/synth-risset",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Risset drum — inharmonic partial set with exponential decay",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -15,9 +15,11 @@
15
15
  },
16
16
  "files": [
17
17
  "risset.js",
18
+ "risset.d.ts",
18
19
  "audio.js",
19
20
  "audio.d.ts"
20
21
  ],
22
+ "types": "risset.d.ts",
21
23
  "keywords": [
22
24
  "audio",
23
25
  "dsp",
@@ -32,5 +34,11 @@
32
34
  "publishConfig": {
33
35
  "access": "public"
34
36
  },
35
- "audio": "./audio.js"
37
+ "audio": "./audio.js",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/audiojs/synth.git",
41
+ "directory": "packages/synth-risset"
42
+ },
43
+ "funding": "https://github.com/sponsors/audiojs"
36
44
  }
package/risset.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /** Risset drum — inharmonic partials + octave-below sub-sine, simplified bell-drum catalogue. */
2
+ export interface RissetOptions {
3
+ /** sample rate, default 44100 */
4
+ fs?: number
5
+ /** seconds, default 1.2 */
6
+ duration?: number
7
+ /** peak amplitude (post-normalization), default 0.6 */
8
+ amp?: number
9
+ }
10
+
11
+ /** freq: Hz (positional) */
12
+ export default function risset(freq?: number, options?: RissetOptions): Float32Array