Merge pull request #39 from JulienH2000/fixReso

scaled Resonance to 0->1
This commit is contained in:
Raphaël Forment
2023-09-06 21:27:47 +01:00
committed by GitHub

View File

@ -106,7 +106,7 @@ export class SoundEvent extends AudibleEvent {
public db = this.dbgain; public db = this.dbgain;
public cutoff = (value: number) => this.updateValue("cutoff", value); public cutoff = (value: number) => this.updateValue("cutoff", value);
public lpf = this.cutoff; public lpf = this.cutoff;
public resonance = (value: number) => this.updateValue("resonance", value); public resonance = (value: number) => this.updateValue("resonance", value*50 => Math.min(Math.max(value, 0), 50);
public lpq = this.resonance; public lpq = this.resonance;
public hcutoff = (value: number) => this.updateValue("hcutoff", value); public hcutoff = (value: number) => this.updateValue("hcutoff", value);
public hpf = this.hcutoff; public hpf = this.hcutoff;