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 = {}) {
|
export function getCustomLfo(audioContext, properties = {}) {
|
||||||
// Extract some params we need for deriving other params
|
// Default / process certain params
|
||||||
const { shape = 0, ...props } = properties;
|
const { shape = 0, ...props } = properties;
|
||||||
const lfoprops = {
|
const lfoprops = {
|
||||||
shape: getModulationShapeInput(shape),
|
shape: getModulationShapeInput(shape),
|
||||||
|
dcoffset: -0.5,
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
return getWorklet(audioContext, 'lfo-processor', lfoprops);
|
return getWorklet(audioContext, 'lfo-processor', lfoprops);
|
||||||
|
|
|
||||||
|
|
@ -451,7 +451,7 @@ function connectLFO(idx, params, nodeTracker) {
|
||||||
const depthValue = depthabs != null ? depthabs : depth * currentValue;
|
const depthValue = depthabs != null ? depthabs : depth * currentValue;
|
||||||
const modParams = {
|
const modParams = {
|
||||||
...filteredParams,
|
...filteredParams,
|
||||||
frequency: sync !== undefined ? sync / cps : rate,
|
frequency: sync !== undefined ? sync * cps : rate,
|
||||||
time: cycle / cps,
|
time: cycle / cps,
|
||||||
depth: depthValue,
|
depth: depthValue,
|
||||||
min,
|
min,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue