Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
Music Media

A LAN-based Democratic Jukebox? 27

Talez asks: "The environment I live in is pretty much communal and frequented by a few people. Sadly, none of us really agree that much on particular songs. What I'm trying to do is take a Linux box with a high quality soundcard and a bloody big hard drive and try to turn it into a democratic jukebox." Sounds like an interesting idea, and would be interesting to implement on a PC considering the variety of media out there (Vorbis, MP3, CDs and other digital audio formats). Has anyone looked into doing something like this? If this turns out to be a DIY solution, how would you do it?

"I'm trying to find the right combination of hardware and software to accomplish this. What I'm looking for is a system where we can bring up a page on the local LAN, and punch in a username, password and a rating for the song that is playing. Over time, the songs that have been rated higher by the people around the area will get played while the ones rated down won't get played that often. Also, if all of us say that a song -really- sucks, we can get it to skip the song.

While hardware is a matter of choice, I'd appreciate any experience people have had with different soundcards and high quality output. Also, all of us can code decent C, one of us has decent C++ skills and I can throw together semi-basic SQL queries. Is there any software out there that will fit the needs for this situation or at least provide an open source building block for us to go from?"

This discussion has been archived. No new comments can be posted.

A LAN-based Democratic Jukebox?

Comments Filter:
  • Actualy I undertook a project along these lines a while back minus the democratic part. MP3Linux was basicly just a cheap name I came up with at 3am. Did bunches of neet things, you could finger [string]@mp3box and as long as their was only one match it would kick it up next in the playlist. Or if you were feeling adventuresome you could telnet to it on a specific port and browse though a menu listing and try to find the song of your choice. It did have the notable feature of only queueing songs for playing, so people wouldnt fight over which song was currently playing.

    Once I get home from work I'll try to dig up the harddrive I had it installed on. I axed the project since I didnt have any drives larger than a gig to deticate to a jukebox machine.

    Also, I think they have something like this over at ID Software. jukebox.idsoftware.com if my brain serves me correctly.
  • I'm not sure how "high quality" you want, but I should mention that all SoundBlaster Live! cards, which are cheap these days, have a digital optical output. Now, if you had some hi-fi stereo equipment and a reciever with a digital optical input, thats the highest quality you can get. So, really, you can pay more than $50 for a sound card, but there would be absolutely no reason to.

    Buy a good reciever, speakers and subwoofer.

    Wish I knew even a little to help with the rest of your project, but I'm just a college student who failed intermediate java. I wouldn't be much of a help in anything there.

    I'd love to hear how this project turns out. Feel free to e-mail me if this ever gets off the ground!

    -NeoTomba
    • You are correct in that they have a digital output, but for optical digital output a daughter card is required. I bought mine from ebay for about 25usd. But think of cable cost if you are going to use optical, a 5 meter cable cost me about 90usd. I would have used coax, but I only have one coax input on my receiver, the other 5 are optical.
      • You can pick up the cables for about $20usd at Best Buy. I have pretty much the same setup and it sounds GREAT!
    • But remember, if you're going to be playing mostly MP3's your sound quality "bottle neck" is probably going to be the MP3's themselves. Personally, I think just getting a Creative Ensoniq AudioPCI 1371/1373 card for about $20, which is well supported by the Linux kernel, would suit your needs just fine, unless you wanted digital out.
      • Re:on sound cards... (Score:2, Interesting)

        by _typo ( 122952 )
        If you're encoding at 128kbps *maybe*, but lame's vbr (r3mix.net) settings give cd quality which is certainly not a bottleneck for your audio. Your soundcart will be.

        I still don't know why soundcards still exist in their current form. Computer cases are horrible environments, full of noise and static.

        Motherboards manufacturers should just agree on a standard digital header for audio and then Creative/etc would just make external Digital-Analog converters.

        Of course you CAN already do this with USB audio and with soundcards with digital output, but why even bother with having a full blown soundcard in your PC when a good DSP plus an external converter will do a much better job?

  • One Solution (Score:3, Insightful)

    by HyPeR_aCtIvE ( 10878 ) on Thursday November 08, 2001 @02:04PM (#2538678) Homepage
    I don't think that this really would be all that hard. In the situation you are in of course. Heck, I think a small script/batch file and a few web pages would about do it.

    Here is my thought.

    You have this PC machine with the good speakers/etc playing the songs (I'm assuming that this is powering speakers that everyone can hear, if this is shoutcasting or streaming somehow, that's a different story, but not TOO much worse).

    On that machine make sure you have a web server going.

    Now, write a small script that will look through a directory of mp3s, randomly pick one and play it. As it does this, it 'marks' that one as being played (for example, writes it's name into a file 'nowplaying.txt').

    Ok, now write a little CGI/PHP/etc page on your website. Make it prompt for a username/password, and then display the song that is playing (by reading nowplaying.txt), and ask for a rating.

    Store these ratings in a big file, let's say 'ratings.txt'. This file can have 1 line per song, and have a list of ratings after it. So if you have 5 people, and you only have 2 ratings (0=hate it, 1=like it) it might look like this:
    Stairway_to_Heaven.mp3 0 1 0 1 1

    Ok, So actually what you would need to do is autogenerate this ratings.txt file in the first place with ALL of the filenames in it, but no ratings yet. Now, instead of making your random player script actually look at the directory of MP3s, have it each time load this ratings file, and 'randomly' pick from it. In this case, if you have 5 people, and a hate it/love it system. You could simply have any song that has 3 hate its, never be played. Beyond that, give any song as many 'chances' as it has 'love its'. So a song that is 4 loves, 1 hate, as twice as much chance to be played as a song with 2 loves, 2 hates, which has twice as much chance to be played as a song with 1 love, 0 hates. etc.

    Of course, this is the simple version. You could easily have a more complicated rating system and therefore a more complicated picking system.

    But the basic gist is:
    1) A random picker script that loops forever, reading ratings.txt (or a DB), applying rules to pick the song to play, and playing.

    2) A CGI that asks for input on the song being played via reading nowplaying.txt, and updates ratings.txt
    • Re:One Solution (Score:1, Interesting)

      by Anonymous Coward
      ...these ratings in a big file, let's say 'ratings.txt'. This file can have 1 line per song, and have a list of ratings after it. So if you have 5 people, and you only have 2 ratings (0=hate it, 1=like it) it might look like this: Stairway_to_Heaven.mp3 0 1 0 1 1
      Dude, that plain text is dying for some XML. I'm thinking all you need is the filename because you'd get the rest from an ID3.

      <song filename="Stairway_to_Heaven.ogg">
      <user name="tom">awful</user>
      <user name="dick">awful</user>
      <user name="harry">awful</user>
      </song>

  • Echo (Score:3, Informative)

    by TheDarkRogue ( 245521 ) on Thursday November 08, 2001 @02:11PM (#2538751)
    I Hate to advertise and all, but there is something like what your looking for at http://www.Echo.Com. They Stream Music to you in a radio like way, except you get to vote to skip songs, and You also would rate the music. They have a good variety of songs, but it seems to take them a few weeks/months to get new releases. If you made a company station and just had everyone make and account and join that station. If you want it played from a central source, just hook the computer up to a sound system and have it play what ever the echo player is. The thing is that they would be able to listen to it themselves on whatever machine they were at as long as it had a soundcard.

    On the note of hardware, I would use an SB Live. I Have one myself and love it. Greatest Sound Card I have ever owned.
  • Dr. Dobbs Journal had an article in its January 2000 issue titled "The Ultimate Home Jukebox".

    The authors basically took their 300+ CDs, ripped them to MP3 (and created a filing/naming convention for them all), stored them on a server with a web based interface, and hooked the whole thing up to their home lan and stereo. It's exactly the info you are looking for.

    The article is available online from the DDJ store for $5. http://www.ddj.com/store/ and follow the Dr. Dobbs Online Library link.
  • I have tried the program that lives at
    http://www.globecom.se/jukebox/

    It can do ripping, playing, queueing, and many other things all with a web interface. It stores MP3 information in a MySQL database. If voting is not currently implememted, the structure of this app allows easy addition of the feature.
    • Have to agree, this program is very cool.

      It features random play, operates headless, song voting, different users and playlists.

      Playlists are the best feature on this jukebox prog, here is why from the website: [globecom.se]

      Song groups and playlists Many MP3 players include playlists to permit a collection of songs to be played as a whole. Plenty go further and permit the contents of a playlist to be played in random order. GJukebox improves on this through the use of song groups. When selecting songs at random, Jukebox can be set to include songs in certain groups exclusively, non-exclusively or to exclude songs from a group. When organizing your songs you simply create groups to contain for example, Jazz and Blues. You can then play just Jazz, just Blues, both or neither ( ie everything else ). Instead of forcing you to tell the Jukebox explicitly what you want to hear, you can use the groups to define moods and occasions. It's simple, logical and powerful.
    • It looks perfect for the type of situation that I'm in. Thanks for showing me this :)

      Talez
  • > a new person arrives
    all the songs a rated already so how does the new person's choice make much difference

    > tastes change
    that new limp biskit tune was popular last month but now everyone is sick of hearing it. in three months though ppl will say "yeah, that ch00n r0x0r5" when they hear it (or at least they would in my irc channel :)

    personally I'd go for a web server interface and mpg123 [mpg123.de] as the engine and cobble together some scripts

    tbh so long as there aren't loads of tunes ppl hate then your probably just as well off running it in shuffle mode and tweak the playlist as you go along.

    if you use a webserver for your mp3's then users can use xmms and winamp to play a tune that's not on the playlist
  • Take a look at http://obs.freeamp.org/ Network-based jukebox software, and it supports multicast too :)
  • Tunez (Score:2, Informative)

    by jvhaarst ( 64020 )
    http://tunez.sourceforge.net/
    Gee, how hard can typing in "mp3 vote" in freshmeat really be.
  • Mserv [mserv.org] has worked for me in the past. It has telnet and web interfaces and the latest CVS version supports Ogg as well as MP3.
    • Re:mserv (Score:3, Informative)

      by Paul Carver ( 4555 )
      This is the program I mentioned in another post. Mserv [mserv.org] does exactly what the original poster requested. I used the command line client and Penguin Power, [ucsd.edu] a Linux X10 program, so that I could control playback and rate songs using an X10 wireless remote control. Much better than a web interface, IMHO, because the music can be controlled from a chair in the living room, or from the kitchen, or anywhere else.
  • The software you're looking for already exists for Linux. Search on freshmeat.net. I don't remeber the name because I haven't used it in at least six months.

    The reason I haven't used it in at least six months is because my sound card sucks, so I'll have to disagree with the person who recommended the Creative Ensoniq. This sound card sucks. The sound is filled with static and crackling even with a very short patch cable.

    I upgraded my motherboard and CPU and case. The new one has on-board sound that Mandrake 8.1 can't detect so I reused the Creative Ensoniq. I can veryify that this sound card sucks in two different machines under Mandrake. (It sounds fine under Windows)
    • I can veryify that this sound card sucks in two different machines under Mandrake. (It sounds fine under Windows)

      I have the opposite problem with my Laptop's ESS Solo. It sounds just awful under Windows, like the quality of a 64Kbps to a bad 128Kbps MP3 no matter what the audio file quality it is. However under Linux it sounds great, the audio sounds the same as if it were on CD.

      Both tests done using Winamp (under Wine in Linux) just so we know the player isn't what is causing the bad sound.
    • sounds like a busy pci bus.. try checking your latency timers. I get simular "scrachy" tunes when one of my hard drives spins up for the 4 am locate database rebuild. It seems the cpu isnt giving the sound card enough cycles vs my ide card.

      DRACO-
  • Sorry about this beinbg a long post, but I've done something similar to what I think you're asking about. I've set up an old Pentium 200 w/Linux 2.2.19, 128MB RAM, Ensoniq sound card, and 120GB of dedicated music storage, with...
    (enters command)

    thorin:/music$ find . -name '*.mp3' -o -name '*.ogg' | wc -l
    12648

    thorin:/music$

    ...mmm, alot of songs (900+ albums, yes I own all the CDs), organized by alphabetically by Artist/Album/Song. I use Edna [sourceforge.net](v0.3?) as the music web server to serve the music (hacked slightly to support .ogg files) on a 10/100Mb house LAN. Edna will allow selection of individual songs, pick from existing playlists, or dynamically generate a 'play all songs' playlist that works from the selected level down.
    Any user at a client computer on the LAN can use their preferred browser to stream whatever music (album/playlist/song) they want to their local desktop. Windows clients currently are using Winamp, Linux clients are using XMMS, but any client with support for streaming mp3 and ogg files should work.
    For MP3s I use ID3V2 tags because they work with streaming. The tags on the .ogg files seem to stream just fine. I use EasyTag [sourceforge.net] to manage the ID3 tags on the MP3s. Of the TAG utilities I tried, I liked it the best for managing large numbers of MP3 files. I haven't yet found a comparable utility for managing OGG TAGs.
    On the server itself, I use Konqueror pointed at the local Edna web server to pick playlists handled by XMMS via an Ensoniq sound card to the main stereo system. MP3s are encoded at a relatively high quality using LAME [sulaco.org] 3.89 in VBR mode with an average bit rate running about 190Kb/s. I'm currently re-encoding the music from the original sources into the ogg/Vorbis" [xiph.org] format, using an average bit rate of 192Kb/s. I use GRIP [nostatic.org] to rip my CDs with (with full paranoia), and normalize [columbia.edu] to even out the volume variations of songs so that playlists with songs taken from different albums aren't at radically different volumes. There is a volume normalizing plugin for XMMS that adjusts the level in real time, but I didn't like the way it worked. The volume level of the next song was significantly different (louder) than the previous song, it could take a half second or so to adjust itself. Pre-normalizing (with conservative values) seems to work much better. The music currently occupies about 70GB of disk space.

    BTW, my music server is what I use to rip/encode all of the new music, run setiathome, and function as a SAMBA file server/domain controller. It will do all that while streaming music to several clients as well as play through the local sound card without skipping. I discovered that if I used XMMS to read the MP3/OGG files directly from disk (on the server), I had problems with skipping when the server was heavily loaded, even with the XMMS buffers set to very high values, but clients on the LAN would never skip. Streaming to XMMS on the server solved that problem without resorting to the low latency patches for the kernel. On the Linux clients I setting my browser to launch xmms with the -e option which causes new songs or playlists selected with the browser to be appended to the current xmms playlist. ;-)
  • It's called Mserv [mserv.org]. Works great, has a web interface, if you want it, or you can use telnet. You can also filter which songs the weighted random play will consider by date, genere, or whatever else is in the ID3 tag.

    -Nathan

  • Run by fat wreck chords out of San Francisco (I think.) does exactly this. Sort of.

    You tune into the stream, and pop up window tells you what song is playing. In this window, you have a chance to vote on whether or not you like the song. Songs that get voted on more often get played in the rotation more often. I suppose the major missing part is to generate the playlist dynamically.

    Sadly, it looks like they are closing down, however. Should be around for another month at least. According to the site, they use Icecast, PHP and apache.

Nothing makes a person more productive than the last minute.

Working...