org.niffty
Class MIDIPerformance

java.lang.Object
  |
  +--org.niffty.MIDIPerformance

public class MIDIPerformance
extends java.lang.Object

A MIDIPerformance has a start time, duration, pitch and velocity. A MIDIPerformance is used as a tag on a Notehead.


Constructor Summary
MIDIPerformance()
          Creates new MIDIPerformance with all zero values
MIDIPerformance(int startTime, int duration, int pitch, int velocity)
          Creates new MIDIPerformance with the given values.
 
Method Summary
 int getDuration()
          Return the duration value.
 int getPitch()
          Return the pitch value
 int getStartTime()
          Return the start time value.
 int getVelocity()
          Return the velocity value
 java.lang.String toString()
          Returns string as "(start time:value, duration:value, pitch:value, velocity:value)"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MIDIPerformance

public MIDIPerformance()
Creates new MIDIPerformance with all zero values


MIDIPerformance

public MIDIPerformance(int startTime,
                       int duration,
                       int pitch,
                       int velocity)
Creates new MIDIPerformance with the given values.

Parameters:
startTime - start time, given in MIDI ticks, as an offset from the time-slice (Note that NIFF Spec 6.a.3 has this as a RATIONAL but this has been corrected to a LONG.)
duration - duration given in MIDI ticks (Note that NIFF Spec 6.a.3 has this as a RATIONAL but this has been corrected to a LONG.)
pitch - MIDI pitch (0-127)
velocity - MIDI velocity (0-127)
Method Detail

getStartTime

public int getStartTime()
Return the start time value. (Note that NIFF Spec 6.a.3 has this as a RATIONAL but this has been corrected to a LONG.)


getDuration

public int getDuration()
Return the duration value. (Note that NIFF Spec 6.a.3 has this as a RATIONAL but this has been corrected to a LONG.)


getPitch

public int getPitch()
Return the pitch value


getVelocity

public int getVelocity()
Return the velocity value


toString

public java.lang.String toString()
Returns string as "(start time:value, duration:value, pitch:value, velocity:value)"

Overrides:
toString in class java.lang.Object