Automatically reduce volume / prioritise sound volume on different applications, possible?

Hello,
Is there any way to automatically reduce volume or mute sound of one application once you open another? I believe its a bit tricky and i couldnt find any info on the internet to do so.

For example - continuously play music on Spotify and somehow automatically reduce volume or mute Spotify completely once i launch a game or Youtube/Facebook video, then increase volume or unmute it automatically. It would be enough to decrease volume/mute spotify once i launch my browser at least.

So does anyone know the way or software to manage my sounds :) ?
 
Solution
think you could also tell different applications to play sound through different devices

ie--could tell say media player to use the speakers but tell another app to use the headphones


Its Asus z170-a , what kind of software are you talking about? Name?
 


Yeah this could work but i have to use only headphones due to other people at my house that dont want to listen it as well ^^
I will try to download that sonic studio 3 but i doubt it will help, thanks anyway.