Merge branch 'main' into glossing/kabelsalat
This commit is contained in:
commit
7cff2050c8
2 changed files with 9 additions and 8 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(
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,9 @@ const getNodeParam = (node, name) => {
|
||||||
|
|
||||||
const controlTargets = getSuperdoughControlTargets();
|
const controlTargets = getSuperdoughControlTargets();
|
||||||
|
|
||||||
const getControlData = (control) => {
|
const getControlData = (control, subControl) => {
|
||||||
return controlTargets[control.split('_')[0]];
|
const controlNoIdx = control.split('_')[0];
|
||||||
|
return controlTargets[`${controlNoIdx}_${subControl}`] ?? controlTargets[controlNoIdx];
|
||||||
};
|
};
|
||||||
|
|
||||||
const getRangeForParam = (paramName, currentValue) => {
|
const getRangeForParam = (paramName, currentValue) => {
|
||||||
|
|
@ -59,8 +60,7 @@ const clampWithWaveShaper = (modulator, min, max) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getTargetParamsForControl = (control, nodes, subControl) => {
|
const getTargetParamsForControl = (control, nodes, subControl) => {
|
||||||
const lookupKey = subControl ? `${control}_${subControl}` : control;
|
const targetInfo = getControlData(control, subControl);
|
||||||
const targetInfo = getControlData(lookupKey) ?? getControlData(control);
|
|
||||||
if (!targetInfo) {
|
if (!targetInfo) {
|
||||||
errorLogger(
|
errorLogger(
|
||||||
new Error(`Could not find control data for target '${control}'. It may not be modulatable.`),
|
new Error(`Could not find control data for target '${control}'. It may not be modulatable.`),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue