Recent Blogs
Blog Archive
Blog Archive
Sunday, July 27th, 2008
Streaming Music from Home to my iPhone
I know most of you are tired of hearing about my new iPhone. Not sure what to tell you really. Close your browser I guess. The excitement hasn't let up yet and I am finding cool new things out about it almost daily. I still plan to re-cap my initial excitement but more importantly here is a cool new addition to my iPhone that I built myself over the weekend.
I am somewhat of an audiophile and there have been plenty of times where I wanted to hear that one certain song right then and there. I was able to keep a large majority of my digital music library on my old iPod, which was 60B. With my new iPhone, which is still a nice 16GB, that is no longer possible. But I have a solution.
I didn't come up with the idea, but I will take credit for stealing it. Late last year sometime Dave Heinzel wrote a simple web site that looked and felt like most iPhone-styled web sites do. It connected him to his home music library from his iPhone when he was on the go. Unfortunately the EDGE network isn't quite fast enough to stream 5+MB files in real-time but the proof of concept itself was promising. I should note that his setup did work fine over a Wi-Fi network.
With the new 3G data network at AT&T streaming music to the iPhone is now possible. I was all giddy about the idea on Friday and emailed Dave to see if I could borrow his code. He was super busy last week with a work project and I assume my email got buried somewhere in his Inbox, so I just wrote my own this weekend.

In the top right hand corner on my home screen you'll see an icon for my new Tunes site (next to the Humzoo icon). That provides easy access to my home music library on the go. From there I have a list of numbers and letters to simply navigate to artists starting with that character.
At that point I click the artist I want to listen to by clicking on their name. Then I select the album I want. The I see the songs in that album. When I click on one it starts streaming in QuickTime on the iPhone immediately. I tried it out an number of times as we ran errands over the weekend and it worked awesome! There were only two cases where the song seemed to hang for a few seconds before it started playing. But I imagine that was because Niki was downloading the Kenny Loggins discography on her computer.
The example below is from a few screen shots I took on my iPhone over the weekend. I know I am going to get hassled about my slim Nirvana album collection. Let me explain. I have them all, just not in a digital format (yet). Its on my to-do list. And yes, I agree Bleach was the best Nirvana album ever.

I took my Tunes app just a little further than Dave did. I wanted to get as close to the look and feel of iTunes as possible. I wrote a script to dynamically pull in album covers from Amazon. It passes Amazon the artist and album name in a keyword parameter, using their API, and it sends back an bunch of XML. I parsed the XML to find the thumbnail version of the image and display it next to the artist or album. Its super fast and adds a nice visual to the overall bland page.
The guts of my application are as follows. I chose to setup a web server on the machine where all my music lives, which happens to be a Windows machine. I installed Apache and PHP to get the job done. I had to setup two sites in Apache's virtual host configuration file to get two drives mapped for the site. So my music is actually referenced from a sub-domain off the primary domain when the web site is hosted. I'm using dyndns.org to do the DNS routing for me and I'd love to share the app out so you all could see it, but that would totally hose my home network.
As Dave mentioned in his blog there are some downfalls to this setup. The primary one being that there is no way to play files subsequently. So after you finish listening to a song you have to click on the next song to start playing it. I assume Apple has prevented the playback of playlists (m3u, pls...) on purpose. If someone could get this working there wouldn't be much need for a large hard drive going forward on the iPhone, except for large movies I supposed.
I'm okay with this though and I knew that it was a limitation going into it. I can still access all my songs on the go or download them from a browser if I need to. There maybe a possible work around to the streaming limitation though, I am starting to look into that now.
Dave and I have talked about writing a Humzoo App for the iPhone. Its gonna happen someday. We've recently applied for our Dev Program license and plan to pay the $99 when Apple gets around to getting back to us on our enrollment status. Neither of us have any experience with Objective-C or the iPhone SDK so there will be a learning curve involved, which we are both ecstatic about. The biggest challenge I think will be figuring out how to write a compiled application from two different locations.
I may write an app in the meantime to replace my home music site with a real app that can stream music and interpret playlists. That's just the beginning of what the app could become but that alone would be enough for me.
If anyone is interested in setting up a home music server for themselves I am happy to share my code with you. I'll warn you that its not for the HTML/Dreamweaver guru but with a little knowledge of Apache and PHP could you get it up and running in no time.
Streaming Music from Home to my iPhone
I know most of you are tired of hearing about my new iPhone. Not sure what to tell you really. Close your browser I guess. The excitement hasn't let up yet and I am finding cool new things out about it almost daily. I still plan to re-cap my initial excitement but more importantly here is a cool new addition to my iPhone that I built myself over the weekend.
I am somewhat of an audiophile and there have been plenty of times where I wanted to hear that one certain song right then and there. I was able to keep a large majority of my digital music library on my old iPod, which was 60B. With my new iPhone, which is still a nice 16GB, that is no longer possible. But I have a solution.
I didn't come up with the idea, but I will take credit for stealing it. Late last year sometime Dave Heinzel wrote a simple web site that looked and felt like most iPhone-styled web sites do. It connected him to his home music library from his iPhone when he was on the go. Unfortunately the EDGE network isn't quite fast enough to stream 5+MB files in real-time but the proof of concept itself was promising. I should note that his setup did work fine over a Wi-Fi network.
With the new 3G data network at AT&T streaming music to the iPhone is now possible. I was all giddy about the idea on Friday and emailed Dave to see if I could borrow his code. He was super busy last week with a work project and I assume my email got buried somewhere in his Inbox, so I just wrote my own this weekend.

