edu.columbia.ee.csmit.MidiKaraoke.write
Class ChannelSpecifier

java.lang.Object
  extended by edu.columbia.ee.csmit.MidiKaraoke.write.ChannelSpecifier

public class ChannelSpecifier
extends java.lang.Object

Allows you to manipulate the channels in a midi file.


Constructor Summary
ChannelSpecifier()
           
 
Method Summary
static void write(java.lang.String originalFileName, java.lang.String newFileName, int[] keptChannels)
          Reads in a midi file, filters out note on/note off commands that aren't in the desired channel(s), and then writes the result to a new midi file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelSpecifier

public ChannelSpecifier()
Method Detail

write

public static void write(java.lang.String originalFileName,
                         java.lang.String newFileName,
                         int[] keptChannels)
                  throws javax.sound.midi.InvalidMidiDataException,
                         java.io.IOException,
                         SequenceDivisionTypeException
Reads in a midi file, filters out note on/note off commands that aren't in the desired channel(s), and then writes the result to a new midi file.

Parameters:
originalFileName - name of the original midi file
newFileName - name of the destination midi file
keptChannels - array of the channels you want to keep
Throws:
javax.sound.midi.InvalidMidiDataException
java.io.IOException
SequenceDivisionTypeException