mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-28 23:55:16 -04:00
Parity with other LFO (sync and dcoffset)
This commit is contained in:
@@ -132,10 +132,11 @@ export function getLfo(audioContext, begin, end, properties = {}) {
|
||||
}
|
||||
|
||||
export function getCustomLfo(audioContext, properties = {}) {
|
||||
// Extract some params we need for deriving other params
|
||||
// Default / process certain params
|
||||
const { shape = 0, ...props } = properties;
|
||||
const lfoprops = {
|
||||
shape: getModulationShapeInput(shape),
|
||||
dcoffset: -0.5,
|
||||
...props,
|
||||
};
|
||||
return getWorklet(audioContext, 'lfo-processor', lfoprops);
|
||||
|
||||
@@ -451,7 +451,7 @@ function connectLFO(idx, params, nodeTracker) {
|
||||
const depthValue = depthabs != null ? depthabs : depth * currentValue;
|
||||
const modParams = {
|
||||
...filteredParams,
|
||||
frequency: sync !== undefined ? sync / cps : rate,
|
||||
frequency: sync !== undefined ? sync * cps : rate,
|
||||
time: cycle / cps,
|
||||
depth: depthValue,
|
||||
min,
|
||||
|
||||
Reference in New Issue
Block a user