Class Index | File Index

Classes


Class Ultrastar

Ultrastar synchronized lyrics parser. Parses Ultrastar synchronized lyrics into a JSON-like object to make life easier for anyone who wants to use them on a web application. The current version is incomplete with some missing features, but it works fine for lyrics defined using absolute offset beats.

TODO

Information about this format was gathered in different places of the internet:
Defined in: ultrastar.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Ultrastar(text, options)
Method Summary
Method Attributes Method Name and Description
 
The parsed text in a JSON-like object.
Class Detail
Ultrastar(text, options)
Parameters:
{String} text
The synchronized lyrics as read from the .txt file.
{Object} options Optional
Currently not in use.
See:
#getLyrics for the documentation of the JSON-like object structure.
Method Detail
{Object} getLyrics()
The parsed text in a JSON-like object.

Format of the returned object:

{
  (<tag>: {String},)*
  sentences:
  [({
    start: {Integer, miliseconds},
    text: {String},
    syllables:
    [({
      start: {Integer, miliseconds},
      length: {Integer, miliseconds},
      pitch: {Integer},
      text: {String}
    },)*]
  },)*]
}
All values in miliseconds are absolute.
<tag> are meta data values found in the header of the .txt file.

Example

{
  title: "All Star",
  artist: "Smash Mouth",
  mp3: "05-All Star.mp3",
  bpm: "104",
  gap: "500",
  sentences:
  [{
    start: 500,
    text: "Somebody once told me ",
    syllables:
    [{
       start: 500,
       length: 432,
       pitch: 54,
       text: "Some"
     },
     {
       start: 1076,
       length: 288,
       pitch: 61,
       text: "bo"
     },
     {
       start: 1365,
       length: 288,
       pitch: 58,
       text: "dy "
     },
     {
       start: 1653,
       length: 432,
       pitch: 58,
       text: "once "
     },
     {
       start: 2230,
       length: 288,
       pitch: 56,
       text: "told "
     },
     {
       start: 2519,
       length: 288,
       pitch: 54,
       text: "me "
     }]
  },
  {
    start: 2807,
    text: "the world is gonna roll  me, ",
    syllables: [...]
  }]
}
Returns:
{Object} The JSON-like object.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun Oct 11 2009 14:52:48 GMT+0200 (CEST)