@audio/effect-exciter 1.1.2 → 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.
- package/README.md +33 -0
- package/audio.d.ts +34 -0
- package/exciter.d.ts +17 -0
- package/package.json +11 -4
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @audio/effect-exciter [](https://www.npmjs.com/package/@audio/effect-exciter) [](https://github.com/krishnized/license)
|
|
2
|
+
|
|
3
|
+
Exciter — psychoacoustic harmonic synthesis for presence/air
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npm install @audio/effect-exciter
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import exciter from '@audio/effect-exciter'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Aphex-style aural exciter. Extracts the high band via SVF highpass, runs it through tanh saturation to synthesize harmonics, then mixes the harmonic residue back into the dry signal. Adds perceived "air" and "presence" without EQ boost.
|
|
14
|
+
|
|
15
|
+
**`freq`** highpass cutoff Hz (default 3000) · **`drive`** saturation amount 0–1 (default 0.5, maps to 1–10× gain) · **`amount`** mix-in level 0–1 (default 0.5) · **`fs`** sample rate
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { exciter } from '@audio/effect'
|
|
19
|
+
|
|
20
|
+
let p = { freq: 4000, drive: 0.6, amount: 0.4, fs: 44100 }
|
|
21
|
+
for (let buf of stream) exciter(buf, p)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Use when**: dull vocals, lifeless cymbals, mastering polish, restoring high-end after compression<br>
|
|
25
|
+
**Not for**: spectral shaping (use a shelf/EQ from `@audio/filter`) — exciter *adds* harmonics, not gain
|
|
26
|
+
|
|
27
|
+
<!--  -->
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
Part of [@audio/effect](https://github.com/audiojs/effect) — the effect family umbrella. This README is generated from the umbrella docs.
|
|
32
|
+
|
|
33
|
+
MIT © [audiojs](https://github.com/audiojs)
|
package/audio.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 'exciter' */
|
|
12
|
+
export interface ExciterOptions {
|
|
13
|
+
/** 500..8000 Hz (default 3000) */
|
|
14
|
+
"freq"?: Auto
|
|
15
|
+
/** 0..1 (default 0.5) */
|
|
16
|
+
"drive"?: Auto
|
|
17
|
+
/** 0..1 (default 0.5) */
|
|
18
|
+
"amount"?: Auto
|
|
19
|
+
at?: number | string
|
|
20
|
+
duration?: number | string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare const exciter: {
|
|
24
|
+
(ctx: Ctx): Process
|
|
25
|
+
channels: "any"
|
|
26
|
+
params: {
|
|
27
|
+
/** 500..8000 Hz (default 3000) */
|
|
28
|
+
"freq": { type: "number", default: 3000 }
|
|
29
|
+
/** 0..1 (default 0.5) */
|
|
30
|
+
"drive": { type: "number", default: 0.5 }
|
|
31
|
+
/** 0..1 (default 0.5) */
|
|
32
|
+
"amount": { type: "number", default: 0.5 }
|
|
33
|
+
}
|
|
34
|
+
}
|
package/exciter.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Exciter — Aphex-style aural exciter; SVF highpass extracts the high band, tanh saturation synthesizes harmonics, mixed back into dry. */
|
|
2
|
+
export interface ExciterOptions {
|
|
3
|
+
/** highpass cutoff, Hz, default 3000 */
|
|
4
|
+
freq?: number
|
|
5
|
+
/** saturation amount, 0–1, maps to 1×–10× gain, default 0.5 */
|
|
6
|
+
drive?: number
|
|
7
|
+
/** mix-in level, 0–1, default 0.5 */
|
|
8
|
+
amount?: number
|
|
9
|
+
/** sample rate, default 44100 */
|
|
10
|
+
fs?: number
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Mutates `data` in place and returns the same reference. Pass the same params
|
|
15
|
+
* object across calls — the SVF integrator state persists on it (`_lp`, `_bp`).
|
|
16
|
+
*/
|
|
17
|
+
export default function exciter(data: Float32Array, params?: ExciterOptions): Float32Array
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/effect-exciter",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Exciter — psychoacoustic harmonic synthesis for presence/air",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -8,11 +8,16 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./exciter.js",
|
|
10
10
|
"./package.json": "./package.json",
|
|
11
|
-
"./audio":
|
|
11
|
+
"./audio": {
|
|
12
|
+
"types": "./audio.d.ts",
|
|
13
|
+
"default": "./audio.js"
|
|
14
|
+
}
|
|
12
15
|
},
|
|
13
16
|
"files": [
|
|
14
17
|
"exciter.js",
|
|
15
|
-
"audio.js"
|
|
18
|
+
"audio.js",
|
|
19
|
+
"audio.d.ts",
|
|
20
|
+
"exciter.d.ts"
|
|
16
21
|
],
|
|
17
22
|
"keywords": [
|
|
18
23
|
"audio",
|
|
@@ -37,5 +42,7 @@
|
|
|
37
42
|
"publishConfig": {
|
|
38
43
|
"access": "public"
|
|
39
44
|
},
|
|
40
|
-
"
|
|
45
|
+
"types": "exciter.d.ts",
|
|
46
|
+
"audio": "./audio.js",
|
|
47
|
+
"funding": "https://github.com/sponsors/audiojs"
|
|
41
48
|
}
|