EvilLyrics
 
FAQ Search
EvilLyrics : Karaoke : Karaoke file format (.kas) Print
Question:

What is the format of karaoke files (.kas files) ?

Answer:

Karaoke files for EvilLyriüGKaraoke file format (.kas)2What is the format of karaoke files (.kas files) ?marek¾¨ the beginning of the lyrics lines together with first two letters of each lyrics line. Timestamps are stored chronologically. When replaying, EvilLyrics uses some fuzzy principles to decode .kas files in order to make it fit with different versions of the same lyrics.

A .kas file name format is
ARTIST - SONGNAME.txt

A .kas file consists of 3 fields delimited with semicolon:
BODY;LENGTH_IN_SECONDS;AUTHOR_NAME



BODY:
A file body consist of 4-character long timestamps. First 2 bytes are encoded time information, second 2 bytes are first 2 letters of a lyrics line (stripped of spaces)

Time is position in the song in the seconds multiplied by 5 (so there are 5 timestamps possible within a second). It is encoded into 2 letters using this formula:

T - times in seconds * 5 (rounded)

first letter ASCII code = int(T/64)+64
second letter ASCII code = (T mod 64)+64 (i.e. =T-(int(T/64)*64))

From given values maximum value of timestamp is 13 minutes and 39 seconds. In case there are timestamps beyond that limit they can be counted again from zero, they should be interpreted properly.


LENGTH_IN_SECONDS:
is the length of the song expressed in seconds. This is used to alert user to compare song length to length of the song just played when importing karaoke file.


AUTHOR_NAME:
is the nick of the author (obtained by registration process at EvilLyrics website). Right after karaoke is recorded, this name is missing from the kas file (it ends by a semicolon). It is only appended when karaoke file is successfully posted to EvilLyrics website. For unregistered users (or for users with wrong login/password combination) karaoke files are posted with a nick "anonymous".



Replaying phase:
When song with karaoke file is replayed, we use following technique. We always take pair of letters intended for current position (time) within a song and we look for the first match within the lyrics going from the next line (relative to the current one) 5 lines down (+1 -> +5) and when not found then going from previous line 2 lines back (-1 -> -3). When line is found, we wait for the next timestamp to come. When no match is found we stay on the current line (this for example helps in ignoring the chorus which was timestamped in a .kas file but is not present in the current set of lyrics)

To better understand .kas file format it is recommended to use ELLO (EvilLyrics Lyrics Organizer) which allows easy .kas files editing.

last updated 30.05.2004
user rating: 1.00 of 3.00, 52 ratings
 How do you rate this article?   For questions please use the forum
related FAQs:   
 
:: EvilLyrics
Screens
Karaoke
Players
Development
F.A.Q.
Addons
Promote
Download



Copyright© 2003-24
EvilLaboratories


Links:
Månkalender 2019