In the top right hand corner on my home screen you'll see an icon for my new Tunes site (next to the Humzoo icon). That provides easy access to my home music library on the go. From there I have a list of numbers and letters to simply navigate to artists starting with that character.
At that point I click the artist I want to listen to by clicking on their name. Then I select the album I want. The I see the songs in that album. When I click on one it starts streaming in QuickTime on the iPhone immediately. I tried it out an number of times as we ran errands over the weekend and it worked awesome! There were only two cases where the song seemed to hang for a few seconds before it started playing. But I imagine that was because Niki was downloading the Kenny Loggins discography on her computer.
The example below is from a few screen shots I took on my iPhone over the weekend. I know I am going to get hassled about my slim Nirvana album collection. Let me explain. I have them all, just not in a digital format (yet). Its on my to-do list. And yes, I agree Bleach was the best Nirvana album ever.

I took my Tunes app just a little further than Dave did. I wanted to get as close to the look and feel of iTunes as possible. I wrote a script to dynamically pull in album covers from Amazon. It passes Amazon the artist and album name in a keyword parameter, using their API, and it sends back an bunch of XML. I parsed the XML to find the thumbnail version of the image and display it next to the artist or album. Its super fast and adds a nice visual to the overall bland page.
The guts of my application are as follows. I chose to setup a web server on the machine where all my music lives, which happens to be a Windows machine. I installed Apache and PHP to get the job done. I had to setup two sites in Apache's virtual host configuration file to get two drives mapped for the site. So my music is actually referenced from a sub-domain off the primary domain when the web site is hosted. I'm using dyndns.org to do the DNS routing for me and I'd love to share the app out so you all could see it, but that would totally hose my home network.
As Dave mentioned in his blog there are some downfalls to this setup. The primary one being that there is no way to play files subsequently. So after you finish listening to a song you have to click on the next song to start playing it. I assume Apple has prevented the playback of playlists (m3u, pls...) on purpose. If someone could get this working there wouldn't be much need for a large hard drive going forward on the iPhone, except for large movies I supposed.
I'm okay with this though and I knew that it was a limitation going into it. I can still access all my songs on the go or download them from a browser if I need to. There maybe a possible work around to the streaming limitation though, I am starting to look into that now.
Dave and I have talked about writing a Humzoo App for the iPhone. Its gonna happen someday. We've recently applied for our Dev Program license and plan to pay the $99 when Apple gets around to getting back to us on our enrollment status. Neither of us have any experience with Objective-C or the iPhone SDK so there will be a learning curve involved, which we are both ecstatic about. The biggest challenge I think will be figuring out how to write a compiled application from two different locations.
I may write an app in the meantime to replace my home music site with a real app that can stream music and interpret playlists. That's just the beginning of what the app could become but that alone would be enough for me.
If anyone is interested in setting up a home music server for themselves I am happy to share my code with you. I'll warn you that its not for the HTML/Dreamweaver guru but with a little knowledge of Apache and PHP could you get it up and running in no time.
Can't wait to hear more about it!
Oh and since you posted a shot of your home screen, I now know WHERE YOU DO YOUR BANKING. Muhahahaha. With that information, I can do...nothing. Absolutely nothing.
At least you had the good sense to put the icon to your favorite Furries site on the second page of the home screen.
Well anyway, I don't have a fancy snazy iPhone yet, but I do have an iPod touch. Does everything the phone does, just doesn't connect to the cell phone network or make calls, but it's got wifi.
This weekend I used it in conjunction with my iPod boombox to stream music while I was washing Mrs Shoo's car and working on my tan. It's a great service. You can either have it play recommended music based on what you've listen to, or type in an artist and it will play music from similar artists.
Very cool stuff. Works as an application with the PC as well.
Tangent: Who needs sattelite radio now with an iPhone 3G?
Sorry to take over your post Denny, but your web application sounds awesome except for that part of not being able to play consecutive songs. I guess if you ever get the sudden urge to hear Sir Mix-A-Lot's Baby Got Back, you're covered.
Me: "Yeah I want to cancel my subscription."
XM rep: "Oh baby, please don't go. We'll give you 3 months for the price of one."
Me: "No, I want to cancel."
XM:" Come on sugar, don't be like that. Okay, we'll give you the next 3 months free."
Me: "No. I want to cancel. Forever."
XM: "Was it something I did? I can be better. I can change."