diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/Topos/FileContentIndex/807ba5c6-fdcd-4916-987f-0d17e731f74b.vsidx b/.vs/Topos/FileContentIndex/807ba5c6-fdcd-4916-987f-0d17e731f74b.vsidx new file mode 100644 index 0000000..06791ca Binary files /dev/null and b/.vs/Topos/FileContentIndex/807ba5c6-fdcd-4916-987f-0d17e731f74b.vsidx differ diff --git a/.vs/Topos/FileContentIndex/read.lock b/.vs/Topos/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/Topos/v17/.wsuo b/.vs/Topos/v17/.wsuo new file mode 100644 index 0000000..21b4727 Binary files /dev/null and b/.vs/Topos/v17/.wsuo differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..8f98e38 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\C:\\Users\\Julien\\Topos", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..d4369ff Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/src/classes/SoundEvent.ts b/src/classes/SoundEvent.ts index d55008a..4f6c706 100644 --- a/src/classes/SoundEvent.ts +++ b/src/classes/SoundEvent.ts @@ -102,6 +102,8 @@ export class SoundEvent extends AudibleEvent { public begin = (value: number) => this.updateValue("begin", value); public end = (value: number) => this.updateValue("end", value); public gain = (value: number) => this.updateValue("gain", value); + public dbgain = (value: number) => this.updateValue("velocity", Math.pow(10, value / 20)); + public db = this.dbgain; public cutoff = (value: number) => this.updateValue("cutoff", value); public lpf = this.cutoff; public resonance = (value: number) => this.updateValue("resonance", value); diff --git a/src/documentation/engine.ts b/src/documentation/engine.ts index 6de3f0a..a7846ab 100644 --- a/src/documentation/engine.ts +++ b/src/documentation/engine.ts @@ -136,10 +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. -| Method | Alias | Description | -|----------|-------|------------------------------------------------------------| -| gain | | Volume of the synth/sample (exponential) | -| velocity | vel | Velocity (amplitude) from 0 to 1. Multipled with gain | +| Method | Alias | Description | +|----------|-------|-----------------------------------------------------------------------------------| +| gain | | Volume of the synth/sample (exponential) | +| velocity | vel | Velocity (amplitude) from 0 to 1. Multipled with gain | +| dbgain | db | Attenuation in dB from -inf to 0 (acts as a sound mixer fader) | ${makeExample( "Velocity manipulated by a counter",