Want to make a custom karaoke script - tips?
#1
Question 
I would like to make my own custom script to play karaoke CD+G files in XMBC. This functionality is already present in XBMC, of course, and looks quite nice. However, the input methods leave something to be desired. So I want to make my own script that inputs via PC keyboard.

Here is how I imagine the input would work. I have a large list of track IDs corresponding to songs, i.e. "VAN1006-03 Van Halen - Jump". I would take in just the track ID ("VAN1006-03") and find the file automatically in my script using directories named after the first part of the ID (e.g. "VAN1006") and locating the filename itself using the second part of the ID ("03").

My difficulty is in knowing how to interface properly with the karaoke portion of XBMC. Ideally I would like to have a small translucent window overlaying the visualization in the upper right, displaying the current song and perhaps two songs before and after that song in the current playlist. You could delete songs by moving up and down this playlist and hitting a certain key. and you should be able to add songs by typing the track ID in a small text box above these items, which, after entering in the code, would show the filename and confirm.

What is the best way to put in this functionality? My initial guess is to use a Python script but I am very new to all this and my guess could certainly be quite wrong. I am comfortable with coding in many languages and on many platforms, so I don't mind hacking the main code if I have to but would like to stay away from that for convenience's sake otherwise. Thanks for any help you can give me.
Reply
#2
One more thing - I already have the PC keyboard hooked up through an XBox controller, so don't worry about helping me with that part.
Reply
#3
Actually FYI; XBMC do not support reading Karaoke CD+G subchannels, it does 'only' supports MP3 plus CDG files (which can be ripped off Karaoke CD+G CDs using custum tools on your computer). This is because no one has implemented it in XBMC yet.

However you might be interested to look at the xbmclyrics (lyrics) script as a base for your code (though the xbmcscripts.com site is temporarly down so you could have troubles downloaing the latest version).

Good luck.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
http://xbmc-scripting.googlecode.com/svn...C%20Lyrics

I'm not really sure how to do a Karaoke script, but if the lyrics had timestamps, you might be able to use the embedded lyrics scaper and modify the script to select the correct line in the list. You would have to use the list control and not the textbox control, so each line could be highlighted.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
you would have to rip mp3+cdg files from all your cd images
Reply
#6
For clarification: yes, I do already have the CD+G discs ripped as MP3 + CDG files. They work great in karaoke mode for XBMC, so I know they're good at least.

To Nuka and Gamester: I was hoping I could use the existing functionality for karaoke that exists already in XBMC (it's quite good) and just modify it a bit. If I am understanding what you guys are saying correctly, is it true that I will have to redo all of karaoke mode on my own in this script? I was hoping there was some easy way to hook into that CDG and Visualization functionality in my script and just modify it a bit.

If I have to reengineer the functionality, do you think I will be able to reuse a lot of the code from the main code library? I know the languages are different but I was hoping that the general structure and the XBMC API calls would be mostly the same.
Reply
#7
Smile 
Sorry but I can not answer that, I am not a programmer/developer myself. Niether do I think that any of our active developers have been involved in the existing native (C++ code) karaoke feature/function in XBMC. I'm not even sure that there is an open API for it that you can 'hook into' so to speak.

Though I think that if you have questions about the native (C++ code) karaoke feature/function that does not directly involve python scripting then you should start a new topic-thread in our other development forum instead, as mostly only python developers look in these python forums.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
Gamester17 Wrote:Sorry but I can not answer that, I am not a programmer/developer myself. Niether do I think that any of our active developers have been involved in the existing native (C++ code) karaoke feature/function in XBMC. I'm not even sure that there is an open API for it that you can 'hook into' so to speak.

Though I think that if you have questions about the native (C++ code) karaoke feature/function that does not directly involve python scripting then you should start a new topic-thread in our other development forum instead, as mostly only python developers look in these python forums.
Ok, that makes sense. Thanks, I will try that.
Reply

Logout Mark Read Team Forum Stats Members Help
Want to make a custom karaoke script - tips?0