“Music Box” – anyone wanna hack?

Howdy all, long time no see. There’s a tidy little use-case not being addressed well by existing software… something like:

“You’ve got a song on your laptop, you want to play it on your stereo, but being tied down by a wire is a bummer”

Computers in the living room, yada, yada. If you’re a chump who’s really with it, you have some fancy bo-schmancy media server, you compulsively synchronize your laptop’s music (most computers are laptops now) with your media server, and its plugged into your 13.1 channel dolby ultra-digital super-surround system. Me? I’ve got a busted old laptop plugged into my ghettoblaster. I think I updated its music folder last year.

Phase 1: It’d be pretty cool to make a sort of “free airtunes” that ran on Gnome, OS/X, & Windows. It’d have a speaker-server piece that you drop on your computer by the stereo, and it’d have a client piece that manifests as a notification area icon. Whenever a speaker-server is visible on the local network (zeroconf/rendezvous), you get a pull-down in the notification area to select the speaker-server for output. When music is played in your music player, it comes out through the remote server. By inserting into gstreamer or coreaudio (on Windows?) you intercept data while its still OGG/MP3, and zip it over the wire(less). So… you use your normal music player, and it just happen to tunnel through the network and come out on a stereo across the room.

Phase 2: A really simple queue-based HTML music player that runs on the speaker server. So you can still play directly as in Phase 1, but multiple people can also connect and “queue up” songs to be played in the future. So the queue is a mix of music queued by different people from their local laptops, and its pretty much just a “here’s what’s coming next” list, a play/pause button and a skip.

I think a solid implementation of Phase 1, that was dirt simple to install would find a lot of users. I think there’s some cool places to go with this after Phase 1 too, in the direction of music server player stuff more targeted than “home TV screen media server” stuff. I admit, they overlap a bunch, but I think there’s benefit to be had from a focused attack on music (also small diffs like the focus being local-to-computer music, not synching to a central archive, etc).

Anyway, I’m up for hacking on something like this as a contributor, if somebodyelse(s) is(are) down to be the Big Boss(es). In particular, I’m happy to help with design as desired, write the OS/X client bits, and contribute code on other assorted pieces. I’ll drop by #musicbox on irc.gnome.org for a couple days to see if there’s interest. So if you’ve got interest in a new project and this looks fun….

28 Responses to ““Music Box” – anyone wanna hack?”

  1. Oli says:

    Pulseaudio + MPD + Some web-GUI for MPD = Win.

  2. Eugenia says:

    If you already own an iPod Touch or an iPhone, you can buy an AppleTV, and then control it with your Touch/iPhone. It’s the best way to get your music on your stereo, and have a remote control for it that doesn’t suck since it’s fully visual (and works from everywhere in the house). This is the sexiest approach.

    If you don’t own a Touch/iPhone, then get a cheap $150 netbook (put your media either on an SD/CF card, or an external drive if you have too much of it). Put Linux in it with MPD or another visual media front-end, and an IrDA controller to be able to use a remote control. Again, it will look really sexy with a screen. Not as a good/integrated solution as the iPhone-Touch/AppleTV solution, but second best IMHO.

  3. Eugenia says:

    Another thing you can do is buy a cheap, used Zune (~$70), and its Zune Dock with cables and a remote control (costs just $23 on Amazon), and then use that connected to your stereo.

  4. adel says:

    @Eugenia

    I think there’s commercial solution for everything… even printers

  5. Use pulseaudio to play music from your laptop to the sound card of your other computer.

  6. [...] “Music Box” – anyone wanna hack? « Seth Nickell Tags: browser, fix-this, invalid-request, key-shown, please-contact, problem, request, server, [...]

  7. Yo'av Moshe says:

    As Oli said, PulseAudio can output the sound to another server, and can do the switch on-the-fly. I’ve used it for your exact idea (Phase 1…).

  8. realrandom says:

    This seems as if you’d want to set up a Pulseaudio RTP-server and have some sort of auto-detection on local lans?

    Then all that’d need to be written is a daemon/pulseaudio module that broadcasts when an rtp-server gets started or pokes around if there’s one on the net when you connect to the (w-)lan.
    I don’t know how for sure but I think that could be easily integrated into pulse-audio and [whatever volume-manager-frontend you use](for the notice/sink-switch).

  9. John Stowers says:

    I already do Phase 1 using a broken laptop as a networked pulseaudio sink.

    You could also Pulseaudio -> Airport express (http://www.shivaneck.com/?p=119)

  10. [...] Here is a strange post: “Music Box” – any one wanna hack? « Seth Nickell [...]

  11. [...] from: “Music Box” – anyone wanna hack? « Seth Nickell Posted in Talk About Music | August 23rd, 2009 Leave a [...]

  12. [...] Here is the original post:  “Music Box” – anyone wanna hack? « Seth Nickell [...]

  13. [...] Read the original: “Music Box” – anyone wanna hack? « Seth Nickell [...]

  14. Unfortunately mimicking an Apple AirPort is not possible due to apple’s encryption, so no using iTunes to stream music to anything other than Apple hardware. However, what you really want anyways is to set up the laptop machine as a UPNP media renderer (and optionally a media server, if you store music on the laptop as well). You can then use a UPNP control point to play songs through the media renderer. the media renderer can use any media server as the source of its data, so you get the property above of anybody with compatible software being able to stream songs from their own machines. However you *don’t* get playlist queues, as far as i know, so that doesn’t fulfill all the properties of phase 2.

    At this point i should probably mention that i am working on a project that does (among other things) function as a UPNP media server, and I am currently designing on a plugin that implements the web-based control point and renderer part using gstreamer. Shoot me an email if you want to talk about possibly integrating your ideas, you’re definitely not the only person who thinks this stuff would be really cool (and can be a vastly better experience than being hog-tied to Apple’s proprietary formats, protocols, and software)

  15. You should take a look at the UPNP AV media server standards, and the restricted/extended version known as DLNA. While the DLNA specs are closed, the base UPNP AV specs are open, and are being implemented by various consumer electronics devices right now.

    It supports a number of modes of operation. In one mode, I can tell a remote player to start playing a track (e.g. tell the television to start playing a stream produced by my computer). In another mode, my computer can publish a content directory that the remote player can browse and pick which stream to play (e.g. browse my music collection from the TV and pick which songs to play).

    There is already some software implementing the content directory and stream server portions of this for Gnome in the form of Rygel: http://live.gnome.org/Rygel. The latest version of PulseAudio can hook into Rygel to have its streams published.

    It won’t capture the music before it is decoded, but then you only need 1.4Mbps of bandwidth to transmit uncompressed CD quality music, which is not a problem for most home networks. I usually end up sending uncompressed audio anyway since neither my TV or PS3 supports Vorbis.

  16. By the way, I am not suggesting you give up on the idea of working with a Linux box connected to the stereo here. I am suggesting that you see if your ideas fit into the existing industry standard protocol.

    That would make it possible to stream to existing devices (e.g. PlayStation 3, many HDTVs, some stereos, etc) and stream from various existing media servers (including ones on MacOS X, Windows and built into various NAS devices).

    It has the opportunity to make your own code a lot more useful, and there is a good choice of libraries available to help build such software.

  17. [...] “Music Box” – anyone wanna hack? « Seth Nickell [...]

  18. [...] “Music Box” – anyone wanna hack? « Seth Nickell [...]

  19. ssam says:

    i used to use rhythmbox running on headless box by the hifi, with iits display forwarded over ssh to the laptop. worked ok, but the UI was fairly slow.

    now i use mpd running on the headless box, and gmpc on the laptop. works pretty well.

    the missing usecase for me is when i have an app on the laptop that wants to make music. i am preety sure this can be done using pulseaudio, but it does not seem to be easy. ideally on one machine, in the sound prefs you’d tick ‘allow streamed sound from other machines’, and then that machine would show up as a sound card on other machines on the network. (on a headless machine you’d need to flick it on in a config file). zeroconf should do all the finding, PA all the streaming.

    it would be nice if it could also do uPnP with just as little effort (and the user not needing to know which protocol they are using)

  20. Ross Burton says:

    If you run a small Linux box by the speakers with PulseAudio and the GUPnP plugin, PA will announce itself as a UPnP Audio/Visual MediaRenderer. Any UPnP AV tool can then play music to it, and thus your hifi. Throw in a NAS running a UPnP AV ContentDirectory server (gmediatomb, rygel, etc) and a N810 running MediaStreamer, and you can play music from your posh graphical remote control without people knowing that it’s all Linux.

    UPnP is a bit overcomplicated in places, but it does let some nicely complex use-cases work.

  21. Calum says:

    Sounds a lot like what (non-free) AirFoil Speakers does already– there’s even a Linux version:

    http://rogueamoeba.com/airfoil/speakers.php

  22. [...] “Music Box” – anyone wanna hack? « Seth Nickell [...]

  23. [...] “Music Box” – anyone wanna hack? « Seth Nickell [...]

  24. [...] “Music Box” – anyone wanna hack? « Seth Nickell [...]

  25. Anonymous says:

    Pulseaudio + Rygel -> any UPnP receiver such as the PS3. It’s the upcoming release so not packaged in any released distro yet(?) but as of this autumn you can stream ANY sound from your laptop or other computer to any UPnP enabled device.

    I have a PS3 connected to my surround system and to the same router as the wireless. Spotify, downloaded songs, youtube (for the sound only, not an uncommon use case on parties), whatever – it all goes into the real speakers.

  26. Søren Juul says:

    Hi, I have been working on something that might interest you, it is a remote control for vlc, with a simple protocol which could easily be implemented on other platforms, both the server side and client side, (my client implementation is for android and my server implementation is on linux communicating with vlc via dbus). However it relies on the media being available on the serverside, but I guess that could be fixed by using samba.
    You can read more about it at http://xn--srenj-vua.dk/?p=329

Leave a Reply