update resonance parameter

This commit is contained in:
2023-10-23 21:42:35 +02:00
parent 818dfd0170
commit d62e1f6065
3 changed files with 16 additions and 13 deletions

View File

@ -136,8 +136,11 @@ export class SoundEvent extends AudibleEvent {
public lpr = this.lprelease;
public cutoff = (value: number) => this.updateValue("cutoff", value);
public lpf = this.cutoff;
public resonance = (value: number) =>
this.updateValue("resonance", Math.min(Math.max(value, 0), 50));
public resonance = (value: number) => {
if (value >= 0 || value <= 1) {
this.updateValue("resonance", 50 * Math.min(Math.max(value, 0), 1));
}
}
public lpq = this.resonance;
public lpadsr = (
depth: number,