Hi Kvr
In the next of our series of blog posts about creating audio VST plugins, we give a brief overview of what makes up a volume control and what you need to consider when making one. Turning volume up and down seems so intuitive to you as a music producer you've probably never even considered how the process works...Well let us walk you through it.
https://www.denise.io/blog/2019/7/creat ... me-control
If you like the blog post or have any questions about it, feel free to let us know in the forum or on our social pages.
https://www.facebook.com/AudioDevAcademy/
https://www.instagram.com/audiodevacademy/
Joe.
Create your own VST plugins, Part 5: Create an audio volume control. [blog post]
-
AudioDevAcademy AudioDevAcademy https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=441843
- KVRist
- Topic Starter
- 38 posts since 29 May, 2019
Audio Dev Academy - from JD Young and Yuri Guerin
-----------------------------------------------------------
audiodev.io Instagram Facebook
-----------------------------------------------------------
audiodev.io Instagram Facebook
- KVRAF
- 7890 posts since 12 Feb, 2006 from Helsinki, Finland
One remark: typically you want a volume control to actually act more or less like decibel scale on most of the "fader throw" but go down to absolute zero at the minimum value (essentially becoming more like linear at the very bottom) and you typically actually get better feeling control if you limit the (pseudo?)exponential range to somewhere around 60dB or so (though this is largely a matter of taste).
The easiest way (though not necessarily the only possible approach) to get such a taper is to take an exponential and subtract the minimum value. Then you fix the unity gain by dividing with the desired unity gain-point after subtraction.
Basically something like: (exp(aMin+a*(aMax-aMin))-exp(aMin))/(exp(aUnit)-exp(aMin)).
For a "60dB feel" with unity and maximum position, set: aMin=ln(1e-3), aMax=aUnit=0.
Note that everything except one exp() call here is constants, so even if it looks scary it's not all that expensive. Pretty much the only complication with the above formula is that you need to use it in reverse to compute the actual dB gain for display purposes, but that's a small price to pay.
The easiest way (though not necessarily the only possible approach) to get such a taper is to take an exponential and subtract the minimum value. Then you fix the unity gain by dividing with the desired unity gain-point after subtraction.
Basically something like: (exp(aMin+a*(aMax-aMin))-exp(aMin))/(exp(aUnit)-exp(aMin)).
For a "60dB feel" with unity and maximum position, set: aMin=ln(1e-3), aMax=aUnit=0.
Note that everything except one exp() call here is constants, so even if it looks scary it's not all that expensive. Pretty much the only complication with the above formula is that you need to use it in reverse to compute the actual dB gain for display purposes, but that's a small price to pay.