Hi everybody!
I have recently realized there are more than one format for Karaoke MIDI files.
Is there any list of these formats and their descriptions?
Would be also great to have some samples for each.
Thanks a lot!
The two formats I've played around with are MIDI Files with Lyric events and MIDI/KAR files with KAR format Text events.
LYRIC EVENTS
The Standard MIDI Files specification specifies a Lyric meta event, but doesn't describe much how to use it.
A later document (SMF Lyric Meta Event Definition) gave more information how the MMA says Lyric meta events should be used. I remember having trouble getting some software to work reliably with the recommended use of CR and LF characters in lyric events. For example, I have found Notation Player dropping lyrics when they are used. If I remove the CR and LF events the lyrics will look okay in Notation Player, but this disobeys the specification suggestion to limit lines to 40 characters.
Then a later document (SMF Language and Display Extensions) added some special codes you could put into Lyric events. And the MMA is now calling it a Lyric/Display event. I never used the special language codes because I think they didn't work in the software I had. (Maybe the codes were just displayed as lyrics? I can't remember if I actually tested them or just never bothered with them.)
KAR FORMAT
The other format I played around with long ago was KAR format files. These are MIDI files renamed to have a .KAR extension and use Text Meta Events to represent lyrics and song information. You can see a brief description of the format at the top of this page: Karaoke Formats. (The page also mentions other formats.)
I think I used that description of the KAR format and examples of KAR files I found online and to make some KAR files myself. I remember getting things working in WinKaraoke for example, but not being sure if the files I made or found matched the "official" KAR format. For example, when that page says "the first track" contains the information events, I'm unclear if that means the track with tempo events in it (which is technically the first track in a Type 1 MIDI file, but is often hidden from the track view in MIDI software), or the first track that you can put notes into (technically the second track in a Type 1 MIDI file, but often the first track displayed in software).
The example I made below uses the first track you can put notes into for the information events, because I believe I made it with Cakewalk, and Cakewalk hides the tempo track from you, so you can't use the Event List to put Text events into the tempo track. As I remember, the file worked in WinKaraoke, but I wasn't sure if that was the "official" format. (WinKaraoke may have been more permissive then the original software.)
EXPERIMENT EXAMPLE
Ideally I wanted to find examples of official files that were made to go along with the original KAR software (Soft Karaoke), or find software and files that claim to follow the official MMA Lyrics standard (is there any such software?) to confirm I'm doing things correctly.
I've attached an example I made, but be aware it's just an experiment. I put both KAR style Text events and Lyric events in the same file. I remember being able to open the file with WinKaraoke to see the KAR style Text events with a bouncing ball. To have the ball bounce for each note, you have to put some text for each note, so for melismas I made events like "mi-" "i-" "inds" for the three notes of "minds".
If you open the file in Cakewalk the Lyric events show up under notes in the staff view of Cakewalk. The MMA specification says you should use empty Lyric events for melismas ("minds" "" "" ), but I think Cakewalk didn't insert them so I didn't have them in the file (just "minds" ). Maybe I tried putting in the official empty events they messed up the display, I can't remember.
I also remember playing around with vanBasco's Karaoke Player, which I remember could use either kind of lyrics (KAR Text events or Lyric events). I can't remember which one it used for a file that had both.
Download: wired.zip
Regarding karaoke, there's a big difference between official recommendations and the real world.
The best source for the official format is RP-026 which is already very precise.
Problem 1: Nobody seems to care about it.
Problem 2: The Encodings are very limited. (Only LATIN-1 and Japanese Shift-JIS are allowed).
In the real world most files use text meta events but some use lyrics. In both cases their format is oriented to Softkaraoke (more or less), starting with @KMIDI KARAOKE FILE, and using / and \ for new lines or new screens.
But as Bavi_H mentioned, the track numbers are very different.
Sometimes all special tags as well as the lyrics are in the same track. Sometimes the special fields (@K, @V, @I) begin in the first track, sometimes in the second one, and sometimes there are even different karaoke formats in the same file, like in Bavi_H's file.
(He used the second and third track for Softkaraoke format and the fifth track for LYRICS events.)
@Bavi_H:
Ideally I wanted to find examples of official files that were made to go along with the original KAR software (Soft Karaoke), or find software and files that claim to follow the official MMA Lyrics standard (is there any such software?) to confirm I'm doing things correctly.
I'm not aware of any MMA compliant software apart from my own: Midica.
At least I think that Midica is compliant to RC-026. I cannot test it due to a lack of compliant example files.
The Karaoke Engine of Midica can play every format I've seen so far, including the official standard that I didn't see yet.
If there are different formats in the file, Midica counts every text and lyrics events in every track and chooses the one with most hits. This is the format that's used for display. Otherwise it could happen that syllables are displayed twice.
The built-in Music Programming Language (MidicaPL) can produce Karaoke files in the following formats:
1. The official recommendation (using simple lyrics as Channel Options and special fields as Meta Information)
2. Softkaraoke (using lyrics as Channel Options again, and special fields as Softkaraoke Meta Fields
If a SOFT_KARAOKE block is missing, the RC-026 compliant format is used. Then the special fields are included in Lyrics fields as {#title=...}, and so on, in the first track. The rest of the lyrics is included as LYRICS events in the second track.
For the Charsets, Midica is not limited to ANSI and Shift-JIS but allows any Charset that's available on the OS. (So strictly speaking, it's not standard compliant in this case.)
If a SOFT_KARAOKE block is available, the according special fields are included as follows:
- @K, @V or @I in the first track
- @L and @T in the second track (together with the normal lyrics, as TEXT events)
I'm also interested if there's any other software that can produce or consume RP-026 compliant files - especially with meta fields.
Than it would be easier to verify if the format is correctly implemented in Midica.