Improving karaoke support
#1
I have completed karaoke port to SDL, waiting in Trac (#5439). Since we have it now, it's time to think about other useful features for karaoke, which would help users to enjoy it even more. Being a karaoke fan myself, I'd propose the following list I'd like to work on:

Adding kar format support. It seems to be not really important for English karaoke as most of it seems to be in CD-G. However for non-English karaoke it is still important - for example, there is almost no Russian karaoke in CD-G. I wonder how important it is for other languages as well; would be nice to get some feedback since parsing .kar lyrics is language-specific.

Most likely the playing code should be done in paplayer, and lyrics printing should be done like in Cdg.h. Maybe in another file, as I'd like to have a single "base" karaoke text renderer to avoid changing GUIVisualusation.cpp all the time adding new Render() calls. I would base the player code on timidity++ code (GPL), which takes care of MID->WAV conversion, and then process the resulted WAV further to the audio chain. The lyrics printing will require a separate .kar parsing, but except being language-dependend (and not in utf-8) there are little problems.

Adding song numeric selector. It would be very nice to have some kind of "ID" assigned to the songs which have lyrics, and to be able to select a song by using some hotkey to popup the window, and enter the song number. This would allow the people to pring the list of songs on a piece of paper together with song numbers, and make song selection much faster. Unfortunately I know little about the UI handling code, so I would be thankful for any suggestions where to look in the source code.

Adding a Karaoke-specific visualisation plugin which plays videos as background. On karaoke machines there is usually some video on background. The plugin could just play random videos from a specific folder, and display them without background. To simplify the task the plugin will support only one format which is easy to parse and CPU-friendly to play, like MPEG1 or 2, with no sound. The plugin will NOT support any video type. This video playing supposed to be for visualisation only.

Your thoughts?
Reply
#2
oldnemesis, nice work! Funny I was just thinking to myself yesterday that it would be nice to have Karaoke on my htpc. I used it on my xbox running xbmc but it has been a while. Since my memory is a bit hazy, bare with me here.

My main suggestion would be that you work with one of the awesome devs to get karaoke library support ironed out. The way I see it, all files with a genre of "karaoke" or files in a folder specified in the settings as "karaoke folder"should be added to the library but should NOT show up in general browsing of the library (that way you don't have to versions of livin' on a prayer and realize one doesn't have vocals Wink ) You should either have to select the Karaoke node from the genre list or it should show up as a separate node in the main music library list. This way you could have a button on home screen/favorites menu that jumps right to the Karaoke section of the library.

I really like the suggestion you made about the numbering scheme. This would make it a lot more like a "real" karaoke experience. What I suggest is that xbmc automatically number the songs alphabetically by artist then song. Then there should be a file that can be automatically generated that lists the songs and their corresponding numbers and is output the karaoke folder. This list could then be printed out as you suggested. The xbmc media companion has a similar feature that creates an html file of all of the movies in your library. Quite cool imho. The nice part about this scenario is if you add a new song it can be inserted into the library numbering scheme wherever it belongs when sorted alphabetically by artist then song, and all the numbers can be shifted accordingly. You can then just regenerate and reprint the list. There will be no build up of out of proper sorting order artists at the bottom of the list as your library grows.

These are just some thoughts. Let me know what you think. Cheers.
Reply
#3
It might make sense to do it this way (split Karaoke files into another librari), but it is kinda tricky, because in case of *+G the type of file is not determined by the file itself - it's still valid MP3 - but by the presence or absence of another file with the same file name. Will need to take a look on code to see if it's possible easily. And we're introducing another database which in effect will affect settings, some GUI code, loading/saving etc. So I'd like to hear from devs before going into this direction.

The main problem with artist, song name or alphabet-specific numbering is that all numbers will change when a new song is added into the beginning of collection. This will mean the whole list of songs needs to be reprinted. For someone with ~4000 songs this is quite a job. Also at least on my karaoke parties some people tend to remember the song numbers (after a year of signing the same song again and again), and auto-shifting would make them confused.
Personally I'd prefer 'static' ID - once assigned, never changed.
Reply
#4
oldnemesis Wrote:It might make sense to do it this way (split Karaoke files into another librari), but it is kinda tricky, because in case of *+G the type of file is not determined by the file itself - it's still valid MP3 - but by the presence or absence of another file with the same file name. Will need to take a look on code to see if it's possible easily. And we're introducing another database which in effect will affect settings, some GUI code, loading/saving etc. So I'd like to hear from devs before going into this direction.

I also think it would be optimal to have the ability to scan in the cd-g's. It wouldn't necessarily need a separate db file, and if some changes are considered, neither would we need to be able to detect whether or not they're actually cd-gs (and on a side note, if i'm not mistaken, some cd-gs do have imbedded info rather than secondary complimentary files). I think the best approach (though not sure how much work this is) would just be an addition to the existing music database in the same way as it is done with tv shows/movies. Then, optimally, the ability would be added to the music section to select the content type in the add source dialog, and there we could have options for both music and karaoke, and perhaps music videos as well....I think this would be a good change regardless of the karaoke for consistency's sake....Everything in xbmc is scanned in the same way with the set content dialog except the music section.

EDIT: By the way, thanks for your work! I was disappointed when switching to linux/windows and seeing that it lacked karaoke support.
Reply
#5
I thought about CD-G scanning as well, but it is more like "nice to have" feature than something which is "must have". My main concern is that low-level CD-ROM device handling (as we need to read subchannel data) will most likely mean writing and maintaining four different versions of code - for Win/Lin/Mac/Xbox. Also I'm not sure if this feature is important in long-term, as CD-G most obvious problem - small number of songs on the disk - need to somehow be handled differently.
Reply
#6
well i actually have all my cds ripped onto the hdd. i assume most xbmc users would do the same..
Reply
#7
That's what I expected. I would do the same, as my karaoke player is often used by kids and they're not careful with CDs.

That's why I think this is not a feature which would be high-priority.
Reply
#8
oh I thought you were saying scanning the karaoke music into a library isn't a feature that would be high priority because most would have their music on cd's (and therefore wouldn't have much use for it to be scanned in)
Reply
#9
Sorry, I probably did not make myself clear. Of course having a karaoke library would be a high priority - however adding another type of container is something which needs to be discussed and accepted by XBMC developers, since we're now talking about a lot of small changes in a lot of places through the whole code - from DB loading/saving to skin management. So let's wait for their opinion.
Reply
#10
First off, thanks for your contribution. It will be reviewed when we get the chance to do so!

XBMC should already playback .MID files, so that should not be a problem in terms of the audio only. I don't know how .kar files are done - is it some extension to the midi format?

For the finding part, the number could just be added to the comment field of the mp3 in the case of mp3/cdg - I'm not sure whether .kar/mid files have tag reading stuff in them - I suspect not. I'm not sure how useful that would be, however. One could just name the files with the number on them instead. If displayed in numerical order then finding the right song wouldn't be a problem. If you want to use the library, then the number would have to be in the title or artist name. The existing search functionality would then find the song you were looking for. A script to do this would also be easy enough I should think.

For the last part, extending the dvd player to allow playback from two different sources (or is it one source, the video and sound combined?) and using subtitles with highlighting might be the way to go perhaps?
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.


Image
Reply
#11
Please let me know if you need more input or testing for this patch. So far it has been successfully tested on one party, but on Linux only. I could test it on Windows, but not on OS X as I have no Mac.

Looking further through the source, you're right and it already supports MIDI. Surprise Smile everything I look for is already implemented, nice! I'll need to take further look to make sure it is possible to configure SF2 soundfonts for timidity, as the sound looks awful otherwise. But so far it looks like 1) would not take a lot of efforts either. My XMBC still crashes trying to play MIDI, but it might be configuration issue so I'll take a look.

.kar files are MIDI files where lyrics are added, and synchronized with music via MIDI events. Since paplayer does not do video rendering, probably it should be handled in CDG parsing code (or another class, as we might want to add MP3+LRC/LYR support in future). Timidity already has some .kar handling.

The number is basically part of a larger issue first brought by Rand Al Thor - karaoke music has to be in somehow separated from "normal" music. The most obvious reason is that use cases are completely different. For example, a user wants to listen to "all Pink Floyd music" in his collection - using playlists, smart playlists or just artist lookup. We could assume he does not want to hear karaoke there. And when he runs a karaoke party, he most likely does not want to see four "the wall" in the list and try to guess which one of them is karaoke. While it could be done through an extra field in the music database, there are other considerations:

- Karaoke files is generally not always music. For example, I have several AVI and FLV files which contain karaoke songs played together with video. MP3 file is made karaoke by having another file with the same name in the directory, but it is not the case with other file types. In my case I have a separate share on the server which contains karaoke files only, and it would be nice to have it separated in the XBMC media database as well. A separate database would help to solve this.

- The database needs extra fields which do not make sense for music. Besides the ID, it might make sense to add the song language. Comprehensive search, like by album name, might not be necessary, so the database might be smaller.

While the "extra fields" issue could be resolved by adding the data into Music database, I do not really see a way to properly classify AVI/SWF into music database in case they're karaoke files.

There are no standard way to put stuff into .kar files as there are no tags. People try to work it around by providing some markup language in the text and show it when the song begins, so we might use it as well.

Quote:I'm not sure how useful that would be, however. One could just name the files with the number on them instead. If displayed in numerical order then finding the right song wouldn't be a problem.

This is very useful for karaoke since the people would spend much less time trying to play the next song (which in most cases will belong to completely different artist). They'll find it in advance, using a printed directory (I usually have three copies so more than one person could see the available songs), then type the numbers and have the song added into the playlist while current song is still playing - without disturbing the visualisation and song lirycs. Unfortunately it doesn't make sense to rename songs into numbers, as not all karaoke formats contain metadata. It also makes it much harder to maintain the collection using regular file manager.

Quote:For the last part, extending the dvd player to allow playback from two different sources (or is it one source, the video and sound combined?) and using subtitles with highlighting might be the way to go perhaps?

Yes, sounds like a good idea.
Reply
#12
It may be most useful then to do it all via a plugin or script. There's no need for any database as far as I can tell - all you need is a bunch of files in their folders. That way they can be kept right out of the music library (as you say, they're not needed there) and you have no problem with things such as video vs files - you can easily just list both, in numerical order, and XBMC should play them OK. A script is another option if it requires a different skinning interface.

Cheers,
Jonathan
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.


Image
Reply
#13
Jonathan, could you explain? For example, I have the following karaoke structure:

/P/Pink Floyd/Hey You.mp3
/P/Pink Floyd/Hey You.cdg
/P/Pink Floyd/High Hopes.kar

You suggest to rename them manually to something like:
/P/Pink Floyd/11.mp3
/P/Pink Floyd/11.cdg
/P/Pink Floyd/12.kar

or like /P/Pink Floyd/11 - Hey You.mp3

Or to create an index file in the P/ folder? I'm confused Huh
Reply
#14
I'd just have a plugin that reads the directory structure recursively lists the found karaoke files. User just dumps a bunch of songs in a folder and then runs the karaoke party plugin. Said plugin is a listing of those songs and users can choose them directly from the presented list.

If you need them numbered, then store the path -> enumeration in a file and have the plugin read that in addition to the dir listing.

Cheers,
Jonathan
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.


Image
Reply
#15
Sounds good, but there are two visible issues with this approach:

- Rescanning everything each time the plugin starts might take a while. Just to make the point:

Code:
spot@gw:~> find /home/srv/samba/karaoke/MP3/ -iname \*.mp3 -type f | wc -l
3945
spot@gw:~> find /home/srv/samba/karaoke/KAR/ -iname \*.kar -type f | wc -l
7397

As you see, the MP3 karaoke collection currently has ~4000 files (and growing), and KAR collection is over 7000 files. Since the collection is on the server, it will probably take some time for XBMC to index all the files there, and having to repeat it each time karaoke module is started would be very time-consuming.

- The song numbers are not persistent, and might change completely on next rescan, even if new songs are not added. This would make printed directory useless. Adding new songs should also preserve old IDs, as in this case we'd only print the pages which changed. To get this persistence we'll need some kind of database. Isn't it better to use the enumeration and the database code which is already in XBMC?
Reply

Logout Mark Read Team Forum Stats Members Help
Improving karaoke support0