This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.sound.midi
class MidiEvent

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

Most common ways to construct:

ShortMessage message = …;

MidiEvent event = new MidiEvent(message, 1);

Based on 20 examples

 

ShortMessage message = …;
long tick = …;

MidiEvent event = new MidiEvent(message, tick);

Based on 15 examples


public class MidiEvent
extends Object

MIDI events contain a MIDI message and a corresponding time-stamp expressed in ticks, and can represent the MIDI event information stored in a MIDI file or a {@link Sequence} object. The duration of a tick is specified by the timing information contained in the MIDI file or Sequence object.

In Java Sound, MidiEvent objects are typically contained in a {@link Track}, and Tracks are likewise contained in a Sequence.


Constructor Summary
MidiEvent(MidiMessage message, long tick)

          Constructs a new MidiEvent.
 
Method Summary
 MidiMessage

          Obtains the MIDI message contained in the event.
 long

          Obtains the time-stamp for the event, in MIDI ticks
 void
setTick(long tick)

          Sets the time-stamp for the 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)
Constructs a new MidiEvent.

Parameters:
message - the MIDI message contained in the event
tick - the time-stamp for the event, in MIDI ticks
Method Detail

getMessage

public MidiMessage getMessage()
Obtains the MIDI message contained in the event.

Returns:
the MIDI message

getTick

public long getTick()
Obtains the time-stamp for the event, in MIDI ticks

Returns:
the time-stamp for the event, in MIDI ticks

setTick

public void setTick(long tick)
Sets the time-stamp for the event, in MIDI ticks

Parameters:
tick - the new time-stamp, in MIDI ticks


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.