edu.columbia.ee.csmit.MidiKaraoke.examples
Class PitchWheelExample

java.lang.Object
  extended by edu.columbia.ee.csmit.MidiKaraoke.examples.PitchWheelExample

public class PitchWheelExample
extends java.lang.Object

Shows how to use the PitchWheelChangeViewParser.

    public static void main(String[] args) {

        if(args.length == 0){
            System.out.println("Usage: PitchWheelExample [midi file name]");
            return;
        }


        try {
            File file = new File(args[0]);
            Sequence mySeq = MidiSystem.getSequence(file);
            PitchWheelChangesInMidi roll = PitchWheelChangeViewParser.parse(mySeq);
            PitchWheelChangeInTrack[] pitchWheels = roll.getPitchWheelChanges();
            for(int i=1;i < pitchWheels.length;i++){
                System.out.println(pitchWheels[i].toString());
            }
        } catch (Exception e) {
            System.out.println("Problem!");
            e.printStackTrace();
            System.out.println(e.toString());
        }

    }

 


Constructor Summary
PitchWheelExample()
           
 
Method Summary
static void main(java.lang.String[] args)
          Shows how to use the PitchWheelChangeViewParser to parse midi commands in a PitchWheelChangesInMidi.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PitchWheelExample

public PitchWheelExample()
Method Detail

main

public static void main(java.lang.String[] args)
Shows how to use the PitchWheelChangeViewParser to parse midi commands in a PitchWheelChangesInMidi. Prints out the pitch wheel commands.

Parameters:
args - the command line arguments. The first (and only) argument should be the name of a midi file.