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

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

public class PianoRollViewParser
extends java.lang.Object

Parses a Sequence or midi file into a piano roll.


Nested Class Summary
static class PianoRollViewParser.UnfinishedNotesException
           
 
Constructor Summary
PianoRollViewParser()
           
 
Method Summary
static PianoRoll parse(javax.sound.midi.Sequence seq)
          Parses a sequence into a piano roll.
static PianoRoll parse(javax.sound.midi.Sequence seq, boolean verbose)
          Parses a sequence into a piano roll.
static PianoRoll parse(java.lang.String fileName)
          Parses a sequence into a piano roll.
static PianoRoll parse(java.lang.String fileName, boolean verbose)
          Parses a sequence into a piano roll.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PianoRollViewParser

public PianoRollViewParser()
Method Detail

parse

public static PianoRoll parse(java.lang.String fileName)
                       throws javax.sound.midi.InvalidMidiDataException,
                              java.io.IOException,
                              SequenceDivisionTypeException,
                              PianoRollViewParser.UnfinishedNotesException
Parses a sequence into a piano roll. Note that the sequence must have division type pulses (ticks) per quarter note.

Parameters:
fileName - name of the midi file
Returns:
the piano roll
Throws:
javax.sound.midi.InvalidMidiDataException
java.io.IOException
edu.columbia.ee.csmit.MidiKaraoke.SequenceDivisionTypeException
edu.columbia.ee.csmit.MidiKaraoke.PianoRollViewParser.UnfinishedNotesException
SequenceDivisionTypeException
PianoRollViewParser.UnfinishedNotesException

parse

public static PianoRoll parse(java.lang.String fileName,
                              boolean verbose)
                       throws javax.sound.midi.InvalidMidiDataException,
                              java.io.IOException,
                              SequenceDivisionTypeException,
                              PianoRollViewParser.UnfinishedNotesException
Parses a sequence into a piano roll. Note that the sequence must have division type pulses (ticks) per quarter note.

Parameters:
fileName - name of the midi file
verbose - if true, will print out warning messages
Returns:
the piano roll
Throws:
javax.sound.midi.InvalidMidiDataException
java.io.IOException
edu.columbia.ee.csmit.MidiKaraoke.SequenceDivisionTypeException
edu.columbia.ee.csmit.MidiKaraoke.PianoRollViewParser.UnfinishedNotesException
SequenceDivisionTypeException
PianoRollViewParser.UnfinishedNotesException

parse

public static PianoRoll parse(javax.sound.midi.Sequence seq)
                       throws SequenceDivisionTypeException
Parses a sequence into a piano roll. Note that the sequence must have division type pulses (ticks) per quarter note.

Parameters:
seq - the sequence to parse
Returns:
a piano roll
Throws:
edu.columbia.ee.csmit.MidiKaraoke.SequenceDivisionTypeException
edu.columbia.ee.csmit.MidiKaraoke.PianoRollViewParser.UnfinishedNotesException
SequenceDivisionTypeException

parse

public static PianoRoll parse(javax.sound.midi.Sequence seq,
                              boolean verbose)
                       throws SequenceDivisionTypeException
Parses a sequence into a piano roll. Note that the sequence must have division type pulses (ticks) per quarter note.

Parameters:
seq - the sequence to parse
verbose - if true, will print out warning messages
Returns:
a piano roll
Throws:
edu.columbia.ee.csmit.MidiKaraoke.SequenceDivisionTypeException
edu.columbia.ee.csmit.MidiKaraoke.PianoRollViewParser.UnfinishedNotesException
SequenceDivisionTypeException