edu.columbia.ee.csmit.MidiKaraoke.read
Class LyricsInMidi

java.lang.Object
  extended by edu.columbia.ee.csmit.MidiKaraoke.read.LyricsInMidi

public class LyricsInMidi
extends java.lang.Object

Stores all the lyrics associated with a particular midi file.


Nested Class Summary
 class LyricsInMidi.Line
          Stores a line of lyrics.
 
Constructor Summary
LyricsInMidi(java.util.ArrayList<LyricInTrack> lyrics)
          Constructs a lyrics roll.
 
Method Summary
 LyricsInMidi.Line[] getLines(int trackNumber)
          Gets the lines of lyrics.
 LyricInTrack[] getLyrics()
          Gets all the lyrics from all the tracks.
 LyricInTrack[] getLyrics(int trackNumber)
          Get the lyrics from a particular track
 int[] getTrackNumbers()
          Finds all the tracks associated with lyrics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LyricsInMidi

public LyricsInMidi(java.util.ArrayList<LyricInTrack> lyrics)
Constructs a lyrics roll. Basically, a piano roll is for piano notes. This is the same idea, but for lyrics.

Parameters:
lyrics - the lyrics arranged in time order
Method Detail

getLyrics

public LyricInTrack[] getLyrics()
Gets all the lyrics from all the tracks.

Returns:
lyrics and their associated times.

getTrackNumbers

public int[] getTrackNumbers()
Finds all the tracks associated with lyrics.

Returns:
the tracks that have lyrics

getLyrics

public LyricInTrack[] getLyrics(int trackNumber)
Get the lyrics from a particular track

Parameters:
trackNumber - - the track number of the lyrics
Returns:
the lyrics and their associated times.

getLines

public LyricsInMidi.Line[] getLines(int trackNumber)
Gets the lines of lyrics. Adds a blank line when it sees a 0xD (carriage return) or 0xC (new page).

Parameters:
trackNumber - - track number of lyrics
Returns:
lines