Play music faster in the Music App
When I updated 42 Astoundingly Useful Scripts and Automations for the Macintosh for Catalina, I removed this script. Its purpose was to speed podcast playback, and the Podcast app, in Catalina, has that ability built in. That made this script less useful and less astounding, so I removed it and replaced it with a backmasking script, that is, one that plays music backward to reveal hidden messages.
But I promised to make the speed playback script available, and here it is. You may find it useful if you’re still on Mojave or earlier, for example, and are still listening to podcasts through iTunes. Or you may just find it enjoyable to turn your favorite music into Alvin and the Chipmunks.
I’m not judging.
Much.
This is a very simple script. It takes the currently-playing (or currently-paused) track in iTunes, gets both the file location and the current play position, and then opens the track in QuickTime Player to start playback from that position at the higher speed. I have it set to play back 60% faster (1.6x). Change the preferredSpeed
property at the top of the script if you prefer a different speed.
Paste this code into AppleScript Editor and save it as “Speed Playback” in your iTunes Scripts Folder. It will appear in iTunes under the scroll-iconed script menu in the menu bar.
Here are the important variables in the scripts:
alreadyPlayed | How much of the track we’ve already listened to in iTunes. |
---|---|
preferredSpeed | The multiplier to playback speed. |
trackLocation | The filepath to the track. |
And here is the script code:
[toggle code]
- -- Listen to iTunes tracks faster than normal
- -- Jerry Stratton astoundingscripts.com
- property preferredSpeed : 1.6
- -- get path to file from iTunes, remembering the current position
-
tell application "iTunes"
- pause
- set alreadyPlayed to player position
-
tell current track
- set trackLocation to location
- set the played count to the played count + 1
- set the played date to the current date
- end tell
- end tell
- -- open the file in QuickTime, skipping past what we've already listened to
-
tell application "QuickTime Player"
- open trackLocation
-
tell first document
- set current time to alreadyPlayed
- set rate to preferredSpeed
- end tell
- activate
- end tell
- 42 Astounding Scripts, Catalina edition
- I’ve updated 42 Astounding Scripts for Catalina, and added “one more thing”.
- 42 Astoundingly Useful Scripts and Automations for the Macintosh
- MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
More Astounding Scripts
- 42 Astoundingly Useful Scripts and Automations for the Macintosh
- MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
- Using version control with AppleScripts
- AppleScripts aren’t stored as text, which makes it impossible to track changes in AppleScript files using version control software such as Mercurial or Git.
- Catalina: iTunes Library XML
- What does Catalina mean for 42 Astounding Scripts?
- 42 Astounding Scripts is live!
- Ready to get your retro on? Type in programs for your Macintosh and make it play music, roll dice, and talk to you? Customize your services menu? 42 Astoundingly Useful Scripts and Automations for the Macintosh is the book for you!
- About Astounding Scripts
- Because I can!