From 18640d59daca002cc8260f46cffcb9915bcc40aa Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 03:00:49 +0200 Subject: [PATCH] acid party --- packages/core/controls.mjs | 1 + packages/superdough/helpers.mjs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index ce08fc68..268638cb 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -390,6 +390,7 @@ const generic_params = [ ['bpdecay', 'bpd'], ['bpsustain', 'bps'], ['bprelease', 'bpr'], + ['order'], /** * Applies the cutoff frequency of the **h**igh-**p**ass **f**ilter. * diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index d58f2355..45162a36 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -74,7 +74,7 @@ export const getParamADSR = (param, attack, decay, sustain, release, min, max, b param.linearRampToValueAtTime(peak, begin + attack); param.linearRampToValueAtTime(sustainLevel, begin + attack + decay); param.setValueAtTime(sustainLevel, end); - param.linearRampToValueAtTime(min, end + release); + param.linearRampToValueAtTime(min, end + Math.max(release, 0.1)); }; export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, start, end) {