openpiano.midi
Class MidiControl

java.lang.Object
  extended by openpiano.midi.MidiControl
All Implemented Interfaces:
Comparable<MidiControl>

public class MidiControl
extends Object
implements Comparable<MidiControl>

The MidiControl class consists time-based MIDI control messages

Version:
1.0, 07/30/08
Author:
Sascha Westermann

Constructor Summary
MidiControl(MidiMessage midiMessage, long tick)
          Constructs a new MIDI control message
 
Method Summary
 int compareTo(MidiControl midiControl)
          Compares the ticks of MIDI control messages
 MidiMessage getMidiMessage()
          Returns the MIDI control message
 long getTick()
          Returns the start tick of the MIDI control message
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiControl

public MidiControl(MidiMessage midiMessage,
                   long tick)
Constructs a new MIDI control message

Parameters:
midiMessage - the MIDI control message
tick - the start tick of the MIDI message
Method Detail

compareTo

public int compareTo(MidiControl midiControl)
Compares the ticks of MIDI control messages

Specified by:
compareTo in interface Comparable<MidiControl>
Parameters:
midiControl - the MIDI control message to compare with
Returns:
the difference of the ticks

getMidiMessage

public MidiMessage getMidiMessage()
Returns the MIDI control message

Returns:
the MIDI control message

getTick

public long getTick()
Returns the start tick of the MIDI control message

Returns:
the start tick of the MIDI control message