mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
fix def skew
This commit is contained in:
@@ -346,10 +346,10 @@ function getDelay(orbit, delaytime, delayfeedback, t, channels) {
|
||||
export function getLfo(audioContext, begin, end, properties = {}) {
|
||||
const { shape = 0, ...props } = properties;
|
||||
const { dcoffset = -0.5, depth = 1 } = properties;
|
||||
return getWorklet(audioContext, 'lfo-processor', {
|
||||
const lfoprops = {
|
||||
frequency: 1,
|
||||
depth,
|
||||
skew: 0,
|
||||
skew: .5,
|
||||
phaseoffset: 0,
|
||||
time: begin,
|
||||
begin,
|
||||
@@ -360,7 +360,10 @@ export function getLfo(audioContext, begin, end, properties = {}) {
|
||||
max: dcoffset + depth * 0.5,
|
||||
curve: 1,
|
||||
...props,
|
||||
});
|
||||
}
|
||||
|
||||
console.info(lfoprops)
|
||||
return getWorklet(audioContext, 'lfo-processor', lfoprops);
|
||||
}
|
||||
|
||||
// export function getLfo(audioContext, time, end, properties = {}) {
|
||||
|
||||
@@ -279,7 +279,7 @@ export function registerSynthSounds() {
|
||||
getParamADSR(envGain.gain, attack, decay, sustain, release, 0, 1, begin, holdend, 'linear');
|
||||
let lfo;
|
||||
if (pwsweep != 0) {
|
||||
lfo = getLfo(ac, begin, end, { frequency: pwrate, depth: pwsweep });
|
||||
lfo = getLfo(ac, begin, end, { frequency: pwrate, depth: pwsweep, skew: .5, dcoffset: 0 });
|
||||
lfo.connect(o.parameters.get('pulsewidth'));
|
||||
}
|
||||
let timeoutNode = webAudioTimeout(
|
||||
|
||||
@@ -185,6 +185,8 @@ class LFOProcessor extends AudioWorkletProcessor {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const output = outputs[0];
|
||||
const frequency = parameters['frequency'][0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user