@audio/effect-ringmod 1.1.5 → 1.1.6
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/audio.js +3 -2
- package/package.json +4 -1
package/audio.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// atom manifest — wraps the ring-mod atom; pure oscillator multiply, no sizing
|
|
2
|
-
// params — every param stays live, per-channel state is just the running carrier phase
|
|
2
|
+
// params — every param stays live, per-channel state is just the running carrier phase,
|
|
3
|
+
// made here so the first block sets nothing up.
|
|
3
4
|
|
|
4
5
|
import ringModFn from './ring-mod.js'
|
|
5
6
|
|
|
6
7
|
export const ringmod = (ctx) => {
|
|
7
8
|
const chP = []
|
|
8
|
-
for (let c = 0, N = ctx.maxChannels ?? 8; c < N; c++) chP.push({ fs: ctx.sampleRate })
|
|
9
|
+
for (let c = 0, N = ctx.maxChannels ?? 8; c < N; c++) chP.push({ fs: ctx.sampleRate, _phase: 0 })
|
|
9
10
|
return (inputs, outputs, params) => {
|
|
10
11
|
const inp = inputs[0], out = outputs[0]
|
|
11
12
|
if (!inp || !inp.length) return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audio/effect-ringmod",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Ring modulator — multiplies signal by a carrier oscillator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"default": "./audio.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"prepublishOnly": "node ../../../compile/tools/tested.js"
|
|
18
|
+
},
|
|
16
19
|
"files": [
|
|
17
20
|
"ring-mod.js",
|
|
18
21
|
"audio.js",
|