Hi, i love the bot and use it pretty often.
But i find it pretty hard to control the volume, especially if you want to have the bot for background music. This is because the volume slider is percentage based. A more useful and natural way to control the volume is in decibel.
To switch from percentage to decibel the slider should range from -30 to 0 in 0.25 steps for example (the minimum value and step size can be adjusted to your liking).
To get the percentage value to control your backend you just have to apply this formula:
f = 10^(x/10)
Where x is the value from the slider and f is your percentage factor to control the backend. In this formula f = 0 only applies for x = -∞ so you have to check if the slider is at the minimum and set the factor to 0 to allow for the bot to be muted through the slider.
If you want to know how such a volume slider "feels" like, i rewrote the Chrome extension Volume Controller by rajuGT to use such a volume control called dBslider. (This extension is just a proof of concept.)
Also the volume control of TeamSpeak3 is implemented with decibel.
Regards Irame
But i find it pretty hard to control the volume, especially if you want to have the bot for background music. This is because the volume slider is percentage based. A more useful and natural way to control the volume is in decibel.
To switch from percentage to decibel the slider should range from -30 to 0 in 0.25 steps for example (the minimum value and step size can be adjusted to your liking).
To get the percentage value to control your backend you just have to apply this formula:
f = 10^(x/10)
Where x is the value from the slider and f is your percentage factor to control the backend. In this formula f = 0 only applies for x = -∞ so you have to check if the slider is at the minimum and set the factor to 0 to allow for the bot to be muted through the slider.
If you want to know how such a volume slider "feels" like, i rewrote the Chrome extension Volume Controller by rajuGT to use such a volume control called dBslider. (This extension is just a proof of concept.)
Also the volume control of TeamSpeak3 is implemented with decibel.
Regards Irame