Qlab 5 script - Apple Music

1,631 views
Skip to first unread message

Daniel Charon

unread,
Aug 19, 2023, 12:52:41 PM8/19/23
to QLab
Hey everyone.

I've used scripts to control Spotify from QLab 4. I'm interested in using similar scripts to control Apple Music in QLab 5. I've had some success with basic control with the following examples:

tell application "Music"
activate
end tell
tell application "QLab"
activate
end tell


and....

tell application "Music"
play
end tell


But I'm having a lot of trouble selecting specific playlists and controlling volume like I used to do in Spotify:

tell application "Spotify"
activate
play track "spotify:playlist:6UdDraJNsJJ4PDhRvtQ9qf?si=c41f92ce081342dc"
end tell


Does anyone have any example scripts that will work with Apple Music? Any thoughts or insights would be greatly appreciated.

Thank you!

Daniel

micpool

unread,
Aug 19, 2023, 1:02:00 PM8/19/23
to QLab
Leaving aside the terms of the Apple music license for non-personal use....

Apple Music has a very comprehensive AppleScript implementation.

From Script Editor.app  File menu.... open dictionary.... music 

Mic

micpool

unread,
Aug 19, 2023, 1:13:15 PM8/19/23
to QLab

e.g


tell application "Music"

set sound volume to 70

play (first playlist whose name begins with "Art of")

delay 3

set sound volume to 90

play (first track whose name begins with "Heavy Aspirations")

delay 5

stop

end tell


On Saturday, August 19, 2023 at 5:52:41 PM UTC+1 dan...@ririewoodbury.com wrote:

micpool

unread,
Aug 19, 2023, 1:40:17 PM8/19/23
to QLab
With fades

tell application "Music"

set sound volume to 0

play track "True Love"

repeat with i from 1 to 100

set sound volume to i

delay 0.1

end repeat

delay 15

set i to 100

repeat 100 times

set i to i - 1

set the sound volume to i

delay 0.1

end repeat

delay 10

stop

end tell

Daniel Charon

unread,
Aug 19, 2023, 1:56:40 PM8/19/23
to ql...@googlegroups.com
Thank you so much micpool. I really appreciate your help!


-- 
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/721b1261-c831-4459-821c-7b70a84d94d3n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages