in Search
Untitled Page

ARCHIVED FORUM -- April 2007 to March 2012
READ ONLY FORUM

This is the first Archived Forum which was active between 17th April 2007 and 1st March February 2012

 

Latest post 11-16-2011 2:03 PM by Evan. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-15-2011 3:38 PM

    • psand
    • Not Ranked
    • Joined on 05-05-2010
    • Stockholm, Sweden
    • Posts 48
    • Gold Member

    Command line interface for iTunes/N.MUSIC

    A few days ago I discovered an old Unix shell script for basic command line control of iTunes via AppleScript. It was written in 2001 but, amazingly, it still works with the current iTunes version. The original script can be found here.

    Trying to avoid more useful work, I hacked away on this script and produced something which could be marginally useful. I have a Mac Mini server providing N.MUSIC through the BM-Link software, and navigating this music collection with a Beo4 in a link room can be a frustrating experience. Now I imagined myself logging in to the Mac Mini with ssh, controlling iTunes from my iPhone instead (using the excellent Prompt app).

    Oh, well – and then yesterday I suddenly discovered Apple's free Remote app. So the need for a complicated CLI interface isn't really there anymore. However, my little script can do at least one thing that the Remote app can't do on an iPhone: display lyrics for a track. I can imagine a few esoteric uses for it as well (like when you are sitting in front of your vintage Sun-3/60 workstation in a link room and don't have an iPhone nearby).

    Here are a couple of screenshots from my iPhone to give you the idea. First, the options:

    And then this is what it looks like when queried for the current N.MUSIC status:

    I tried to emulate the N.MUSIC display on my BeoCenter 2, with the addition of color hints for Beo4 operation of artist, genre, album and playlist selection.

    If anyone would like to try it out, the script can be downloaded at http://idisk.mac.com/psand-Public/itunes-cli.zip. It's a standard Unix Bourne shell script, using osascript to talk to iTunes with AppleScript commands and some inelegant AWK stuff thrown in to handle output formatting. Place it in /usr/local/bin (or anywhere else), make it executable (chmod 755) and run it from the terminal.

  • 11-16-2011 2:03 PM In reply to

    • Evan
    • Top 25 Contributor
      Male
    • Joined on 12-15-2008
    • Ohio | USA
    • Posts 2,601
    • Gold Member

    Re: Command line interface for iTunes/N.MUSIC

    Very cool!

    Back in one of my programming classes last year I made an interface that used these scripts (PC version) for a touchscreen monitor to control iTunes.

    I did not know there was this sort of capability though!

    Evan

     

Page 1 of 1 (2 items)