Archive:Karaoke: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Gamester17
>Oldnemesis
Line 6: Line 6:
* Supports CDG, LRCv1 and LRCv2 lyrics formats;
* Supports CDG, LRCv1 and LRCv2 lyrics formats;
* Supports MIDI music and KAR files;
* Supports MIDI music and KAR files;
* Plays directly from MP3+CDG archived together;
* Supports song numbering with permanent numbers, which means the song could be selected by number, even if another song is being played. The numbering information could be exported into HTML file and used to print catalogs.
* Supports song numbering with permanent numbers, which means the song could be selected by number, even if another song is being played. The numbering information could be exported into HTML file and used to print catalogs.
* Supports real-time lyrics timing modification, allowing to modify the lyrics-music delay. The delay is associated to the song, and then restored when this song is played again.
* Supports real-time lyrics timing modification, allowing to modify the lyrics-music delay. The delay is associated to the song, and then restored when this song is played again.
===Missing features===
What is not supported:
* Playing CD-G disks directly. The suggested workaround is to rip them into MP3+CDG files using available software.
* Playing vendor-specific Karaoke disks (like California Electronics). Those disks need to be converted to playable files set first.
* Using digitized microphone input. The microphone should work in pass-through mode, but will not work in digitized mode, where the sound should be digitally processed by XBMC. This also means that any voice post-processing is not possible yet.
* Video background with user-specified video. Only visualization could be used as background.


===Supported formats===
===Supported formats===

Revision as of 23:17, 24 January 2009

Using Karaoke with XBMC

This guide will help you to set up your XBMC to play karaoke.

Features

XBMC supports the following Karaoke features:

  • Supports CDG, LRCv1 and LRCv2 lyrics formats;
  • Supports MIDI music and KAR files;
  • Plays directly from MP3+CDG archived together;
  • Supports song numbering with permanent numbers, which means the song could be selected by number, even if another song is being played. The numbering information could be exported into HTML file and used to print catalogs.
  • Supports real-time lyrics timing modification, allowing to modify the lyrics-music delay. The delay is associated to the song, and then restored when this song is played again.

Missing features

What is not supported:

  • Playing CD-G disks directly. The suggested workaround is to rip them into MP3+CDG files using available software.
  • Playing vendor-specific Karaoke disks (like California Electronics). Those disks need to be converted to playable files set first.
  • Using digitized microphone input. The microphone should work in pass-through mode, but will not work in digitized mode, where the sound should be digitally processed by XBMC. This also means that any voice post-processing is not possible yet.
  • Video background with user-specified video. Only visualization could be used as background.

Supported formats

The following karaoke formats are supported by XBMC.

MP3+CDG

The karaoke song consist of two files: the music file (usually MP3 but could be any playable type), and a separate binary file with the same file name as the music file, but with .cdg extension. This is the most popular format in the NA/USA, with a lot of English language music in this format available both legally and illegally. The source of those files are usually original CD disks in CD-G formats designed for hardware karaoke players. Those disks got ripped by any of freely available CD rippers, repacked and shared via typical channels, or sold on multiple web sites around the world.

The main feature of this format is that the lyrics are stored in the binary format, in form of drawing instructions. This means the CDG file could contain text in any language, or even graphics, and will be properly rendered on any supported device no matter what fonts are installed. However those drawing instructions operate on a small 300x216 window, and therefore have to be upscaled. As a result, this format combines usually very good music quality with very poor graphics. Because of upscaling the lyrics visualization quality is the worst through all supported formats, especially on large screen TVs. Other problems of this format are inability for the ordinary user to fix the typos or synchronization issues in the song, and that software required to create .CDG files is not widely available. There are only two programs, and neither is cheap.

MP3+LRC

Same as with CDG, the karaoke song consist of two files: the music file (usually MP3 but could be any playable type), and a separate text file with the same file name as the music file, but with .lrc extension. This is the most popular format in the Asia, and the most widespread lyrics format in the Internet. The source of those files are either original karaoke CDs where text in CD-G format was replaced by text in LRC by the person who ripped it, or a home-made music often made from MIDI files. There is also a lot of legitimate lyrics web sites where the lyrics in LRC format are available for download, usually for free.

The main feature of this format is that the lyrics are stored in the text file, usually in UTF-8 encoding. This means nothing but text (i.e. no graphics), and that the rendering device (XBMC) must have all necessary fonts installed. However since the rendering device uses real scalable fonts to render the text, the lyrics visualization quality is very good, especially on large screens. Being a text file it could also contain meta information (artist and song name, overall song delay and so on), is easy to edit/fix, and easy to create. Under Linux such files could be created in five minutes using free software.

MIDI/KAR

The karaoke song consist of a single MIDI file which usually has .kar or .mid extension. The MIDI file inside usually contains multiple tracks, and one of those tracks contains lyrics synchronized with the music. Because MIDI file only contains instructions for the music synthesizer (like //play note "A" using instrument "Grand Piano"//) and do not contain the music itself, the file is usually very small. Most song files are around 50K. Vast majority of MIDI files is created by amateurs, and legally offered for download for free. This format is very popular in Eastern Europe. But for any language it's usually much easier to find a MIDI karaoke song than MP3 karaoke song.

To play MIDI files, XBMC incorporates a MIDI synthesizer Timidity++. This is a full-featured synthesizer which supports soundfonts, but special configuration is required. Since the lyrics in the MIDI file are in text format, a good quality rendering is possible. However there is no standard which would require MIDI files to use only UTF8 encoding, and therefore some of them use UTF8, and some of them use local encoding. XBMC tries to auto-detect whether to use UTF-8 but it might not always succeed. The text in MIDI files is relatively hard to edit or modify, however a lot of editors is available on all the platforms, and there is open-source free software like Rosegarden to edit MIDI files.

Configuration

XBMC needs to be configured to support karaoke. You need is to enable karaoke in the Setup -> Music -> Karaoke. I also suggest to disable "Music -> General -> Auto play next item" as it's usually not desirable for karaoke.

Checking timings

You need to make sure there is no delay between audio and lyrics, or set up the appropriate value to compensate it. For this, get a couple of songs which you're sure are synchronized properly, and try to play it. If the lyrics are not synchronized, adjust delay through advancedsettings.xml. Note that there are two different delays for CDG and for LRC files. There is no delay for MIDI playback, it must be always synchronized.

MIDI playback

There are two ways to configure embedded Timidity synthesizer and enable MIDI playback - a simple way, and a more advanced way.

Simple way, you need a single soundfont file. Those are typically large (50Mb+) files with .sf2 extension, the most popular resource is http://www.sf2midi.com I recommend using widespread and well-tested SGM-180 soundfont, google for it or get 2.01 version from http://www.geocities.jp/shansoundfont/ (this one is included into Arch linux in the soundfont-sgm180 package). Download the file, rename it to soundfont.sf2 and put it into your XBMC system directory (not your home directory) into system/players/paplayer/timidity subdirectory (you must create it first).

Advanced way, you need to prepare timidity.cfg configuration file. Usually this is necessary when you use multiple soundfonts or want to add post-processing effects. This means you know enough of Timidity, and could handle it yourself. XBMC embeds version 2.13 of Timidity. Create timidity.cfg and put it in the system/players/paplayer/timidity subdirectory, and check XBMC log file for errors if it doesn't work.

Please note that for SGM-180 soundfont playback you need a decent machine with at least 256Mb of RAM and at least Pentium 2.4GHz CPU. Otherwise get a smaller soundfont.

Selection by number

To enable song selection by number, your music collection needs to be scanned (or rescanned if it was scanned already). During scan, the karaoke songs are detected, and the song numbers will be automatically assigned. After the scan is completed, you can export the numbered songs as HTML file (Setup -> Music -> Karaoke -> Export Karaoke titles... -> Export as HTML), open them in the OpenOffice Writer and print a song directory to have a professional Karaoke setup. Use two-column mode if you want to save space.

It is also possible to change the song numbering if you don't like it or if you want to maintain compatibility with your printed guide. For this you need to export numbered songs as CSV (Setup -> Music -> Karaoke -> Export Karaoke titles... -> Export as CSV), modify it as necessary, and import it back (Setup -> Music -> Karaoke -> Import Karaoke titles). The CSV format is TAB-separated, no quotes, no escape characters. The first field is song number, second field is artist name, third is song name, and fourth is path to the music file.

It is possible to select songs while a karaoke song is still played, by using numbers on your remote. This feature is enabled by default, however you need to make sure that the number buttons from your remote generate Number* events. By default they do not, so you need to modify your Keymap.xml. Put the following in your <remote> section:

      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>

When you start pressing numbers, a small dialog will pop up in a left top screen corner. It will show selected song number and song name or "Unknown" if there is no such song for this name. Once the song is selected, press "Select" on your remote to add it into the playlist.

Auto-popup selection by number

If the setting "Auto-popup song selector" is enabled, the song selection dialog will pop up after the karaoke song ends if there are no more songs in the queue. It will not pop up after a non-Karaoke song. This dialog works exactly as the in-song dialog, however once the song is selected, it starts playing immediately.

Playing

Select the Karaoke song (either on disk or by number) and press "Select". The screen should change to visualization, and the song should start playing with the lyrics shown on screen. For us the best visualization for karaoke so far was Goom, but it is very resource-consuming so if your hardware is not top notch, you might want to switch to Project M instead, which is also very good.

If the lyrics for this specific song need to start earlier or later, press the button associated with SubtitleDelayPlus or SubtitleDelayMinus until lyrics are synchronized. Each press changes the delay by 50ms.

Advanced settings

The following advanced settings are added for karaoke support. All they must be stored in the advancedsettings.xml file in the <karaoke> section.

 <syncdelaycdg>0.0</syncdelaycdg>

music-lyrics delay for CDG format lyrics in 1/10 seconds.


 <syncdelaylrc>0.0</syncdelaylrc>

music-lyrics delay for LRC format lyrics in 1/10 seconds.


 <alwaysreplacegenre>0</alwaysreplacegenre>

automatically set genre to "Karaoke" for all karaoke songs.


 <storedelay>1</storedelay>

If the lyrics delay was modified for any song, store this delay value for this song, and restore it next time the song is played.


 <autoassignstartfrom>1</autoassignstartfrom>

Song numbering starts from the specified number