Merge branch 'main' of github.com:Bubobubobubobubo/Topos

This commit is contained in:
2023-09-07 00:08:18 +02:00
2 changed files with 6 additions and 6 deletions

View File

@ -102,7 +102,7 @@ export class SoundEvent extends AudibleEvent {
public begin = (value: number) => this.updateValue("begin", value); public begin = (value: number) => this.updateValue("begin", value);
public end = (value: number) => this.updateValue("end", value); public end = (value: number) => this.updateValue("end", value);
public gain = (value: number) => this.updateValue("gain", value); public gain = (value: number) => this.updateValue("gain", value);
public dbgain = (value: number) => this.updateValue("velocity", Math.pow(10, value / 20)); public dbgain = (value: number) => this.updateValue("gain", Math.min(Math.pow(10, value / 20)), 10);
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;

View File

@ -136,11 +136,11 @@ There is a special method to choose the _orbit_ that your sound is going to use:
Simple controls over the amplitude (volume) of a given sound. Simple controls over the amplitude (volume) of a given sound.
| Method | Alias | Description | | Method | Alias | Description |
|----------|-------|-----------------------------------------------------------------------------------| |----------|-------|------------------------------------------------------------------------------------|
| gain | | Volume of the synth/sample (exponential) | | gain | | Volume of the synth/sample (exponential) |
| velocity | vel | Velocity (amplitude) from <ic>0</ic> to <ic>1</ic>. Multipled with gain | | velocity | vel | Velocity (amplitude) from <ic>0</ic> to <ic>1</ic>. Multipled with gain |
| dbgain | db | Attenuation in dB from <ic>-inf</ic> to <ic>0</ic> (acts as a sound mixer fader) | | dbgain | db | Attenuation in dB from <ic>-inf</ic> to <ic>+10</ic> (acts as a sound mixer fader) |
${makeExample( ${makeExample(
"Velocity manipulated by a counter", "Velocity manipulated by a counter",