Parity with other LFO (sync and dcoffset)
This commit is contained in:
parent
ef2ee0969a
commit
11e3da0552
2 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue