Remote Control Part VI: Use iTunes on one computer to control Audirvana Plus, Decibel, or other player software on another
by, 06-10-2014 at 07:03 PM (3018 Views)
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:
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:
This is pointing to the default iTunes directory for a user called "home". Change it to wherever yours is, or it will not work.
This needs to be changed to the username of the account that contains your music library on your music server.
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:
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.
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.