edu.uiuc.cs397rhc.sound
Class InspectorFilter

java.lang.Object
  extended by edu.uiuc.cs397rhc.sound.MidiFilter
      extended by edu.uiuc.cs397rhc.sound.InspectorFilter
All Implemented Interfaces:
javax.sound.midi.Receiver, javax.sound.midi.Transmitter

public class InspectorFilter
extends MidiFilter

A pass-through filter that prints out all of the messages it gets. In particular, it prints a detailed description of ShortMessages.

Author:
Pedro DeRose, Steven N. Severinghaus
See Also:
MidiPlayer

Constructor Summary
InspectorFilter()
          Creates an inspector filter.
InspectorFilter(javax.sound.midi.Receiver r)
          Creates an inspector filter that sends to the specified receiver.
 
Method Summary
 javax.sound.midi.MidiEvent[] applyFilter(javax.sound.midi.MidiMessage mesg, long time)
          Prints out details of the specified message.
 
Methods inherited from class edu.uiuc.cs397rhc.sound.MidiFilter
close, getMicrosecondPosition, getReceiver, getSequencer, isApplicable, send, setReceiver, setSequencer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InspectorFilter

public InspectorFilter()
Creates an inspector filter.


InspectorFilter

public InspectorFilter(javax.sound.midi.Receiver r)
Creates an inspector filter that sends to the specified receiver.

Parameters:
r - the receiver events should be passed on to
Method Detail

applyFilter

public javax.sound.midi.MidiEvent[] applyFilter(javax.sound.midi.MidiMessage mesg,
                                                long time)
Prints out details of the specified message.

Specified by:
applyFilter in class MidiFilter
Parameters:
mesg - the message to describe
time - this parameter is not used
Returns:
an array of MidiEvents whose MidiMessages and timestamps should be sent instead of the given message and timestamp