MIDI karaoke

OpenBinaryLyricsKaraoke

A MIDI file with the words in it: the music as notes for a synthesizer, and each syllable as a text event at the moment it is sung. Tune 1000 made the format; karaoke players and many MIDI players still read it. Subtitld opens the words of a .kar, and the lyrics of any MIDI file, as subtitles.

At a glance

Extension.kar
Media typeNone registered
SpecificationNone for the words: Tune 1000's habits, kept by the players. The file: the Standard MIDI File, from the MIDI Association.
Time precisionA tick: a fraction of a quarter note, at the file's tempo
Text encodingNot declared. Subtitld reads UTF-8, else Windows-1252.
StylingNone
PositioningNone. / starts a new line, \ a new screen.
SpeakersNone
In containersNone. The words travel inside the MIDI file, beside the music.

Anatomy of a file

Not text but bytes: a MIDI file of tracks. A karaoke file Subtitld opens, shown as its events:

MThd · type 1 · 2 tracks · 480 ticks a quarter
MTrk  @KMIDI KARAOKE FILE
      tempo 120 · 4/4
MTrk  Words
      @LENGL
      @TTears of Steel
      @TThe Blender Foundation
      11904  \Hold 
      12288  on 
      12576  to 
      12768  the 
      13344  light
      14592  /We remember
  1. 1 · Header

    MThd: the file's type, how many tracks it has, and how many ticks a quarter note counts.

  2. 2 · First track

    The text that says it is a karaoke file, the tempo and the time signature. In a song, the music's tracks follow.

  3. 3 · Words

    A track named Words: the @ headers, then a text event a syllable.

  4. 4 · Syllables

    Each at the tick it is sung. \ starts a new screen, / a new line.

An event, byte by byte

DD 00 FF 01 06 5C 48 6F 6C 64 20, the first syllable above:

Bytes What it is
DD 00 Delta time 11,904 ticks since the event before, seven bits a byte
FF A meta event
01 Text The kind of meta event KAR's words are
06 Six bytes follow
5C \: this syllable starts a new screen
48 6F 6C 64 20 Hold

At 120 quarter notes a minute and 480 ticks a quarter, a tick is 1/960 of a second: tick 11,904 is 12.4 seconds in. A tempo event changes how long a tick is from then on.

@ headers

Header What it holds In Subtitld
@KMIDI KARAOKE FILE Marks a karaoke file, in the first track Not needed: Subtitld finds the words by their track
@L The language: @LENGL Not kept
@T The title, then the artist, then more The first two as the title and artist
@I Information about the song Not kept
@V The format's version Not kept

KAR, or a MIDI file with lyrics?

KAR MIDI file with lyrics
Extension .kar .mid, .midi
The words Text events, FF 01 Lyric events, FF 05, as the Standard MIDI File defines them
Where A track of their own, Words Often a track with the music
A new line / before a syllable /, or a carriage return
A new screen \ before a syllable \, or a line feed

Subtitld opens both. It takes the Words track when there is one, else the track with the most lyric events.

KAR in Subtitld

Read from the .kar
  • A subtitle a line of words
  • The moment of each syllable, as word timing
  • Times by the file's tempo map, or its SMPTE frames
  • The title and artist
Not kept
  • How long each syllable lasts: MIDI does not say
  • The music
  • Where screens start, the language and the information

Subtitld has no way to save a song yet.

MIDI says when a syllable is sung, not for how long. Subtitld gives each one until the next starts, but no longer than two seconds: a longer gap is a pause. A line's last syllable is held two seconds at most, ending before the next line.

The timing goes in the subtitle's text, as ASS writes karaoke: a code before each syllable, its length in hundredths of a second, {\k40}Hold {\k30}on.

Subtitld opens KAR and MIDI files; it does not save them. KAR is not among the export dialog's formats. To keep the timing you edit, export LRC, whose word stamps hold each syllable's moment, or ASS, as karaoke. A .usfx project does not keep word timing yet.

Opening a KAR file

Subtitld opens .kar, .mid and .midi, and reads:

  • MIDI files of type 0 and 1, and Microsoft's RMID, which wraps one;
  • the tempo map, or SMPTE time, to turn ticks into seconds;
  • / and \ before a syllable, as a new line and a new screen, and a carriage return or line feed before or after one, the same way;
  • the first @T as the title, the second as the artist;
  • words in UTF-8 when they are valid UTF-8, else in Windows-1252.

A MIDI file with no words says so.

Trivia

Tune 1000

The company designed the .kar format and later left it. It stayed the most common format of karaoke files shared as shareware and freeware.

FF 01

KAR's words are text events. Other MIDI files put their words in the lyric event the Standard MIDI File has for them, FF 05.

@KMIDI

The first text of a karaoke file says so: @KMIDI KARAOKE FILE. Most .kar files play in ordinary MIDI players too: they are MIDI files under another extension.

Related formats

Have a .kar to fix?

Open it in Subtitld with the video and retime it on the waveform.

Download Subtitld