javax.sound.midi
Class MidiEvent

java.lang.Object
  extended by javax.sound.midi.MidiEvent

public class MidiEvent
extends Object

A MIDI event is the combination of a MIDI message and a timestamp specified in MIDI ticks.

Since:
1.3

Constructor Summary
MidiEvent(MidiMessage message, long tick)
          Create a MIDI event object from the given MIDI message and timestamp.
 
Method Summary
 MidiMessage getMessage()
          Get the MIDI message for this event.
 long getTick()
          Get the timestamp for this event in MIDI ticks.
 void setTick(long tick)
          Set the timestemp for this event in MIDI ticks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiEvent

public MidiEvent(MidiMessage message,
                 long tick)
Create a MIDI event object from the given MIDI message and timestamp.

Parameters:
message - the MidiMessage for this event
tick - the timestamp for this event
Method Detail

getMessage

public MidiMessage getMessage()
Get the MIDI message for this event.

Returns:
the MidiMessage for this event

setTick

public void setTick(long tick)
Set the timestemp for this event in MIDI ticks.

Parameters:
tick - the timestamp

getTick

public long getTick()
Get the timestamp for this event in MIDI ticks.

Returns:
the timestamp for this even in MIDI ticks