Skip to content

Fading to level +10dB under the LinearTaper fader law instead fades to very near +10dB before dropping to -∞ #62

Open
@jswalden

Description

@jswalden

The computation of ``VCVF` from level under the LinearTaper fader law is currently

Math.round(15196 + level * 118.775)

which is adequate as far as it goes. But it turns out, as I discovered by happenstance, it fails ever-so-slightly for +10dB: the result of the inner sum ends up being in range (16383, 16384), but closer to the upper level so Math.round changes it to 1 << 14 which means when VC/VF are extracted, they both end up being zeroes.

Changing this to use Math.floor will change computations by 1 part in 16384, but I think it's safe to say that amount of change in behavior is both tolerable, and practically utterly inaudible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions