LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2006, 09:16 PM   #1
supradrvr
LQ Newbie
 
Registered: Nov 2003
Distribution: Gentoo
Posts: 21

Rep: Reputation: 15
mp3 jukebox idea (different idea then I have seen)


Ok here is my idea. I have an old jukebox chasis that played 45's. It is no longer fixable and I bought another to replace it. Here is my plan but I cant seem to find the way to do it. I want to use a pc with linux and an lcd display to display songs and artist but here is the part I cant figure out. I want it to work like a "real jukebox". In other words, lets say I have a songs file name set to 100.mp3, but the id3 tag has a real artist and song title for the display, if you hit 100 then # (# actually presses enter key) on the keypad it executes a script that plays song 100.mp3 but then also be able to input other numbers that will call up more songs after it has finished. I have done a lot of searching but I dont find anything that is quite what I want. If any one has any input I would be greatful. Thanks
 
Old 03-27-2006, 02:27 AM   #2
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Are you asking for software suggestions, or programming suggestions? What have you found when you've been searching?
 
Old 03-27-2006, 03:21 AM   #3
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
On a very basic level (i'm not a software developer) and just wondering how i'd tackle this problem.

I'd use cplay or a similar CLI media player, hopefully one that can read from text files.

You could make alias' for each song (long winded, you could make a script that easilly added the alias line including specified file/artist etc.)

so you'd have alias

Code:
alias 100="cplay song.ogg"
And so on for all your songs. That way you can type your number, hit enter in the shell and have it execute the command and play the file. You could also have something a bit cuter to list the files for the user to browse through. Now for playlists and such you can write a script called playlist or something (scripting isn't my strongest point :P) that takes your number/s, finds it in the alias list strips the file out and appends it to a text file (or .pls or whatever), once it returns false for checking new input (your song numbers) it goes ahead and runs the media player with that text file as input (or give the option to save the file).

Anyway that's REALLY basic off the top of my head but can't see anything impossible in there
 
Old 03-27-2006, 06:51 AM   #4
zidane_tribal
Member
 
Registered: Apr 2005
Location: chained to my console.
Distribution: LFS 6.1
Posts: 143

Rep: Reputation: 18
shell scripts to the rescue!

Quote:
Originally Posted by supradrvr
Ok here is my idea. I have an old jukebox chasis that played 45's. It is no longer fixable and I bought another to replace it. Here is my plan but I cant seem to find the way to do it. I want to use a pc with linux and an lcd display to display songs and artist but here is the part I cant figure out. I want it to work like a "real jukebox". In other words, lets say I have a songs file name set to 100.mp3, but the id3 tag has a real artist and song title for the display, if you hit 100 then # (# actually presses enter key) on the keypad it executes a script that plays song 100.mp3 but then also be able to input other numbers that will call up more songs after it has finished. I have done a lot of searching but I dont find anything that is quite what I want. If any one has any input I would be greatful. Thanks

now, as i understand, you want it to work like a real jukebox, yes? so you basicly punch in the numbers, and the jukebox will queue them and play them sequentially in the order you typed them in? and your basic setup so far is that you have a list of songs called 1.mp3, 2.mp3, 3.mp3 etc.

you can create a shell script to do this, to read the input number with 'read' (a command built in to bash), add .mp3 on the end, then pass the filename to an mp3 player like mpg123, and an mp3 tag reader like tagmp3 to read the tags and pass them to your display. that will enable your shell script to run in the foreground, and accept all the input, and control the mp3 player and display in the background.

if your not sure about writing a shell script to do this, then by all means give me a nudge, it sounds quite interesting.

oh, and if you need any help with the hardware side of things (mounting the pc, any physical building help) then try checking out http://www.bit-tech.net/, its a 'modders' site i hang out on, people who put pc's in various things, mod their cases, etc. nice people, and no doubt they would love a project like this.
 
Old 03-27-2006, 01:26 PM   #5
supradrvr
LQ Newbie
 
Registered: Nov 2003
Distribution: Gentoo
Posts: 21

Original Poster
Rep: Reputation: 15
zidane_tribal you hit the nail right on the head. I just did not know exactly how to make the scripts. I have the pc parts already thats not a problem. do you think you could give an example of the shell script, something to get me started? Thanks everyone for the responces.
 
Old 03-27-2006, 05:10 PM   #6
zidane_tribal
Member
 
Registered: Apr 2005
Location: chained to my console.
Distribution: LFS 6.1
Posts: 143

Rep: Reputation: 18
sure thing, lemme poke it, its stupid'o'clock here now and its been an insane day at work, im gonna hit the hay and i'll have a tinker in the morning when its quiet, see if i can come up with something easy for you
 
Old 03-27-2006, 05:45 PM   #7
supradrvr
LQ Newbie
 
Registered: Nov 2003
Distribution: Gentoo
Posts: 21

Original Poster
Rep: Reputation: 15
Typical Monday for me too. No big hurry, take your time. Thanks
 
Old 03-27-2006, 06:22 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,201

Rep: Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089Reputation: 6089
So what kind of budget do you have for this project?
You can use a LCD display with a serial port interface and a PS/2 keypad for data input. I see this simple script now becoming a c program. If you want a more professional keypad of sorts you can build one that uses the parallel port. Hopefully your intended Motherboard still has some legacy stuff. USB would complicate things a touch.
 
Old 03-27-2006, 07:58 PM   #9
supradrvr
LQ Newbie
 
Registered: Nov 2003
Distribution: Gentoo
Posts: 21

Original Poster
Rep: Reputation: 15
My design was to use a 40x2 lcd display and interface either serial or parallel, a PII/PIII mobo with 450 mhz and 128-256 meg ram. I plan to "hack a keyboard" and interface it with the keypad that exists in the jukebox chasis I already have. The only thing I dont have for this project is the lcd display and the program to run it. The display I found for about $20 and well the program I am hoping someone will be willing to help me along with that. I do know the flow of program should be as follows -

User inputs number - say 100
program starts playing song 100.mp3 and awaits another input.
user inputs 220
220 has to be put in a queue so that after 100.mp3 is played 220.mp3 gets played and each song there after. And of course the id3 tag of the mp3 gets displayed on the lcd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
An idea corbintechboy LQ Suggestions & Feedback 3 03-31-2006 08:40 PM
Any idea where I can get animal noises in MP3 format? davee General 5 01-20-2005 08:46 AM
just an idea corbintechboy LQ Suggestions & Feedback 3 01-31-2004 05:21 PM
any idea... kazuni Linux - Newbie 4 05-23-2003 03:17 PM
No idea what to do. Tayste_2000 Linux - General 3 06-18-2002 10:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration