Jump to content
  • entries
    47
  • comments
    385
  • views
    8168

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


wgscott

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: <p><a href="/monthly_2014_06/eventscript_pref.png.c5e6b83632c690bb65115b9cfb76fac0.png" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="28272" src="/monthly_2014_06/eventscript_pref.png.c5e6b83632c690bb65115b9cfb76fac0.png" class="ipsImage ipsImage_thumbnailed" alt=""></a></p>

 

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.

 

<p><a href="/monthly_2014_06/sharedlib.png.291d51090da93355764fa90387025d57.png" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="28273" src="/monthly_2014_06/sharedlib.png.291d51090da93355764fa90387025d57.png" class="ipsImage ipsImage_thumbnailed" alt=""></a></p>

 

 

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.

<p><a href="/monthly_2014_06/eventscript_pref.png.8be7f71b784b9a73e4f656c9cfd74418.png" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="28522" src="/monthly_2014_06/eventscript_pref.png.8be7f71b784b9a73e4f656c9cfd74418.png" class="ipsImage ipsImage_thumbnailed" alt=""></a></p><p><a href="/monthly_2014_06/sharedlib.png.81a719a84c853633117ccd261e724ced.png" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="28523" src="/monthly_2014_06/sharedlib.png.81a719a84c853633117ccd261e724ced.png" class="ipsImage ipsImage_thumbnailed" alt=""></a></p>

2 Comments


Recommended Comments

"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.

Link to comment

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.

Link to comment



×
×
  • Create New...