mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-19 01:28:28 +00:00
fix: format
This commit is contained in:
parent
83c820a18c
commit
d582bbbb60
@ -10,15 +10,18 @@ const setRelease = (param, phase, sustain, startTime, endTime, endValue, curve =
|
|||||||
param[ramp](endValue, endTime);
|
param[ramp](endValue, endTime);
|
||||||
} else if (param.cancelAndHoldAtTime == null) {
|
} else if (param.cancelAndHoldAtTime == null) {
|
||||||
//this replicates cancelAndHoldAtTime behavior for Firefox
|
//this replicates cancelAndHoldAtTime behavior for Firefox
|
||||||
setTimeout(() => {
|
setTimeout(
|
||||||
//sustain at current value
|
() => {
|
||||||
const currValue = param.value;
|
//sustain at current value
|
||||||
param.cancelScheduledValues(0);
|
const currValue = param.value;
|
||||||
param.setValueAtTime(currValue, 0);
|
param.cancelScheduledValues(0);
|
||||||
|
param.setValueAtTime(currValue, 0);
|
||||||
|
|
||||||
//release
|
//release
|
||||||
param[ramp](endValue, endTime);
|
param[ramp](endValue, endTime);
|
||||||
}, (startTime - ctx.currentTime) * 1000);
|
},
|
||||||
|
(startTime - ctx.currentTime) * 1000,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
//stop the envelope, hold the value, and then set the release stage
|
//stop the envelope, hold the value, and then set the release stage
|
||||||
param.cancelAndHoldAtTime(startTime);
|
param.cancelAndHoldAtTime(startTime);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user