Music Helper Applet

Although Keynote offers the ability to assign an audio track to be played during a presentation, it is currently not possible to assign individual audio tracks to specific slides, or to have an audio track play during the presentation of a series of slides.

For those creative types who are looking for new ways to maximize the effectiveness of Keynote, here’s an Applescript script to trigger and control the playing of tracks in iTunes based upon the current slide being presented in Keynote.

Using this script, you can have a specified iTunes track play through multiple slides, or have a track play only for a specific slide.

NOTE: Requires Keynote 6.5+ and OS X 10.10+

DOWNLOAD  the completed helper applet. NOTE: Before launching the applet, make sure that iTunes and Keynote are open.

The Helper Script Application

This script is designed to be saved as an application that stays open after launch. This accomplished by selecting the “Stay open after run handler” checkbox in the script’s Save dialog.

When the script application is launched, it queries the iTunes application to get a list of names of all user playlists. The script then presents the list to the user so they can choose the playlist containing the tracks whose titles are placed in the presenter notes of the presentation slides.

The interactive power of the script is accomplished through its use of an idle handler. Once the script has been launched, the idle handler is triggered after the specified idle interval (in seconds), executing the script statements within the handler. The script queries Keynote as to the contents of the presenter notes of the current slide, and based upon the reply, takes the following actions:

  • If the contents of the current slide’s presenter notes is the name of a track in the chosen playlist, the track will be played, unless it is already the currently playing track in iTunes—in which case, the track continues uninterrupted.
  • If the contents of the current slide’s presenter notes is nothing, then the script tells iTunes to stop playing.
  • If the Keynote presentation is halted, the script will close itself and quit.
  • If either Keynote or iTunes is closed, the script will close itself and quit.