Make the scaling by freq in FM a separate node so that modulators behave like the fm control
This commit is contained in:
parent
e26040d154
commit
f6a43f1b10
1 changed files with 5 additions and 4 deletions
|
|
@ -461,10 +461,11 @@ export function applyFM(param, value, begin) {
|
||||||
nodes[`fm_${idx}`] = [osc];
|
nodes[`fm_${idx}`] = [osc];
|
||||||
}
|
}
|
||||||
const { input, output, freq, osc, toCleanup } = fms[idx];
|
const { input, output, freq, osc, toCleanup } = fms[idx];
|
||||||
const g = gainNode(amt * freq);
|
const gAmt = gainNode(amt);
|
||||||
io.push(isMod ? output.connect(g) : input);
|
const gFreq = gainNode(freq);
|
||||||
cleanupOnEnd(osc, [...toCleanup, g]);
|
io.push(isMod ? output.connect(gAmt).connect(gFreq) : input);
|
||||||
nodes[`fm_${idx}_gain`] = [g];
|
cleanupOnEnd(osc, [...toCleanup, gAmt, gFreq]);
|
||||||
|
nodes[`fm_${idx}_gain`] = [gAmt];
|
||||||
}
|
}
|
||||||
if (!io[1]) {
|
if (!io[1]) {
|
||||||
logger(
|
logger(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue