Spotify Control from QLab

4,366 views
Skip to first unread message

Tyler

unread,
Mar 12, 2014, 2:56:27 PM3/12/14
to ql...@googlegroups.com
Alec Sparks has written a script plugin that allows for control of Spotify via applescript cues. Includes playing certain songs, albums, and playlists, spotify application volume changes, volume fades, etc.

Take a look (scroll down on page)
Message has been deleted

Johan

unread,
Mar 13, 2014, 8:49:23 AM3/13/14
to ql...@googlegroups.com

This looks very interesting but I cant get it to work.

Most cues return the result: "ERROR: Can't make some data into the expected type"

I changed the Spotpath cue to "Johans Retina Laptop/DistingoHD/Users/johansoderberg/Desktop/QSpotify-master/QSpotify.scpt"

And I tried replacing all slashes with semicolons as in your original. But none of them worked.

Dave "luckydave" Memory

unread,
Mar 13, 2014, 1:10:02 PM3/13/14
to ql...@googlegroups.com
On Thursday, March 13, 2014 at 5:49 AM, Johan wrote:
I changed the Spotpath cue to "Johans Retina Laptop/DistingoHD/Users/johansoderberg/Desktop/QSpotify-master/QSpotify.scpt"

And I tried replacing all slashes with semicolons as in your original. But none of them worked.

In case it's a language issue here, I just wanted to check that you've tried colons rather than semicolons. As in : not ;

-- 

micpool

unread,
Mar 13, 2014, 3:30:04 PM3/13/14
to ql...@googlegroups.com
I used colons and it seems to be  working.  What's good about this solution is that the background processing of iterative loops for controlling the volume slider seems to work really well. I am certainly going to have a good play with this.

What do people think of the general principle of scripts that are programmed by having a specific syntax in the title of the cue that calls them?

Mic

Tyler Gothier

unread,
Mar 13, 2014, 3:32:42 PM3/13/14
to ql...@googlegroups.com
I think the idea is ease of use. Being able to quickly change a fade without having to consult the script. I ended up putting almost everything into a group cue anyhow (one cue to fade out, another to pause)
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53

---
You received this message because you are subscribed to a topic in the Google Groups "QLab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/qlab/VEPymxmREeo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to qlab+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave "luckydave" Memory

unread,
Mar 13, 2014, 3:33:44 PM3/13/14
to ql...@googlegroups.com
On Thursday, March 13, 2014 at 12:30 PM, micpool wrote:
What do people think of the general principle of scripts that are programmed by having a specific syntax in the title of the cue that calls them?

It's a really good idea. It's basically just a way to store a flexible value for a variable, which isn't as simple if that value is in the script cue itself. For this concept of a "QLab plugin", it makes perfect sense.

-- 

micpool

unread,
Mar 13, 2014, 3:36:20 PM3/13/14
to ql...@googlegroups.com
If I put in the name of my computer in the path cue it stops working. I had the path starting with the HD name 

Macintosh HD:Users:micpool:Desktop:QSpotify-master:QSpotify.scpt

Tyler

unread,
Mar 16, 2014, 12:19:43 AM3/16/14
to ql...@googlegroups.com
That appears correct Mic - is working for me Macintosh HD:Users:t:Documents:QSpotify.scpt

A warning to anyone using Spotify, turn off same volume level option in prefences of Spotify. I spent a lot of time to figure out why Spotify was peaking and this was why. Article has more detail

micpool

unread,
Mar 16, 2014, 3:42:43 AM3/16/14
to ql...@googlegroups.com
As one the main reasons for using spotify or itunes controlled from Qlab would be the quick assembly of playlists for quick one off applications, without gaps and without nasty dynamic level surprises then turning off the ALC would somewhat lose the advantage.

The spotify script could easily be adapted to control itunes, which because it adjusts the volume on a per track basis and will play lossless codecs might be a better starting point.

If moment to moment dynamic control was required in addition, that would be better achieved using a mastering style plugin. If the itunes outputs were brought into a Qlab Mic cue you might be able to find one that would work as a Qlab effect.


Mic

Tyler

unread,
Mar 16, 2014, 3:46:24 AM3/16/14
to ql...@googlegroups.com
While even dynamics would be great, the Spotify compressor is absolute crap and was causing peaking to point of distortion when output to my Motu
Message has been deleted
Message has been deleted

HarryTwofingers

unread,
Mar 16, 2014, 3:52:58 PM3/16/14
to ql...@googlegroups.com
  I can´t make the script work.

It is this piece of code that does not work. "set cueOrigName to q name of last item of (active cues as list)"
The script can´t create active cues as list.
Warnings in Qlab says there is a broken cue in Main cue list.

If I have a workspace with several cue lists and do a Find que. Am I supposed to find SPOTPATH then?
If that is the case...I can not and that would be the broken cue.
Does Find cue find across cue lists?

How do I fix the broken cue?

I have a MacBook Pro, Maverick and latest Qlab.

Douglas Heriot

unread,
Mar 17, 2014, 9:35:42 AM3/17/14
to ql...@googlegroups.com
I originally got the "ERROR: Can't make some data into the expected type" message as well. I’m not sure, but I think I had to restart QLab after changing the path? (I tried a few things, can’t remember)

Anyway – thanks! – this is exactly what I’ve been waiting for, and will be very useful. I’ll be using it to start playing music after events (regular church services). I wanted to be able to play a playlist, starting from a specific song at a specific time, and when the song’s over to continue randomly with the rest of the playlist.
Now, I have a QLab group cue to randomly pick one of a couple of good songs for ending an event on, at a nice big moment in the song, without having to remember to cue it up manually beforehand!

I made a small change, allowing a third parameter to set a 'context' for playing a track in (eg. to play a track in the context of a playlist)
(I noticed the 3rd parameter in this case was already being extracted for 'inFade', but didn’t seem to be actually used)
Might be good idea to add a simple open-source style license (eg. 'BSD license' or something) so it’s clear that distributing modified versions is ok.

Johan

unread,
Mar 18, 2014, 3:53:08 AM3/18/14
to ql...@googlegroups.com
Yes colons work.
I also had to save and restart Qlab.

That did it!


Alec Sparks

unread,
Mar 18, 2014, 6:49:21 PM3/18/14
to ql...@googlegroups.com
Hey guys! I'm the Alec Sparks who made this. Some notes, in no particular order:

1) You have to click the "Compile Script" button on Script Cues to make QLab try the script again after you've fixed something. This will un-break the cue until the next time it's run.
2) It's possible to throw custom error messages to QLab from the script... except when it's an issue with the path to the script. Which is where 90% of issues happen.
3) I should make it accept standard slash-separated file paths.
4) Setting specific parameters command line style would be cool. -f for fade, -c for context, etc
5) A readme is coming.

micpool

unread,
Mar 18, 2014, 9:42:41 PM3/18/14
to ql...@googlegroups.com
Hey Alec

Great work on this and the EOS lighting control Qlab scripts.(http://www.qlx.io)

Loads of really interesting things on  your website (http://www.alecsparks.com) and a great tumblr feed.( http://alspr.tumblr.com).

I think you are going to have an amazing career in technical theatre! 

Mic

Alec Sparks

unread,
Mar 20, 2014, 9:11:11 PM3/20/14
to ql...@googlegroups.com
Awww shucks!

Rune Langaard

unread,
Feb 17, 2016, 9:14:33 AM2/17/16
to QLab
Hi! Trying to get this to work, and everything is fine exept the fade cues won´t work for some reason.
Anyone got some pointers as to why?

Otherwise a great script! :D

Regards Rune.

lksou...@gmail.com

unread,
Oct 4, 2016, 1:43:29 PM10/4/16
to QLab
hi, it comes up with: error "Can’t get last item of {}." number -1728 from last item of {}. this referee to "q name" on this line --> set cueOrigName to q name of last item of (active cues as list).  any ideas on how to fix this? (I'm not so good with scripts) thanks

any id

Dale Norris

unread,
Aug 2, 2017, 7:00:20 AM8/2/17
to QLab
Out of curiosity has anyone gotten this to work in V4?

Johan

unread,
Aug 2, 2017, 3:59:03 PM8/2/17
to QLab

It works just as in verson 3 of qlab - Quite great! - apart from the fades.


Phil Manson

unread,
Aug 8, 2017, 12:43:09 PM8/8/17
to QLab
Saw this on the Facebook forums too. 

Very useful, although it is worth mentioning to people the "usage"policy that Spotify specifies regarding public playback......

Aside from that, i do seem to have an issue when using the MUTE / UNMUTE function?

When I have a cue playing all fine, I then set the VOLUME 50 - all good - and then trigger MUTE it goes to zero as expected - again, all good.

However, triggering the UNMUTE button then, seems to reset the volume to 100 (!) - all bad 

I have a SPOTIFY Playback System that I have designed and use on shows, again using my trusted Behringer CMD LC-1 that uses dummy cues to store NOTES values of existing volume levels before muting or ducking takes places, and uses this as the variable tor return to when un-muting.

A very useful and "un-script-heavy" way of maintaining consistent levelling.

Overall, I think the control available within Spotify that Qlab can exploit is really very useful - and I certainly prefer using it than having to rely on iTunes as i did previously.

Thanks for a great application/

PHIL

l...@actld.com

unread,
Aug 31, 2017, 12:07:18 PM8/31/17
to QLab
Hi Alec first of all, nice job work fine,except :

cues:
fade 1 50
fade 5
fade 1 100
fade 1 0

All the rest is working really fine.

I am on minimac OSX Sierra 10.12.6
Version Xcode Version 8.3.3 (8E3004b)

On my latop MacBook Pro OSX Sierra 10.12.6
Version Xcode Version 8.3.3 (8E3004b)

and it work all fine...

I really don't understand what it could be.

Do you have any idea???
I need to use it next days in a venue where they use Spotify and i will need to manage Spotify [fade out] to be able to launch my own music for the show.

Can you help me about that??

Dale Norris

unread,
Mar 19, 2019, 1:38:33 AM3/19/19
to QLab
Has anyone had any luck adjusting the fade time for this script? 


On Thursday, March 13, 2014 at 4:56:27 AM UTC+10, Tyler wrote:

ysol...@gmail.com

unread,
Mar 19, 2019, 1:52:56 PM3/19/19
to QLab
While this is a invaluable tool, it's worth repeating: it is totally illegal to use spotify outside of the licensed agreement wich is for personal use only..there are no venues allowed to play spotify , technically not even in your office space..and you would still need to secure the rights for the material you're playing publicly.....

Ray

Steven Sokulski

unread,
Mar 19, 2019, 10:27:19 PM3/19/19
to QLab
Fading Spotify with QSpotify works by repeatedly setting the volume level of the Spotify client, so it’s not super reliable in that sense.

It works at various speeds, but the slower the fade the more obvious this becomes in my experience.

micpool

unread,
Mar 20, 2019, 12:06:41 AM3/20/19
to QLab
Spotify is scriptable (as is iTunes)

sound volume is a property with 100 integer values so the steps are less than 1dB, which is OK for a reasonably stepless  fade.

This works with iTunes and Spotify  and seems entirely consistent and reliable. 


set fadetime to 5 --seconds

tell application "Spotify" --set app name here

repeat with volumeset from 0 to 100 as integer

set sound volume to 100 - volumeset

delay fadetime / 100

end repeat

end tell




Mic


micpool

unread,
Mar 20, 2019, 12:20:41 AM3/20/19
to QLab
Depending on your intended use, you MAY be able to use  Soundtrack  which is Spotify's part owned brand for business. For US customers it costs about 3-4 times the cost of a Spotify account. UK customers have to pay PRS/PPL license fees in addition to the 27 pounds a month.

It has less tracks than Spotify but for background music it MAY be a legal solution for your needs. (It's licensed per business premises)




Mic
Reply all
Reply to author
Forward
0 new messages