QLab Spotify Scripts

Time to read: 5 mins

Open Spotify

tell application "Spotify"
	activate
end tell

Play Specific Spotify Playlist

You amend “user:radiodj787” with your own Spotify Username.

You amend “playlist:0s7xNnFgFz9jLskwmBJ9kE” with your own Playlist ID. To obtain this go to the playlist, share and then you will see the playlist ID.

tell application "Spotify"
	set sound volume to 100
	set houseMusic to "spotify:user:radiodj787:playlist:0s7xNnFgFz9jLskwmBJ9kE"
	play track houseMusic
end tell

Fade Out and Pause Spotify

set fadetime to 5
tell application "Spotify"
	repeat with volumeset from 0 to 100 as integer
		set sound volume to 100 - volumeset
		delay fadetime / 100
	end repeat
	pause
end tell

Resume Spotify with Fade Up

tell application "Spotify"
	play
	set currentvolume to the sound volume
	repeat with i from currentvolume to 100 by 2
		set the sound volume to i
		delay 0.1
	end repeat
end tell

Resume Spotify (No Fade Up) (i.e. Play from pause)

tell application "Spotify"
	set sound volume to 100
	play
end tell

Resume Spotify (Next Track)

tell application "Spotify"
	set sound volume to 100
	play (next track)
end tell

Close Spotify

tell application "Spotify"
	quit
end tell

Download Sample File

If you found the above useful or want to download the QLab file, please do so below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.