Posts: 166
Joined: Nov 2008
Reputation:
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?
Posts: 166
Joined: Nov 2008
Reputation:
1
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]
Posts: 1,506
Joined: Nov 2013
no such published commit, neither in github/xbmc nor github/gyuanev
and hi george (i was previously known as spiff)
Posts: 4,549
Joined: Dec 2007
Reputation:
17
topfs2
Team-Kodi Developer
Posts: 4,549
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.
"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#."
Posts: 21
Joined: Jan 2015
Reputation:
2
2015-01-07, 00:54
(This post was last modified: 2015-01-07, 01:24 by thetazzbot.)
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
Posts: 18
Joined: Oct 2011
Reputation:
1
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!
Posts: 7
Joined: Jun 2015
Reputation:
0
Has this been forgotten about again?
Posts: 5
Joined: Nov 2014
Reputation:
1
Just following the thread but I'd really like to see this feature back to business.
Cheers.
Posts: 21
Joined: Jan 2015
Reputation:
2
2016-01-09, 03:21
(This post was last modified: 2016-01-09, 03:22 by thetazzbot.)
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.