javax.sound.midi

Class 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
MidiMessagegetMessage()
Get the MIDI message for this event.
longgetTick()
Get the timestamp for this event in MIDI ticks.
voidsetTick(long tick)
Set the timestemp for this event in MIDI ticks.

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

getTick

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

Returns: the timestamp for this even in MIDI ticks

setTick

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

Parameters: tick the timestamp