@audio/effect-subbass 1.1.4 → 1.1.5
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/package.json +6 -3
- package/subbass.d.ts +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/effect-subbass",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Psychoacoustic bass enhancer — harmonic synthesis below cutoff (MaxxBass/RBass class)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,15 +27,18 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"subbass.js",
|
|
29
29
|
"audio.js",
|
|
30
|
-
"audio.d.ts"
|
|
30
|
+
"audio.d.ts",
|
|
31
|
+
"subbass.d.ts"
|
|
31
32
|
],
|
|
32
33
|
"publishConfig": {
|
|
33
34
|
"access": "public"
|
|
34
35
|
},
|
|
36
|
+
"types": "subbass.d.ts",
|
|
35
37
|
"audio": "./audio.js",
|
|
36
38
|
"repository": {
|
|
37
39
|
"type": "git",
|
|
38
40
|
"url": "git+https://github.com/audiojs/effect.git",
|
|
39
41
|
"directory": "packages/effect-subbass"
|
|
40
|
-
}
|
|
42
|
+
},
|
|
43
|
+
"funding": "https://github.com/sponsors/audiojs"
|
|
41
44
|
}
|
package/subbass.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Psychoacoustic bass enhancer (MaxxBass/RBass class) — extracts the band below
|
|
3
|
+
* `freq`, generates its harmonic series with an even/odd waveshaper, band-limits
|
|
4
|
+
* the harmonics to the audible low-mids, and mixes against dry. Small speakers
|
|
5
|
+
* reproduce the harmonics; the ear reconstructs the missing fundamental.
|
|
6
|
+
*/
|
|
7
|
+
export interface SubbassOptions {
|
|
8
|
+
/** sub cutoff, Hz — harmonics built from below this, default 80 */
|
|
9
|
+
freq?: number
|
|
10
|
+
/** harmonic level, 0–1, default 0.5 */
|
|
11
|
+
amount?: number
|
|
12
|
+
/** waveshaper intensity, 0–1, default 0.5 */
|
|
13
|
+
drive?: number
|
|
14
|
+
/** how much original sub to keep, 0–1, 0 = replace entirely, default 1 */
|
|
15
|
+
keep?: number
|
|
16
|
+
/** sample rate, default 44100 */
|
|
17
|
+
fs?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Mutates `data` in place and returns the same reference. Pass the same params
|
|
22
|
+
* object across calls — the sub-extraction and harmonic-band filter state persist
|
|
23
|
+
* on it (`_sub`, `_out`, `_dc`).
|
|
24
|
+
*/
|
|
25
|
+
export default function subbass(data: Float32Array, params?: SubbassOptions): Float32Array
|