c11files.calgorythmic.midi
Class Event
java.lang.Object
c11files.calgorythmic.midi.Event
public class Event
- extends java.lang.Object
This class represents a single MIDI event and implements a method to send the event to a MIDI device.
- Version:
- CS 108, Summer, 2008
- Author:
- Keith Vander Linden
Constructor Summary |
Event(int type,
int pitch,
int velocity)
This constructor creates a Midi event object. |
Method Summary |
void |
send(MidiPlayer midi,
int channel)
This routine sends this event to the given MIDI device. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Event
public Event(int type,
int pitch,
int velocity)
- This constructor creates a Midi event object.
- Parameters:
type
- the MIDI event type (Midi.NOTE_ON
, Midi.NOTE_ON
)pitch
- the note's pitch (Midi.C1
-Midi.C8
)velocity
- the key attack speed
send
public void send(MidiPlayer midi,
int channel)
- This routine sends this event to the given MIDI device.
- Parameters:
midi
- the MIDI device objectchannel
- the given MIDI channel