Merge branch 'main' into jade/orbitsynonym

This commit is contained in:
Jade (Rose) Rowland
2025-11-23 19:06:16 -05:00
3 changed files with 12 additions and 6 deletions
+2 -2
View File
@@ -238,8 +238,8 @@ export function repl({
pattern = eachTransform(pattern);
}
if (allTransforms.length) {
for (let i in allTransforms) {
pattern = allTransforms[i](pattern);
for (const transform of allTransforms) {
pattern = transform(pattern);
}
}
+8 -3
View File
@@ -238,7 +238,7 @@ export function createFilter(context, start, end, params, cps) {
if (sync != null) {
rate = cps * sync;
}
const lfoValues = { depth, dcoffset, skew, shape, frequency: rate };
const lfoValues = { depth, dcoffset, skew, shape, frequency: rate, min: 10, max: 20000 };
getParamLfo(context, frequencyParam, start, end, lfoValues);
return filter;
}
@@ -362,9 +362,9 @@ const mod = (freq, range = 1, type = 'sine') => {
}
osc.start();
const g = new GainNode(ctx, { gain: range });
const g = gainNode(range);
osc.connect(g); // -range, range
return { node: g, stop: (t) => osc.stop(t) };
return { node: g, stop: (t) => osc.stop(t), osc: osc };
};
const fm = (frequencyparam, harmonicityRatio, modulationIndex, wave = 'sine') => {
const carrfreq = frequencyparam.value;
@@ -416,6 +416,11 @@ export function applyFM(param, value, begin) {
modulator.connect(envGain);
envGain.connect(param);
}
fmmod.osc.onended = () => {
envGain.disconnect();
modulator.disconnect();
fmmod.osc.disconnect();
};
}
return { stop };
}
+2 -1
View File
@@ -543,8 +543,9 @@ class SuperSawOscillatorProcessor extends AudioWorkletProcessor {
if (pn >= 1.0) pn -= 1.0;
this.phase[n] = pn;
// invert right and left gain
const tmp = gainL;
gainL = gainR;
gainR = gainL;
gainR = tmp;
}
}
return true;