Volume slider independant of system volume

Hi !

I have a volume slider that controls Spotify only with the following script :

on bttWidgetSliderMoved(sliderValue)
tell application "Spotify"
set the sound volume to sliderValue*100
end tell
end bttWidgetSliderMoved

I also have the volume up and down widgets to control my computer's volume.
So let's say that I listen to Spotify by streaming it to my Yamaha receiver, I can adjust the volume of the music with the slider.
And then if I watch something on the MacBook at the same time (a YouTube video let's say) I can adjust the volume independently.

So here is my problem :

when adjusting the volume up/down widget, it also makes my Spotify slider move (without modifying the actual volume of sound coming from my receiver).

However, once I go back to moving the slider with my finger, if by bad luck I had watched a YouTube video on max volume, my receiver will shout max sound volume at first the minute I push on the slider.

How can I adjust my Macbook / system volume without moving the Spotify slider ?

I hope I am clear :wink:

Any help would be appreciated !

Thanks :slight_smile: