dzannotti / junox

An emulator of a Roland Juno 60
https://dzannotti.github.io/junox/
GNU General Public License v3.0
22 stars 6 forks source link

DCA - conversion from slider to gain #38

Open pendragon-andyh opened 5 years ago

pendragon-andyh commented 5 years ago

I used Sonic Visualiser to analyse this:

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).