It's all in the topic. So I need to turn down volume of my music gradually over time until the sound is muted
This is the easiest way
Develop games in your browser. Powerful, performant & highly capable.
http://postimg.org/image/g31xs2n23/
Here's an image of how i'd do it without any external plugins or addons