Merge pull request 'Bug Fix: Allow penv values to be falsy' (#1559) from glossing/strudel:glossing/penv-with-zeros into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1559
This commit is contained in:
commit
e762291bb7
1 changed files with 1 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ let curves = ['linear', 'exponential'];
|
||||||
export function getPitchEnvelope(param, value, t, holdEnd) {
|
export function getPitchEnvelope(param, value, t, holdEnd) {
|
||||||
// envelope is active when any of these values is set
|
// envelope is active when any of these values is set
|
||||||
const hasEnvelope = value.pattack ?? value.pdecay ?? value.psustain ?? value.prelease ?? value.penv;
|
const hasEnvelope = value.pattack ?? value.pdecay ?? value.psustain ?? value.prelease ?? value.penv;
|
||||||
if (!hasEnvelope) {
|
if (hasEnvelope === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const penv = nanFallback(value.penv, 1, true);
|
const penv = nanFallback(value.penv, 1, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue