Reading lyrics from a .kar file

I only need to read texts from . kar file .

The problem is that the MIDI documentation and the .kar documentation are missing documentation.

I tried to open the file with a hex editor, but I did not understand a lot of things.

So my questions are:

  • What is the format of the .kar file?
  • How can I extract texts from .kar files? I do not need to play audio.
+4
source share
3 answers

A KAR file is a regular MIDI file (in particular, a type 1 file with several instruments), except that the way the text is stored is slightly different from ordinary MIDI files. Some time has passed since I worked with KAR, but IIRC lyrics are stored as metatext events (type 0x01) instead of text events (type 0x05). However, KAR also uses text events for title / artist / etc, although they usually have a prefix with the "@" symbol.

As @ Vilx- noted, you can analyze KAR just like regular MIDI, so when you do this, you can simply reset all meta-events and you will see how they are built.

+5
source

I have no answer, but I can point you in the direction in which I would take myself.

The MIDI file format is pretty well standardized and documented. Wikipedia does not provide a link to it, but I remember how it found a good 10 years ago on the network (before even Google was born!), So I do not expect that you will have problems finding it today.

The format is "chunked", which means that karaoke information is most likely stored in a special form. The rest is reverse engineering. Take a karaoke file (.kar, as I understand it, this is a .mid with fragments of texts), drop the known pieces, and soon you will find fragments of text. The information there should not be too complicated to decrypt.

Added: It is also said that KMid supports them, so its source code can shed some light.

+1
source

You can use this free library for .NET: NAudio

0
source

All Articles