Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCA - conversion from slider to gain #38

Open
pendragon-andyh opened this issue May 21, 2019 · 0 comments
Open

DCA - conversion from slider to gain #38

pendragon-andyh opened this issue May 21, 2019 · 0 comments

Comments

@pendragon-andyh
Copy link
Collaborator

I used Sonic Visualiser to analyse this:

  • Position +5 => 3.5 times slider position 0.
  • Position 0 => 3.5 times slider position -5.

So if your slider returns [0-1] then the conversion formula will be close to:

POWER(1.2589, sliderPos*10)*0.1

We need to be careful of emitting outs that are outside of the range of -1 to +1. This is especially important when you play a 6-note power chord. I seem to remember that Web Audio's spec says that you may get distortion out side of these ranges (or blow out people's ear-drums).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant