Control Your Slim Server via iTunes

I’ve used my SliMP3 for quite a while now and have enjoyed streaming music on my home network as well as remotely since even before I purchased my player. The typical manner to control what plays has been through the hardware remote, the software player (now built in) or via the Web UI. Things just got very interesting and you can now control what plays on your slim players by choosing the easiest method I can think of – iTunes.

A guy named Anton F. van der Kraaij wrote this AppleScript which when saved as an application and left to run, will queue the same selection on your hardware.

Here’s the script – Thanks Anton!


-- Begin of Script
-- iSlimServer: Control SlimServer from iTunes
-- Plays whatever song is currently playing in iTunes on the SlimServer
-- Copyright Anton F. van der Kraaij 2004
-- Thanks to a script by Barry Brown for inspiration and help from Oscar Marsch
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- INSTRUCTIONS:
-- Set your variables server_address and server_port to your situation
-- Save this script as an application, making sure to click 'stay open'

global server_address, server_port, current_file_track

set server_address to "127.0.0.1" -- This is the slimserver's address
set server_port to "9000" -- This is the slimserver's port

set current_file_track to ""

on idle
try
tell application "Finder"
if (get name of every process) contains "iTunes" then set okflag to true
end tell
if okflag then
-- iTunes is running. Check if it is playing a song.
tell application "iTunes"
if player state is paused or player state is stopped then
-- iTunes is not playing. Stop slimserver.
do shell script ("curl "http://" & server_address & ":" & server_port & "/status.html?p0=stop"")
set okflag to false
return 10
end if
end tell
end if
if okflag then
tell application "iTunes"
if class of current track is file track then
try
copy current track's location to file_path_of_track
on error errText
display dialog errText buttons {"Cancel"} with icon 0
end try
end if -- not a file track
-- return file_path_of_track
if (current_file_track is not file_path_of_track) then
-- File in iTunes is different than file on SlimServer.
-- Thus update variable
set current_file_track to file_path_of_track

-- convert mac path to unix path for use in URL with curl (be careful with special characters here)
set mac_path to (file_path_of_track as text)
set root to (offset of ":" in mac_path)
set rootdisk to (characters 1 thru (root - 1) of mac_path)
tell application "Finder"
if (disk (rootdisk as string) is the startup disk) then
set unixpath to "%2f" & (characters (root + 1) thru end of mac_path)
else
set unixpath to "%2fVolumes:" & mac_path
end if
end tell
set chars to every character of unixpath
repeat with i from 2 to length of chars
if item i of chars as text is equal to "/" then
set item i of chars to ":"
else if item i of chars as text is equal to ":" then
set item i of chars to "%2f"
else if item i of chars as text is equal to """ then
set item i of chars to "" & """
else if item i of chars as text is equal to "*" then
set item i of chars to "\*"
else if item i of chars as text is equal to "?" then
set item i of chars to "\?"
else if item i of chars as text is equal to " " then
set item i of chars to "%20"
else if item i of chars as text is equal to "+" then
set item i of chars to "%2b"
else if item i of chars as text is equal to "&" then
set item i of chars to "%26"
else if item i of chars as text is equal to "" then
set item i of chars to ""
end if
end repeat
set filetoplay to every item of chars as string
-- end conversion
-- Tell slimserver to stop current song and play the song currently playing in iTunes
do shell script ("curl "http://" & server_address & ":" & server_port & "/status.html?p0=stop"")
do shell script ("curl "http://" & server_address & ":" & server_port & "/status.html?p0=playlist&p1=play&p2=" & filetoplay & """)
end if
end tell
end if
end try
return 10
end idle
-- end of script

XM Radio online

This makes a lot of sense and certainly allows existing subscribers greater access (though additional cost) to their subscription. I am not personally sold on whether people will pay a monthly fee yet for radio online. I guess I’ll reserve judgement until it launches and we can see how it actually works. Can you play in your media player of choice? Is it PC only etc… New Dell purchasers will receive a 30 day free subscription as part of the launch – guess Dell = Music these days on the PC side of the world.

XM Radio Online, will launch sometime in early October and operate commercial-free, just as its satellite programming does. XM will charge $7.99 per month for unlimited listening and offer a discount rate of $3.99 to subscribers of its existing radio services. [News.com]

Living in a Box

Growing up, I always remember The Who singing Eminence Front and thinking, what the hell do they mean living in a box… Give it a listen –

I learned long ago know it’s not living in a box, but rather Eminence Front. I’m not living in a box either, but sort of feel that way now that I’ve got my work area gated off as well as the home theater front. I simply could not stop thinking about this song… that and Less Nessman actually, now that my office has walls, though real structure rather than taped lines on the floor… 😉

No more access for you Hannah…It’s a put on.

Behind an eminence front
Eminence front, it’s a put on
It’s an eminence front
It’s an eminence front, it’s a put on
An eminence front
Eminence front, it’s a put on, eminence front
It’s an eminence front
It’s an eminence front, it’s a put on, it’s a put on, it’s a put on, it’s a put on

Music for Kids

For our trip back on Sunday I decided to get some new tunes for us to enjoy beyond the 35+ GB already housed on my iPod. There’s a fantastic bookstore in Manchester, VT called the Northshire and they have a terrific children’s section for books, toys, video and music. Prices on music are higher than I’d like to see, but it’s an beautiful independent bookstore, so it’s (hopefully) going to a good place.

Our picks:

I like them all, though Dan Zanes continues to be a family favorite for us. His songs are highly singable, easy to listen to repeatedly and seem to have a calming effect when we rock out together. TMBG is hit or miss… some songs I had to skip immediately but others seemed good. Have to give more of a listen in time. The Garcia and Grisman is a nice album, though Ashley had a bias against it from some precious Grateful Dead association… 😉 I like other Garcia and Grisman albums and this fits nicely in the same manner of music though is more bluegrass / country than the others.

Apple needs to fix iPod limitations

Something that bothers me about the limitation of the iPod is that I can’t easily put music on my iPod from multiple computers. I know I am not alone in this, but it’s continually frustrating.

I manually sync since my digital collection is way larger than my 40GB iPod and I use iTunes now on 3 computers (Powerbook, iMac and now a PC laptop). I’d like to just connect to each of them when I want to push new tracks to the iPod while on the go.

My main collection is on the iMac but my main computer is the Powerbook and now with the PC Laptop thrown in — plus iPodder, I need an easy way to add tracks to the iPod from any of my systems.

I appreciate the copyright and DRM issues, but still don’t get why if you play within the limits of the iPod / iTunes licensing you still have to use a single computer to sync or update the iPod.

UPDATE —

Clearly I was wrong in my understanding that this was impossible… I have to get a cable now though to sync with the PC – at least transfer tracks at will. I’ll also be looking forward to doing this on my Powerbook.

I was definitely under the impression that you were not able to move tracks to the iPod from more than a single system even in manual sync mode, which is actually how I use it to sync a single large playlist from our desktop at home.

iPodder is very slick

I passed on a link to iPodder yesterday and mentioned I was unable to use it since it was Mac only. Well Pieter Overbeeke posted a link in the comments that he’s coded up a windows version.

I am using it today and have to say it’s totally cool. The code automatically connects and downloads audio from feed sources and creates nice playlists in iTunes when it’s done. You get alerts when each feed is downloaded so you know when to switch over to iTunes and give a listen.

Checking out Adam Curry’s Source Code right now…

Thanks Pieter!

iPodder

Can’t try this yet… out of town on a PC laptop, but can’t wait to get it going on my Powerbook when I return.

iPodder automatically downloads new mp3 files when they become available from any of 5 sources (you can change these if you wish) and copies them to playlists in iTunes based on the channel name. If you have an iPod, connecting it to your computer will load the songs automatically. [Adam Curry’s Weblog]

iTunes Idea

I love this idea and would pay the price of a CD to do it…maybe a dollar or two more. 128K AAC files are fine, but it would certainly be nice to be able to use other formats if you wanted to. Instant fulfillment plus…

Wouldn’t it be great if when you bought a CD on iTunes they would ship you the actual CD (so you have a high-quality backup, liner notes, etc) in addition to letting you download the entire album? [Photo Matt]

iTunesWatcher

I just stumbled across iTunesWatcher 2.5 which is an applescript based app that posts active tracks from iTunes automatically to your site… There are definitely other apps or ways to do this (like Kung Tunes), but I think this one is the most sophisticated yet simple to configure. I’ve set up a page to track my listening… will probably work in more into the flow of my site when I get more of a chance.

My only glitch so far is that my music is based off of a different machine than the one I am on, and the applescript does not seem to like that too much for now. I copied the library file from the other computer to my laptop and am connected to the remote drive storing my tunes to stream and that works.

We need to Open Source the Music Industry

Reading this article (below) from Rolling Stone really just pisses me off and makes me want to find other more direct ways to support artists I like rather than going through the main commerical channels. Somehow, Clear Channel’s moves are not considered anti-competitive or under any anti-trust scrutiny, but this move is clearly a way for them to control every aspect of the music experience — radio airplay, concerts and now live recordings.

The music industry needs an open source solution to enable real-time recording and burning of music so that artists can profit from touring the way they should, rather than continue to be crippled by ridiculous regulations like this. With the appropriate software and hardware, perhaps off the shelf systems bands or venues would be able to produce rapid copys of performaces for fans to buy on their way out the door.

The more we go forward, the the more the recording industry goes backward… I can’t understand why you would limit access to a product from people who not only are interested in purchasing, but are actually right there with money in hand!!

I thought that Phish had a system to do just this, but apparently not in real time… recordings produced a few days later are ok according to CC…

In the past few years, fans leaving some concerts have discovered a souvenir far better than a T-shirt: a live recording of the show they just attended. Bands including the Allman Brothers, moe. and Billy Idol have sold instant concert discs, and the Pixies and the Doors plan to launch similar programs this summer. The recording-and-burning company DiscLive estimated on April 12th that it would gross $500,000 selling live discs this spring alone.

But in a move expected to severely limit the industry, Clear Channel Entertainment has bought the patent from the technology’s inventors and now claims to own the exclusive right to sell concert CDs after shows. The company, which is the biggest concert promoter in the world, says the patent covers its 130 venues along with every other venue in the country.

“We want to be artist-friendly,” says Steve Simon, a Clear Channel executive vice president and the director of Instant Live. “But it is a business, and it’s not going to be ‘we have the patent, now everybody can use it for free.'”

Artists net about ten dollars for every twenty- to twenty-five-dollar concert CD that’s sold, no matter which company they use. But with Clear Channel pushing to eliminate competition, many fear there will be less money and fewer opportunities to sell live discs. “It’s one more step toward massive control and consolidation of Clear Channel’s corporate agenda,” says String Cheese Incident manager Mike Luba, who feuded with Clear Channel last year after promoters blocked the band from using CD-burning equipment.

The Pixies, who are booking a fall reunion tour with several probable Clear Channel venues, say Clear Channel has already told them DiscLive can’t burn and sell CDs on-site. “Presuming Clear Channel’s service and product are of equal quality, it may be best to feed the dragon rather than draw swords,” says Pixies manager Ken Goes. “Still, I’m not fond of doing business with my arm twisted behind my back.” [RollingStone.com]


Thanks for the Tip JD!

Cable’s Killer App?

Fred at A VC wonders

The killer app for cable operators is a Rhapsody like service delivered over cable like Music Choice is. Why doesn’t that exist?

I am not sure exactly how this would work…but have some ideas of where it might go.

Are you proposing an additional rental fee beyond access to the streaming you get now? Music Choice exists today and gives you access to how ever many channels (20?) they offer though they dictate the tunes and the playlists.

It would be tough (I think) to get additional access to things like downloads… plus don’t you think the on-demand load would be pretty high if we were allowed to create playlists and customize our own channel rather than just choose a style of music to stream? Though perhaps over a computer to then be customized to your personal TV channel.

It would be interesting to see Music Choice partner with one of the online services though to complete the loop. Your TV is already hooked up to your home theater / stereo so you would get better fidelity tunes there yet deeper access via your computer for more of a personalized experience and even downloads which you could burn to disc.

Playfair with Hymn

Apple will no doubt launch its lawyers again, but the useful “PlayFair” software, which let purchasers of iTunes Music Store songs remove Apple’s restrictions, is back online. It has a new hosting site and name: Hymn. Understand: You still have to have bought the songs in order to use this, and the songs are still tied to the unique ID created when you purchased. This is about fair use, not “pirating” other people’s work. [Dan Gilmor]