This is cool! However, I'd say that the main function I'd need is the ability to fade down Spotify from QLab as I run my first cue. Seems a little more complicated, but might it be possible? I'm fine running Spotify manually, as usually that happens before opening house, but often the bottleneck is at clearance, when you have to do other lighting cues maybe, give a signal to performers etc, then manually fade out the Spotify app whilst being ready to hit go on the first cue of the show. Any thoughts?
Try this: property fadeDuration : 5 -- Fade duration in seconds property fadeInterval : 0.1 -- Duration of fade steps in seconds property fadeAmount : (fadeInterval / (fadeDuration + 1)) * 100 -- Calculate fade amount per interval tell application "Spotify" repeat set currentVolume to sound volume if currentVolume is less than or equal to fadeAmount then set sound volume to 0 exit repeat end if set sound volume to (currentVolume - fadeAmount) delay fadeInterval end repeat pause end tell
Hey mate - having an issue with my system Im getting 'ERROR: Can't set playlist to "my spotify link". Access not allowed I also had it working the first time without setting the Spotify link, but now it only opens the app and greys out the play/pause button. Cheers
Thanks for this, though, unfortunately, when I go to load this up, the script works, and opens the playlist and then hides Spotify, but doesn't play, and "Spotify player" remains blank with no track? Any ideas?
Hello. if you want to quit Spotify totally then you just do tell application "Spotify" quit end tell if you just want to close the window then you need to activate that window and then use system events to close it. link this tell application "Spotify" activate end tell tell application "System Events" set visible of process "Spotify" to false end tell tell application "QLab 4" activate end tell
This isn't working for me, Qlab doesn't seem to like the word 'track'. It says expected end of line but found identifier. It also doesn't want to go to my chosen playlist, the script compiles fine but Spotify doesn't respond, I have tried the link from copy link to playlist and also copy Spotify URI, neither seems to work. I'm on version 4.6.10 of Qlab, and script cues are working to open, play, and change volume of Spotify. Any advice?? Thanks!
for example: tell application "spotify" set sound volume to 100 set playlist to "spotify:user:spotify:playlist:7jq9hVhkNUyFLN1XivhLvK" play tack playlist end tell
This is cool! However, I'd say that the main function I'd need is the ability to fade down Spotify from QLab as I run my first cue. Seems a little more complicated, but might it be possible? I'm fine running Spotify manually, as usually that happens before opening house, but often the bottleneck is at clearance, when you have to do other lighting cues maybe, give a signal to performers etc, then manually fade out the Spotify app whilst being ready to hit go on the first cue of the show. Any thoughts?
Try this:
property fadeDuration : 5 -- Fade duration in seconds
property fadeInterval : 0.1 -- Duration of fade steps in seconds
property fadeAmount : (fadeInterval / (fadeDuration + 1)) * 100 -- Calculate fade amount per interval
tell application "Spotify"
repeat
set currentVolume to sound volume
if currentVolume is less than or equal to fadeAmount then
set sound volume to 0
exit repeat
end if
set sound volume to (currentVolume - fadeAmount)
delay fadeInterval
end repeat
pause
end tell
@@jamessealey5608 It works! Thanks so much James, this is a total game changer. I'm gonna use this all the time
@@jamessealey5608 Wow you're a beast, thanks a lot!
Hey mate - having an issue with my system
Im getting 'ERROR: Can't set playlist to "my spotify link". Access not allowed
I also had it working the first time without setting the Spotify link, but now it only opens the app and greys out the play/pause button.
Cheers
Try the following -> set playlist to "spotify:user:spotify:playlist:7jq9hVhkNUyFLN1XivhLvK"
Works for me.
Hi,
How do I take a song from Spotify and put it in QLab ? So that I can play or edit it ?
Thanks for this, though, unfortunately, when I go to load this up, the script works, and opens the playlist and then hides Spotify, but doesn't play, and "Spotify player" remains blank with no track? Any ideas?
Whats the command to close application? Like we have activate to open spotify, what is the code to close spotify?
Hello. if you want to quit Spotify totally then you just do
tell application "Spotify"
quit
end tell
if you just want to close the window then you need to activate that window and then use system events to close it. link this
tell application "Spotify"
activate
end tell
tell application "System Events"
set visible of process "Spotify" to false
end tell
tell application "QLab 4"
activate
end tell
This isn't working for me, Qlab doesn't seem to like the word 'track'. It says expected end of line but found identifier. It also doesn't want to go to my chosen playlist, the script compiles fine but Spotify doesn't respond, I have tried the link from copy link to playlist and also copy Spotify URI, neither seems to work. I'm on version 4.6.10 of Qlab, and script cues are working to open, play, and change volume of Spotify. Any advice?? Thanks!
Try the following -> set playlist to "spotify:user:spotify:playlist:7jq9hVhkNUyFLN1XivhLvK"
Works for me.
for example: tell application "spotify"
set sound volume to 100
set playlist to "spotify:user:spotify:playlist:7jq9hVhkNUyFLN1XivhLvK"
play tack playlist
end tell