From 0c1e130fcf80bbc1957f2beb1744d7eee2d8a948 Mon Sep 17 00:00:00 2001 From: JulienH2000 Date: Wed, 6 Sep 2023 22:26:44 +0200 Subject: [PATCH] clamped resonance value --- src/classes/SoundEvent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/SoundEvent.ts b/src/classes/SoundEvent.ts index b6cb426..8dac007 100644 --- a/src/classes/SoundEvent.ts +++ b/src/classes/SoundEvent.ts @@ -106,7 +106,7 @@ export class SoundEvent extends AudibleEvent { public db = this.dbgain; public cutoff = (value: number) => this.updateValue("cutoff", value); public lpf = this.cutoff; - public resonance = (value: number) => this.updateValue("resonance", value*50); + public resonance = (value: number) => this.updateValue("resonance", value*50 => Math.min(Math.max(value, 0), 50); public lpq = this.resonance; public hcutoff = (value: number) => this.updateValue("hcutoff", value); public hpf = this.hcutoff;