Karaoke integration redesign
#1
Hi all,

Working through the Karaoke code now, and really dislike the way it is integrated into the core base - essentially it started as a major hack back in 2010 or so, and is still plugged into the code as a hack. This creates many issues:

- The code gets broken all the time (it is broken in current git, for example), mostly because music player was never supposed to do any video by itself;
- Its integration is spread all over xbmc and is not located in a single module;

So the proposal is to make the karaoke module a kind of visualizer. This way if karaoke is enabled, the music player would call it first with the song file (so it can check whether there are any lyrics and they could be loaded), and only if there are lyrics it would activate in full-screen mode automatically. Would need to:

1. Add extra flags into VIS_INFO (such as REQUIRE_FORCE_FULLSCREEN);
2. Add bool (__cdecl* CanStart)(int iChannels, int iSamplesPerSec, int iBitsPerSample, const char* szSongName) function into its API to find out it is started;
3. Add bool (__cdecl* Stopped)() function into its API to notify it the song playback is stopped (karaoke loader can allocate up to 512kb of RAM, no need to keep it until the next song);

seems to be all needed for now.

Another part of Karaoke functionality is related to Karaoke numbering. I'd like to replace it with an addon/plugin as right now it is major UI hack, but this can wait as even when it breaks it doesn't affect the core.

What do you think?
Reply
#2
I'm not specifically interested in karaoke, but I hate broken stuff Wink
Could you describe the failure in current Helix?
Reply
#3
It hanged when you try to play the MP3 with CDG file with:
*** Error in `/usr/local/xbmc/lib64/kodi/kodi.bin': malloc(): memory corruption: 0x0000000005c18bf0 ***

Just fixed in git; see [master 999c0de]
Reply
#4
no such published commit, neither in github/xbmc nor github/gyuanev

and hi george (i was previously known as spiff)
Reply
#5
You're right, stupid me forgot to push. Here it goes, rather simple.

And hi Spiff Smile
Reply
#6
Must say I like the idea of making it into a visualizer. Would probably fix some annoyances in the visualization api.
If you have problems please read this before posting

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

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#7
Lightbulb 
I just joined the forum to respond to this message. i hope that I can be helpful, as I have been a long time follower, user and admirer of XBMC and now Kodi.

So here are my .02 cents

There are a few Karaoke camps:

Those that have a library of CDG that they have ripped to MP3+G
Those that have a library of KAR (ripped from midi/lyric song types) such as those made by Sonken and the majority of Korean player/disc makers.
Those that use online sources such as Youtube, SongChoice, etc. Some of these are pay services.

I've looked over the Karaoke code in Kodi at length and have come to the conclusion that it only supports KAR files (but doesn't say this in any documentation). EDIT: I'm referring to library management, not playback.
Also, Kodi puts Karaoke under "Music"..... more on that in a minute....

So then you get to the realm of addons. There is Mikey's karaoke add on (Youtube scraper), and from what I can see XBMCHUB's (Rodrigo) Karaoke (MP3G) add on (Currently broken).

All this divergence only causes the end user confusion. "It is our belief that usability is the most important aspect of a media center like XBMC."... Sometimes usability and extensibility work in opposite directions....

Rodrigo's plugin has a hard coded url that points to a domain (api.xbmchub.com) that no longer exists and thus the plugin is borked as a result. Not to mention it peeves me to not be able to load my own songs.

So, what I did in my spare time was to refactor Rodrigo's code to support the following:

1. Read a csv file located at a location specified in Settings
2. Parse song id, filename, artist, song from the file
3. Display the navigation in the same way as the current plugin
4. Allow the user to use a USB drive, or local storage instead of some undocumented web service.
5. I don't like having to download files during a party (singers waiting in between songs to download...)
6. I'm using an enhanced AppleTV mk1 with nice big hard drive, so I have plenty of storage

What would be really ideal is a unified approach to managing karaoke media in its numerous forms under one "section" of XBMC. I don't think it should be a "visualization".... Visualizations are abstractions on top of music. They are not an entity of themselves. Karaoke is a hybrid media that deserves it's own space.

Thus, when addon authors want to write a Karaoke add on, it is not strewn accross "plugin.audio" and "plugin.video", it would be "plugin.karaoke" thus clearly stating its media source.

If you think about the UI at a 50,000 foot level, you see Music, Video, ... So these are media sources. Karaoke is indeed its own media source.

EDIT:

I've just read some older threads in the search results for Karaoke and find that some of my conclusions may be incorrect. i will have to poke around in the native Karaoke features a bit more before I can really say how usable it all is, or how it fits together... Specifically, how or if it will import a library of MP3+G files and let me update the song titles.

Cheers,
Mark
Reply
#8
Glad to see the attention to Karaoke!
Stories of it being broken is the reason I've been holding off of upgrading.

I'm in the cdg category myself.

Perhaps to get more dev's interested, they could try hit up a karaoke box experience (often popular/frequented in japanese/korean/chinese communities/neighbourhoods). Friends (+/- alcohol) + good tunes = always a hit, much better than any bar/club karaoke event.

Thanks!
Reply
#9
Has this been forgotten about again?
Reply
#10
Nope.
Reply
#11
What's the status? Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
Just following the thread but I'd really like to see this feature back to business.

Cheers.
Reply
#13
Would be interesting to know the status of this now that the 'old' Karaoke support have been ripped out of Kodi master with pull request 8285 for Jarvis

http://github.com/xbmc/xbmc/pull/8285

Question is if karaoke support will be reimplemented in a more accepable way and have as good or better integrated user experience as before?
Reply
#14
(2015-10-30, 13:42)RockerC Wrote: Would be interesting to know the status of this now that the 'old' Karaoke support have been ripped out of Kodi master with pull request 8285 for Jarvis

http://github.com/xbmc/xbmc/pull/8285

Question is if karaoke support will be reimplemented in a more accepable way and have as good or better integrated user experience as before?

Not by me.

I spent last three months trying to tackle it a couple of ways, but never got to the point where I'd like the overall user experience.

The main problem here is karaoke is a different kind of activity comparing to watching video or listening to music. Showing karaoke lyrics for the music played is easy, but offering a streamlined user experience, which is focused on karaoke, is much more difficult to implement without hooking into too many things. For example, the song selection on the fly alone required hooking up into different modules of XBMC, and never really worked properly. Adding more karaoke-specific functionality such as:

- Voice passthrough and song recording;
- Singer list with favorite songs and fair query;
- Scoreboards;

would require even deeper internal changes. Consider the singer list feature, where each user would have its personal login/password and would be able to query songs without disrupting the queue (i.e. one person queuing 10 songs would not automatically hold the queue for ten songs in a row), this alone doesn't really fit into the visualisator model.

A major issue with those features which are basically expected from a Karaoke application is that they require adding a significant amount of code, which would be Karaoke-specific and would not benefit Kodi in any meaningful way. On the other hand, karaoke functionality implementation doesn't need much from Kodi either - all it needs is a music player and some GUI output, which is not much. This means it makes little sense to develop it together - better to part them apart into separate applications, and run a Karaoke app when you need karaoke.
Reply
#15
I've tackled this as a personal project.

So far the results I have are an addon that supports:

Singer registration (just singer name, no password, thats imho overkill)
Switch singer
Singer favorites
Song queue (aka playlist of sorts)
Browse artists by first letter
Browse songs by artist
Search songs by artist or song title
Search artists
Import database from CSV file

Web interface or api which supports most of the above functionality for browsing, searching and queueing so party guests can queue up songs while someone else is singing.

I copied the Music db file to re-use the structure, but have a slight addition to some views.
New singer table
New song queue table and view
New favorite table
New singerfavoriteview
New song_artist view

As for the rendering of the lyrics, my initial plan is to utilize the previous Karaoke code and create a visualization addon.

Then the Karaoke addon would need to tell Kodi to temporarily override the existing Visualization preference.

At the moment I'm primarily interested in maintaining mp3+cdg file playback. lrc and midi/kar files are in fact more rare and probably an edge case, unless there is overwhelming interest in them.

An alternate approach is to make a formal Kodi Karaoke addon that basically just uses user-specified youtube channels as media sources and the addon simply searches these sources when the user requests an artist or song. Youtube API prohibits terms "caching" of their api data, so you're not really supposed to maintain a database of Youtube content...

I like having my local media content but I understand majority of people don't have a karaoke library. But then again, if they just want to use youtube they can use the youtube app. Not really the same experience though.
Reply

Logout Mark Read Team Forum Stats Members Help
Karaoke integration redesign3