fixing..
This commit is contained in:
parent
9416f317d4
commit
ccf2a6de52
2 changed files with 28 additions and 28 deletions
|
|
@ -343,41 +343,41 @@ function getDelay(orbit, delaytime, delayfeedback, t, channels) {
|
|||
return delays[orbit];
|
||||
}
|
||||
|
||||
// export function getLfo(audioContext, begin, end, properties = {}) {
|
||||
// const { shape = 0, ...props } = properties;
|
||||
// const { dcoffset = -0.5, depth = 1 } = properties;
|
||||
// return getWorklet(audioContext, 'lfo-processor', {
|
||||
// frequency: 1,
|
||||
// depth,
|
||||
// skew: 0,
|
||||
// phaseoffset: 0,
|
||||
// time: begin,
|
||||
// begin,
|
||||
// end,
|
||||
// shape: getModulationShapeInput(shape),
|
||||
// dcoffset,
|
||||
// min: dcoffset - depth * 0.5,
|
||||
// max: dcoffset + depth * 0.5,
|
||||
// curve: 1,
|
||||
// ...props,
|
||||
// });
|
||||
// }
|
||||
|
||||
export function getLfo(audioContext, time, end, properties = {}) {
|
||||
export function getLfo(audioContext, begin, end, properties = {}) {
|
||||
const { shape = 0, ...props } = properties;
|
||||
const { dcoffset = -0.5, depth = 1 } = properties;
|
||||
return getWorklet(audioContext, 'lfo-processor', {
|
||||
frequency: 1,
|
||||
depth: 1,
|
||||
depth,
|
||||
skew: 0,
|
||||
phaseoffset: 0,
|
||||
time,
|
||||
begin: time,
|
||||
time: begin,
|
||||
begin,
|
||||
end,
|
||||
shape: 1,
|
||||
dcoffset: -0.5,
|
||||
...properties,
|
||||
shape: getModulationShapeInput(shape),
|
||||
dcoffset,
|
||||
min: dcoffset - depth * 0.5,
|
||||
max: dcoffset + depth * 0.5,
|
||||
curve: 1,
|
||||
...props,
|
||||
});
|
||||
}
|
||||
|
||||
// export function getLfo(audioContext, time, end, properties = {}) {
|
||||
// return getWorklet(audioContext, 'lfo-processor', {
|
||||
// frequency: 1,
|
||||
// depth: 1,
|
||||
// skew: 0,
|
||||
// phaseoffset: 0,
|
||||
// time,
|
||||
// begin: time,
|
||||
// end,
|
||||
// shape: 1,
|
||||
// dcoffset: -0.5,
|
||||
// ...properties,
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
export function getSyncedLfo(audioContext, time, end, cps, cycle, properties = {}) {
|
||||
const frequency = cycle / cps;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ function getParamValue(block, param) {
|
|||
// }
|
||||
// }
|
||||
// registerProcessor('lfo-processor', LFOProcessor);
|
||||
// const waveShapeNames = Object.keys(waveshapes);
|
||||
const waveShapeNames = Object.keys(waveshapes);
|
||||
class LFOProcessor extends AudioWorkletProcessor {
|
||||
static get parameterDescriptors() {
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue