mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Make preamp a bit... more
This commit is contained in:
parent
2252c8e944
commit
38bd76f3d7
1 changed files with 3 additions and 2 deletions
|
|
@ -197,9 +197,10 @@ export default class Media {
|
|||
// From 0 to 100
|
||||
// The input value here is 0-100 which is kinda wrong, since it represents -12db to 12db.
|
||||
// For now, 50 is 0db (no change).
|
||||
// For now we map the values 0-100 to 0.5-1.5
|
||||
// For now we map the values 0-100 to 0.25-1.75
|
||||
setPreamp(value: number) {
|
||||
this._preamp.gain.value = 1 + (value - 50) / 100;
|
||||
const percentDelta = (value - 50) * 0.02;
|
||||
this._preamp.gain.value = 1 + percentDelta * 0.75;
|
||||
}
|
||||
|
||||
// From -100 to 100
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue