View RSS Feed

The Ill-Tempered Audiophool

Remote Control Part VI: Use iTunes on one computer to control Audirvana Plus, Decibel, or other player software on another

Rating: 1 votes, 5.00 average.
How to use iTunes on one computer to control Audirvana Plus or other third-party player software on another computer

I'm experimenting with using iTunes as a remote-control interface. It has always kind of bothered me that there is no desktop-based version of Apple's Remote.app (like the one on my iPad I can use with Bob Stern's script to control Audirvana). I found a way to trick iTunes into doing this for me, using a simple zsh shell script that you can obtain from this link:

remoteplayer.zsh

In order to get this to work, I needed to do the following:

1. Enable ssh passwordless login from the controlling computer to the music server. This allows you to send commands and copy files easily, in addition to facilitating command-line login, so it is useful (and safer than using passwords) as it uses a public and private encryption-key system. This link explains how to do it.

2. Enable iTunes on the music server to share its library on your local network. This is by far the easiest way to make the interface. (Other options include using "Home Sharing" or sharing the drive that contains your iTunes library. If you use this last option, set iTunes on the controlling computer up so it won't try to manage the library. Then just add the files to the library.)

3. Purchase and install EventScripts. This is worth buying. It is worth every penny, for a variety of reasons I have blogged on here. We will make use of its ability to run a shell script (or Applescript) whenever iTunes changes a track.

4. Download the zsh shell script linked to above, and open it in your favorite text editor. (Apple's TextEdit.app will do, but you really owe it to yourself to get TextMate, which I paid good money for, but version 2.0 alpha is now free.) At the top of the file there are five environment variables (all caps), the first three of which you absolutely must edit:

MUSICDIR="/Users/home/Music/iTunes/iTunes Media/Music"

This is pointing to the default iTunes directory for a user called "home". Change it to wherever yours is, or it will not work.

REMOTEUSER="home"

This needs to be changed to the username of the account that contains your music library on your music server.

MUSICSERVER="tv-stereo-mini.local"

This needs to be the name or numerical ip address of your music server. Apple typically appends the .local onto these names.

When you are done, set the executable bit on the file (the command is chmod a+x remoteplayer.zsh ) and put it into the EventScript directory:

cp remoteplayer.zsh "~/Library/Application Scripts/net.mousedown.EventScripts/."

(You can access this directory from the EventScript preferences window, and drag and drop the file.)

5. Set EventScript to run the shell script when iTunes starts to play a track.

Here is a picture: blogs/wgscott/attachments/13092-remote-control-part-vi-use-itunes-one-computer-control-audirvana-plus-decibel-or-other-player-software-another-eventscript_pref.png

6. Try it

(a) Open iTunes and (Audirvana (in stand-alone mode), or Decibel, or Vox, or ...?) on the music server, and set audirvana to run in stand-alone mode, rather than iTunes-integrated mode.

(b) Open iTunes on the controlling computer, and access the shared music library. Select something and play it.

blogs/wgscott/attachments/13093-remote-control-part-vi-use-itunes-one-computer-control-audirvana-plus-decibel-or-other-player-software-another-sharedlib.png


Updates, Current limitations and to-do list:

  • The script (as of version 0.0.4) now works when encountering compilation/various artist albums.
  • The script (as of version 0.0.5) will work with other player software that can use "open -a <appname> <filename>" syntax to load files into its playlist buffer. So far, I have tested Audirvana (in non-iTunes-integrated mode), Vox and Decibel, and all of these work.
  • The script loaded into EventScript relaunches iTunes when you try to quit it. My current workaround is to quit EventScript first, but this is a stupid bug.

Updated 06-12-2014 at 12:34 PM by wgscott

Categories
Personal Blogs , tweaks , computer

Comments

  1. Bob Stern's Avatar
    "Set EventScript to run the shell script when iTunes starts to play a track"
    I don't see how that could achieve gapless playback. Audirvana needs the next track in the queue well before the previous one ends. In fact, I don't know whether Audirvana will even recognize the presence of a 2nd track for purposes of loading into its gapless playback buffer if the 2nd track is not present when the 1st track begins loading.
    Updated 06-10-2014 at 10:25 PM by wgscott
  2. wgscott's Avatar
    Because it doesn't do it in realtime. It just cranks through the list rapidly as soon as you push the play button. In fact, I had to slow it down to make sure there weren't multi-threading conflicts, so it spends a total of about 5 or so seconds on each track.